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.
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.
X-API-Key<token>Create in the console: Settings → API & webhooks.
agent_id*Agent Idapplication/json- 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.
OK
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 PATCH 'https://api.callmitra.ai/api/v1/agents/string' \ -H 'Content-Type: application/json' \ -d '{ "config": { "tts_speed": 1.1, "voice": "anushka" }}'{ "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}Place a test call POST
Calls `destination` from one of your numbers so you can hear the agent. Not a campaign call and not billed; free plans have a test-call allowance.
Call a lead now POST
Calls the lead right away through the first running campaign it belongs to, using that campaign's agent and caller ID. The lead's do-not-call flag, the campaign's daily cap and your concurrent call limit still apply; each refusal has its own error code.