Skip to Content
CallMitraDocs
API referenceAgents

Update an agent

Saves the change as the agent's draft; calls keep using the published version until you call publishAgent. Only the `config` keys you send change; a nested object you send (for example `script`) replaces the stored one. Bad values are refused with `parameter_invalid` naming the field.

PATCH
/api/v1/agents/{agent_id}

Saves the change as the agent's draft; calls keep using the published version until you call publishAgent. Only the config keys you send change; a nested object you send (for example script) replaces the stored one. Bad values are refused with parameter_invalid naming the field.

Authorization

headerX-API-Key<token>

Create in the console: Settings → API & webhooks.

Path Parameters

agent_id*Agent Id

Request Body

application/json
  1. body

Fields to change. The change is saved as a draft; publish it with publishAgent.

config?|

Config keys to change; omitted keys keep their current value. Nested objects are replaced.

name?|

New display name.

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 PATCH 'https://api.callmitra.ai/api/v1/agents/string' \  -H 'Content-Type: application/json' \  -d '{  "config": {    "tts_speed": 1.1,    "voice": "anushka"  }}'
Example Response
{  "agent": {    "config": {      "language": "hi-IN",      "llm_model": "gpt-4o-mini",      "tts": "sarvam",      "voice": "priya"    },    "id": "3f0c2a9e-6a51-4c6e-9a3e-2d1b7c4e8f10",    "language": "hi-IN",    "name": "Priya",    "rosterState": "in_training",    "status": "draft",    "takingCalls": false,    "unpublishedChanges": true  },  "success": true}