Update prompts
Prompts
Update prompts
Save a new prompt version for one agent.
POST
Update prompts
Saves a new prompt version for one agent and returns the stored version.
This route creates a new saved prompt version. It does not patch a prompt in place.
Headers
Bearer token containing your Fini workspace API key. Format:
Bearer fini_... The key needs write scope.application/jsonPath parameters
Agent ID whose prompts you want to update. Use List agents to get the
botId.Body parameters
Full Planning Prompt section array. Send the complete array, not just the section you changed.
Full Main Guidelines section array.
Full Channel Prompt section array.
For write payloads, subsection helper fields from merged reads such as
defaultPrompt and custom are not required. A safe round-trip pattern is to start from Get prompts, edit the arrays in place, and send them back.Response
Returns the savedPrompt version.
Current controller behavior: this response is the stored version row, not the merged template view. If you need the merged read shape with
defaultPrompt and custom, call Get prompts after writing.Errors
400 Bad Request
400 Bad Request
The body is malformed. All three top-level prompt arrays are required.
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
The API key does not include the
write scope required for this route.404 Not Found
404 Not Found
The agent ID does not exist.
406 Not Acceptable
406 Not Acceptable
Current controller behavior: if the agent belongs to a different workspace, this route returns
406 with an invalid-agent message rather than 403.500 Internal Server Error
500 Internal Server Error
Fini failed while saving the prompt version in storage.

