Publish the agent's draft
Makes the saved draft the version used on calls and clears `unpublishedChanges`. Refused with `agent_state_blocked` when the draft breaks a rule (script too long, voice not available for the language, no usable language-model key, archived agent).
Makes the saved draft the version used on calls and clears unpublishedChanges. Refused with agent_state_blocked when the draft breaks a rule (script too long, voice not available for the language, no usable language-model key, archived agent).
X-API-Key<token>Create in the console: Settings → API & webhooks.
agent_id*Agent IdOK
application/json- response
One agent.
agent*An AI agent: its live configuration, draft, status and numbers.
success?SuccessAlways true on success.
true[key: string]?anycurl -X POST 'https://api.callmitra.ai/api/v1/agents/string/publish'{ "agent": { "id": "3f0c2a9e-6a51-4c6e-9a3e-2d1b7c4e8f10", "name": "Priya", "rosterState": "paused", "status": "published", "takingCalls": false, "unpublishedChanges": false }, "success": true}Stop taking calls POST
Switches the agent off (`takingCalls: false`). Its configuration is kept; start it again with startAgent.
Start taking calls POST
Switches the agent on (`takingCalls: true`, `rosterState: live`). It needs a phone number assigned to the agent. A waiting draft (or a never-published agent) is published first, with the same checks as publishAgent. When a rule fails (no phone number, archived agent, draft breaks a publish rule) the call is refused with `agent_state_blocked` and a message naming what is missing.