Set an agent's post-call webhook
After each of this agent's calls, a summary is POSTed to `url` (used when the campaign has no webhook of its own). `trigger` picks which calls are sent: `every`, `completed` or `voicemail`. Send an empty `url` to turn it off. Omit `secret` to keep the stored one; the secret is never returned (`hasSecret` says whether one is set). The change applies to the live agent at once. A URL that does not point at a public internet address is refused with `agent_state_blocked`.
After each of this agent's calls, a summary is POSTed to url (used when the campaign has no webhook of its own). trigger picks which calls are sent: every, completed or voicemail. Send an empty url to turn it off. Omit secret to keep the stored one; the secret is never returned (hasSecret says whether one is set). The change applies to the live agent at once. A URL that does not point at a public internet address is refused with agent_state_blocked.
X-API-Key<token>Create in the console: Settings → API & webhooks.
agent_id*Agent Idapplication/json- body
Where to send each call's summary for this agent.
secret?|Signing secret. Omit to keep the current one.
trigger?TriggerWhich calls are sent: every call, completed calls only, or voicemails only.
"every""every""completed""voicemail"url?UrlHTTPS URL. Empty removes the webhook.
length <= 2000""OK
application/json- response
The agent and its updated post-call webhook.
agent*An AI agent: its live configuration, draft, status and numbers.
success?SuccessAlways true on success.
truewebhook*The agent's post-call webhook (the secret itself is never returned).
[key: string]?anycurl -X PUT 'https://api.callmitra.ai/api/v1/agents/string/post-call-webhook' \ -H 'Content-Type: application/json' \ -d '{ "secret": "whsec_example", "trigger": "completed", "url": "https://example.com/hooks/calls"}'{ "agent": { "id": "3f0c2a9e-6a51-4c6e-9a3e-2d1b7c4e8f10", "name": "Priya", "status": "published" }, "success": true, "webhook": { "hasSecret": true, "trigger": "completed", "url": "https://example.com/hooks/calls" }}Send a test event POST
Sends a signed `webhook.test` event to the endpoint now, whatever its event filter, and returns the delivery with the endpoint's answer. A failed test is retried like any other delivery. Tests and redeliveries share a cap of 10 per endpoint per minute (429 with `Retry-After`).
Update a webhook endpoint PATCH
Changes only the fields you send. Re-enabling a disabled endpoint clears its failure count.