Refine with AI
Create Refine with AI iteration
Queue an AI-assisted refinement analysis for one Fini response.
POST
Starts a Refine with AI iteration for one Fini response. Fini creates or reuses the response’s active review session, queues asynchronous analysis and replay, and immediately returns identifiers you can use to poll the session.
Use this endpoint when you already know the conversation ID and Fini response event ID to review. Use List conversations or Get conversation to discover event IDs before queueing a review.
This endpoint needs
write scope. Creating an iteration generates recommendations and a replay, but does not publish or apply the suggested changes.Headers
string
required
Bearer token containing your Fini workspace API key. Format:
Bearer fini_... The key needs write scope.string
required
Send
application/json.Path parameters
string
required
Conversation ID containing the response to review.
string
required
ID of the Fini response to review. The event must belong to the conversation and have a linked user event so Fini can replay it.
Body parameters
string
required
Description of what was wrong with the response or how it should improve. Must be non-empty and at most 2,000 characters.
Request example
Response
string
Active Refine with AI session ID. A later iteration for the same response can reuse this session while it remains active.
string
ID of the newly queued iteration.
string
ID of the background job processing the iteration.
Polling the result
The response only confirms that processing was queued. Poll Get Refine with AI session with the returnedsessionId, or call Get active Refine with AI session for the selected response.
An iteration progresses through queued, generating_changes, and replaying. A terminal result is ready, no_change, or failed. Older ready iterations can become superseded, and applied iterations use published.
When the session returns a ready latestIteration, use oldAnswerSnapshot and newAnswerSnapshot to compare the original response with the replayed response. Use changes to find the proposed prompt, knowledge, or rule drafts. The create response does not contain those results because the work runs asynchronously.
For the dashboard workflow and review model, see Refine with AI.
Errors
400 Bad Request
400 Bad Request
The feedback is empty or longer than 2,000 characters, an iteration is already in progress, the event does not belong to the conversation, the event is not Fini-authored, or it has no linked user event for replay.
403 Forbidden
403 Forbidden
The API key does not include the
write scope required for this route.404 Not Found
404 Not Found
The conversation or target event does not exist in the workspace.
500 Internal Server Error
500 Internal Server Error
Fini could not create or queue the Refine with AI iteration.

