Agents
Publish Agent
Changed onFreeze the current draft into an immutable version and make it the live configuration for new sessions. Each new version gets the next version_number. If the draft already matches the live version, no version is created and the live version comes back with created: false.
The response describes what was published:
- version_number and config_hash identify the version.
- config is the configuration exactly as published. Check your read-back against it, not against the request you sent.
- created tells whether this call made a new version.
Publishing copies the draft as it is stored. It does not change any field. Writes do normalize some values, see Update Draft Config.
The body is optional:
- expected_config_hash publishes only while the draft still has that config_hash. Take it from Get Draft Config or Update Draft Config. On a mismatch the call returns 409 with reason: "draft_changed" and the draft's current config_hash. Nothing is written.
- config applies draft changes first, in the same shape as Update Draft Config. The changes and the publish are one atomic step. If either fails, the draft stays as it was.
- With both, expected_config_hash is checked against the draft before config is applied.
- version_title and version_description label a new version.
post/v1/agent/agents/{agent_id}/publish
Request
- Base URLhttps://api.fish.audio
- URLhttps://api.fish.audio/v1/agent/agents/{agent_id}/publish
- AuthHTTP bearer
Path parameters
agent_idstring required
Request body
Response
Request fulfilled, document follows
Changes
- info
endpoint added
- info