Skip to Content
CallMitraDocs
API referenceAgents

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).

POST
/api/v1/agents/{agent_id}/publish

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).

Authorization

headerX-API-Key<token>

Create in the console: Settings → API & webhooks.

Path Parameters

agent_id*Agent Id

Response Body

OK

application/json
  1. response

One agent.

agent*

An AI agent: its live configuration, draft, status and numbers.

success?Success

Always true on success.

Defaulttrue
[key: string]?any
Example Request
curl -X POST 'https://api.callmitra.ai/api/v1/agents/string/publish'
Example Response
{  "agent": {    "id": "3f0c2a9e-6a51-4c6e-9a3e-2d1b7c4e8f10",    "name": "Priya",    "rosterState": "paused",    "status": "published",    "takingCalls": false,    "unpublishedChanges": false  },  "success": true}