Event types
Every webhook event CallMitra sends, when it fires, the fields in its data, and a sample body.
Every delivery to a webhook endpoint has the same envelope. The event's own fields are in data.
{
"id": "evt_5f0c6a1e9b2d4c7e8a1f3b5d7c9e0a2b",
"type": "call.completed",
"apiVersion": "v1",
"createdAt": "2026-11-15T05:31:50.412093Z",
"data": {}
}The type field and the X-Webhook-Event header tell events apart. New event types and new fields in data can be added at any time (see Versioning). Ignore fields and event types you do not use. Event names are never renamed or removed.
Each event links to its page in the API reference, which has the full schema. You can also list the types with GET /api/v1/webhook-event-types/.
Catalogue
| Event | When it fires | Also sent to campaign and agent URLs |
|---|---|---|
call.completed | A call ended, with any final status. Sent after post-call analysis. | Yes |
call.failed | A call ended without connecting: busy, no answer or carrier failure. Sent together with call.completed. | No |
call.escalated | The agent transferred the caller to a person. | Yes |
transfer.failed | A transfer to a person did not connect. | If enabled |
callback.scheduled | A callback was booked for a lead. | If enabled |
callback.completed | A booked callback was made. | If enabled |
callback.failed | A booked callback could not reach the lead after its attempts. | If enabled |
lead.created | A lead was added one at a time: through the API, the console's add-lead form or a lead source. Not sent for bulk imports. | No |
lead.updated | A lead was edited in the console or through the API. | No |
campaign.started | A campaign was started. | No |
campaign.completed | A campaign finished dialing every lead. | No |
ticket.created | A support ticket was opened. | No |
ticket.updated | A support ticket changed. | No |
ticket.resolved | A support ticket was resolved. | No |
ticket.reopened | A resolved or closed ticket opened again. | No |
ticket.rated | A customer rated a support ticket. | No |
whatsapp.message.received | A customer sent a WhatsApp message to one of your numbers. | No |
webhook.test | You sent a test event. Cannot be subscribed to. | No |
call.completed and call.failed
call.completed is sent once per call when it ends, answered or not. CallMitra waits about 20 seconds after the call ends so the post-call analysis is ready, and reads the call's data when the first attempt is sent.
call.failed is sent for the same call, at the same time, only when the final status is failed, busy or no_answer. Its data is the same as call.completed. The two events have different ids. Subscribe to call.failed alone if you only want to act on calls that did not connect.
Reference: call.completed, call.failed.
| Field | Type | Description |
|---|---|---|
callId | UUID | The call. Fetch details with GET /api/v1/calls/{call_id}. |
campaignId | UUID or null | The campaign that placed or received the call. |
leadId | UUID or null | The lead called. |
agentId | UUID or null | The agent that handled the call. |
phone | string or null | The lead's phone number, or the dialed number when there is no lead. |
customerNumber | string or null | The number dialed, or the caller's number. |
lead | object or null | id, name, phone, email, company, externalId, and customFields (your custom fields, minus sensitive and archived ones). |
direction | string | outbound or inbound. |
status | string | Final call status, for example completed, no_answer, busy or failed. |
duration | number or null | Talk time in seconds. |
endedReason | string or null | Why the call ended. |
startTime, endTime | string or null | ISO 8601, UTC. |
recordingUrl | string or null | Recording URL. Fetch it with your X-API-Key; see GET /api/v1/calls/{call_id}/recording. |
summary | string or null | AI summary of the conversation. |
transcript | string or null | Full transcript. |
outcome, outcomeCategory | string or null | The agent's detailed outcome and its category. |
merchantOutcome | string | Normalized outcome: qualified, interested, callback, not_interested, no_response, no_answer, busy, call_failed, voicemail, or empty. |
sentiment | string or null | positive, neutral or negative, when analyzed. |
extractedFields | object | Values the agent collected, keyed by the field names set on the agent. |
callAnalysis | object or null | The full post-call analysis. |
recommendedLeadStatus | string or null | Suggested next status for the lead in your CRM. |
crmPayload | object or null | Everything the call stored for your CRM, including the analysis and transfer details. |
providerCallId | string or null | The carrier's call id. |
{
"id": "evt_5f0c6a1e9b2d4c7e8a1f3b5d7c9e0a2b",
"type": "call.completed",
"apiVersion": "v1",
"createdAt": "2026-11-15T05:31:50.412093Z",
"data": {
"callId": "3f2b8c1e-6a4d-4f7e-9b1a-2c5d8e9f0a1b",
"campaignId": "8a7d9c2b-1e3f-4a5b-8c6d-7e8f9a0b1c2d",
"leadId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
"phone": "+919876543210",
"customerNumber": "+919876543210",
"agentId": "5c4b3a29-1807-4f6e-9d8c-7b6a59483726",
"lead": {
"id": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
"name": "Asha Rao",
"phone": "+919876543210",
"email": "",
"company": "",
"externalId": "crm-1042",
"customFields": { "plan": "Gold" }
},
"direction": "outbound",
"status": "completed",
"duration": 94,
"endedReason": "customer-ended-call",
"startTime": "2026-11-15T05:30:12+00:00",
"endTime": "2026-11-15T05:31:46+00:00",
"recordingUrl": "https://api.callmitra.ai/api/v1/calls/3f2b8c1e-6a4d-4f7e-9b1a-2c5d8e9f0a1b/recording",
"summary": "Customer wants to renew the Gold plan and asked for a callback on Monday.",
"transcript": "Agent: Namaste Asha ji…",
"outcome": "callback_requested",
"outcomeCategory": "positive",
"merchantOutcome": "callback",
"sentiment": "positive",
"extractedFields": { "preferredCallbackDay": "Monday" },
"callAnalysis": { "summary": "…" },
"recommendedLeadStatus": "follow_up",
"crmPayload": { "callAnalysis": { "summary": "…" } },
"providerCallId": "CA1234567890abcdef"
}
}call.escalated
Sent when the agent transfers a call to a person, for example a warm transfer to your sales team. The same call still sends call.completed when it ends. If the transfer does not connect, transfer.failed is sent too.
Reference: call.escalated.
| Field | Type | Description |
|---|---|---|
callId, campaignId, leadId, agentId | UUID or null | As for call.completed. |
phone, customerNumber, lead, direction | As for call.completed. | |
transferType | string or null | How the call was handed over, for example cold_pstn, cold_sip or warm_mpc. |
transferTarget | string or null | Where it was transferred to. |
transferStatus | string or null | State of the transfer, for example initiated. |
transferDialStatus | string or null | The carrier's answer for the transfer leg, when known. |
transferReason | string or null | Why the agent escalated. |
endedReason | string or null | Why the call ended. |
providerCallId | string or null | The carrier's call id. |
{
"id": "evt_9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d",
"type": "call.escalated",
"apiVersion": "v1",
"createdAt": "2026-11-15T05:31:02.118540Z",
"data": {
"callId": "3f2b8c1e-6a4d-4f7e-9b1a-2c5d8e9f0a1b",
"campaignId": "8a7d9c2b-1e3f-4a5b-8c6d-7e8f9a0b1c2d",
"leadId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
"phone": "+919876543210",
"customerNumber": "+919876543210",
"agentId": "5c4b3a29-1807-4f6e-9d8c-7b6a59483726",
"lead": { "id": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed", "name": "Asha Rao", "phone": "+919876543210" },
"direction": "outbound",
"transferType": "cold_pstn",
"transferTarget": "+918041234567",
"transferStatus": "initiated",
"transferDialStatus": null,
"transferReason": "Customer asked to speak to a sales manager.",
"endedReason": "transfer_initiated",
"providerCallId": "CA1234567890abcdef"
}
}transfer.failed
Sent when a transfer to a person does not connect.
Reference: transfer.failed.
| Field | Type | Description |
|---|---|---|
callId | UUID | The call. |
leadId, campaignId, agentId | UUID or null | The lead, campaign and agent of the call. |
dialStatus | string or null | The carrier's answer, for example no-answer or busy. |
{
"id": "evt_1d2c3b4a5f6e7d8c9b0a1f2e3d4c5b6a",
"type": "transfer.failed",
"apiVersion": "v1",
"createdAt": "2026-11-15T05:31:20.007311Z",
"data": {
"callId": "3f2b8c1e-6a4d-4f7e-9b1a-2c5d8e9f0a1b",
"leadId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
"campaignId": "8a7d9c2b-1e3f-4a5b-8c6d-7e8f9a0b1c2d",
"agentId": "5c4b3a29-1807-4f6e-9d8c-7b6a59483726",
"dialStatus": "no-answer"
}
}Callback events
callback.scheduled fires when a callback is booked for a lead, for example when the caller asks the agent to call back later. callback.completed fires when the callback call is made. callback.failed fires when the callback could not reach the lead after its attempts. All three have the same data.
Reference: callback.scheduled, callback.completed, callback.failed.
| Field | Type | Description |
|---|---|---|
callbackId | UUID | The callback. |
leadId | UUID | The lead to call back. |
kind | string | callback or reminder. |
campaignId, agentId | UUID or null | The campaign and agent that make the call. |
when | string | The callback time in the lead's time zone, readable, for example Tue 4 Nov, 5:00 PM. |
dialAt | string | The callback time, ISO 8601. |
attempts | integer | Attempts made so far. |
source | string | How it was booked: ai_tool (the agent during a call), analysis, keyword, console, api, csv, rule or handoff. |
note | string | The note saved with the callback. |
{
"id": "evt_4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e",
"type": "callback.scheduled",
"apiVersion": "v1",
"createdAt": "2026-11-15T05:31:40.551902Z",
"data": {
"callbackId": "c2d4e6f8-1a3b-4c5d-8e7f-9a0b1c2d3e4f",
"leadId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
"kind": "callback",
"campaignId": "8a7d9c2b-1e3f-4a5b-8c6d-7e8f9a0b1c2d",
"agentId": "5c4b3a29-1807-4f6e-9d8c-7b6a59483726",
"when": "Mon 17 Nov, 11:00 AM",
"dialAt": "2026-11-17T05:30:00+00:00",
"attempts": 0,
"source": "ai_tool",
"note": "Wants to discuss Gold plan renewal."
}
}lead.created and lead.updated
lead.created fires for leads added one at a time:
createLead;- the console's add-lead form;
- each lead a connected lead source delivers (Meta lead ads, Google Ads lead forms, lead-source webhooks).
It is not sent for:
- spreadsheet imports, campaign lead uploads, or campaigns created with leads;
- leads made automatically for WhatsApp contacts, unknown inbound callers, outbound calls to a new number, or do-not-call entries.
After a bulk import, list the leads with GET /api/v1/leads/ instead of waiting for events.
lead.updated fires when a lead is edited in the console or through the API. Both carry the lead as it is after the change.
Reference: lead.created, lead.updated. To fetch a lead later, use GET /api/v1/leads/{lead_id}.
| Field | Type | Description |
|---|---|---|
id | UUID | The lead. |
name, phone, email, company | string | Contact details. |
externalId | string or null | Your id for this lead, when you sent one. |
customFields | object | Custom field values, minus sensitive and archived fields. |
title | string | The lead's title. |
status | string or null | Pipeline status, for example new. |
source | string | Where the lead came from, as set on the lead. |
leadSourceId | UUID or null | The lead source that created it, if any. |
tags | string[] | Tags. |
assignedToUserId | UUID or null | The user the lead is assigned to. |
callStatus | string or null | Calling state, for example not_called. |
createdAt, updatedAt | string or null | ISO 8601. |
{
"id": "evt_7e6d5c4b3a2f1e0d9c8b7a6f5e4d3c2b",
"type": "lead.created",
"apiVersion": "v1",
"createdAt": "2026-11-15T04:12:08.300114Z",
"data": {
"id": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
"name": "Asha Rao",
"phone": "+919876543210",
"email": "[email protected]",
"company": "",
"externalId": "crm-1042",
"customFields": { "plan": "Gold" },
"title": "",
"status": "new",
"source": "website",
"leadSourceId": null,
"tags": ["renewal"],
"assignedToUserId": null,
"callStatus": "not_called",
"createdAt": "2026-11-15T04:12:08.291004+00:00",
"updatedAt": "2026-11-15T04:12:08.291004+00:00"
}
}campaign.started and campaign.completed
campaign.started fires when a campaign is started. For an inbound campaign, that is when it is turned on. campaign.completed fires when an outbound campaign has dialed every lead.
Reference: campaign.started, campaign.completed.
| Field | Type | Description |
|---|---|---|
campaignId | UUID | The campaign. |
name | string | Campaign name. |
direction | string | outbound or inbound. |
agentId | UUID or null | The campaign's agent. |
startedAt | string or null | When dialing started, ISO 8601. |
completedAt | string | When it finished, ISO 8601. Only on campaign.completed. |
{
"id": "evt_0f1e2d3c4b5a69788796a5b4c3d2e1f0",
"type": "campaign.completed",
"apiVersion": "v1",
"createdAt": "2026-11-15T09:45:00.120044Z",
"data": {
"campaignId": "8a7d9c2b-1e3f-4a5b-8c6d-7e8f9a0b1c2d",
"name": "Gold renewals – November",
"direction": "outbound",
"agentId": "5c4b3a29-1807-4f6e-9d8c-7b6a59483726",
"startedAt": "2026-11-15T04:30:00.004512+00:00",
"completedAt": "2026-11-15T09:45:00.118201+00:00"
}
}Ticket events
| Event | When it fires |
|---|---|
ticket.created | A ticket is opened. |
ticket.updated | A ticket changes: an edit, an assignment, a merge, an SLA breach, or a status change to anything other than resolved. |
ticket.resolved | The status changes to resolved. |
ticket.reopened | A resolved or closed ticket opens again. |
ticket.rated | The customer rates the ticket. |
A reopen sends two events
When a ticket reopens, CallMitra sends ticket.updated (for the status change) and ticket.reopened. If you subscribe to both, handle the reopen in one place. Closing a ticket (status closed) sends ticket.updated.
Reference: ticket.created, ticket.updated, ticket.resolved, ticket.reopened, ticket.rated.
| Field | Type | Description |
|---|---|---|
ticketId | UUID | The ticket. |
ticketRef | string | Short reference shown to the customer, for example T-D4C3B2A1. |
merchantId | UUID or null | Your workspace id. |
leadId | UUID | The customer's lead. |
type | string | support or sales_followup. |
status | string | open, in_progress, waiting_on_customer, resolved or closed. |
priority | string | low, normal, high or urgent. |
subject | string | Subject line. |
description | string or null | Details. |
source | string | Where the ticket came from: manual, inbound_call, outbound_call, import or whatsapp_conversation. |
sourceCallId | UUID or null | The call that created it, if any. |
assignedToUserId | UUID or null | The main assignee. |
assignees | object[] | Every assignee: userId, name, email. |
dueAt, firstResponseAt, resolvedAt, closedAt | string or null | ISO 8601 times. |
csatScore | integer or null | The customer's rating. Set on ticket.rated. |
csatAt | string or null | When the customer rated it. |
version | integer | Goes up by one with each change. Use it to ignore older events that arrive late. |
category, team | object | id and name. Only when the ticket has one. |
tags | string[] | Only when the ticket has tags. |
mergedInto | object | id and ref of the ticket it was merged into. Only after a merge. |
previousStatus | string | The status before the reopen. Only on ticket.reopened. |
reopenedBy | string | What reopened it, for example customer. Only on ticket.reopened. |
Some changes add extra keys that describe the change. Ignore keys you do not know.
{
"id": "evt_6a5b4c3d2e1f0a9b8c7d6e5f4a3b2c1d",
"type": "ticket.resolved",
"apiVersion": "v1",
"createdAt": "2026-11-15T11:02:33.741220Z",
"data": {
"ticketId": "d4c3b2a1-9f8e-4d7c-b6a5-0f1e2d3c4b5a",
"ticketRef": "T-D4C3B2A1",
"merchantId": "2a3b4c5d-6e7f-4a8b-9c0d-1e2f3a4b5c6d",
"leadId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
"type": "support",
"status": "resolved",
"priority": "high",
"subject": "Renewal payment failed",
"description": "Card was charged twice.",
"source": "inbound_call",
"sourceCallId": "3f2b8c1e-6a4d-4f7e-9b1a-2c5d8e9f0a1b",
"assignedToUserId": "9e8d7c6b-5a4f-4e3d-a2c1-b0a9f8e7d6c5",
"assignees": [
{ "userId": "9e8d7c6b-5a4f-4e3d-a2c1-b0a9f8e7d6c5", "name": "Ravi Kumar", "email": "[email protected]" }
],
"dueAt": "2026-11-16T05:30:00+00:00",
"firstResponseAt": "2026-11-15T06:10:00+00:00",
"resolvedAt": "2026-11-15T11:02:33.720018+00:00",
"closedAt": null,
"csatScore": null,
"csatAt": null,
"version": 4,
"category": { "id": "0c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f", "name": "Billing" },
"tags": ["refund"]
}
}whatsapp.message.received
Sent when a customer sends a message to one of your WhatsApp numbers. Each message is sent once, even if WhatsApp reports it twice.
Reference: whatsapp.message.received.
| Field | Type | Description |
|---|---|---|
conversationId | UUID | The conversation. |
phoneId | UUID | Your WhatsApp number that received the message. |
windowOpen | boolean | true while you can send free-form replies. |
serviceWindowExpiresAt | string or null | When the reply window closes, ISO 8601. |
contact | object | id, name, phone, bsuid, username, leadId, optInStatus, tags. |
entrySource | string or null | How the conversation started, when known. |
message.id | UUID | CallMitra's message id. |
message.wamid | string or null | WhatsApp's message id. |
message.type | string | text, image, button, interactive, location and so on. |
message.text | string or null | The text, caption or button label. |
message.payload | object | Extra content for some types, for example location or button_payload. Empty for plain text. Its keys are not converted to camelCase. |
message.hasMedia | boolean | true when the message has a file. |
message.mediaMime, message.mediaFilename | string or null | File type and name. |
message.replyToWamid | string or null | The message this one replies to. |
message.createdAt | string or null | ISO 8601. |
{
"id": "evt_3c2b1a0f9e8d7c6b5a4f3e2d1c0b9a8f",
"type": "whatsapp.message.received",
"apiVersion": "v1",
"createdAt": "2026-11-15T07:20:14.009871Z",
"data": {
"conversationId": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
"phoneId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"windowOpen": true,
"serviceWindowExpiresAt": "2026-11-16T07:20:13+00:00",
"contact": {
"id": "f0e1d2c3-b4a5-4968-8776-655443322110",
"name": "Asha Rao",
"phone": "+919876543210",
"bsuid": null,
"username": null,
"leadId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
"optInStatus": "opted_in",
"tags": []
},
"entrySource": null,
"message": {
"id": "7b8c9d0e-1f2a-4b3c-8d4e-5f6a7b8c9d0e",
"wamid": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAEhgg",
"type": "text",
"text": "Is my renewal done?",
"payload": {},
"hasMedia": false,
"mediaMime": null,
"mediaFilename": null,
"replyToWamid": null,
"createdAt": "2026-11-15T07:20:13.882140+00:00"
}
}
}webhook.test
Sent only when you call POST /api/v1/webhook-endpoints/{endpoint_id}/test. It goes to that one endpoint, whatever its event filter. You cannot subscribe to it.
Reference: webhook.test.
{
"id": "evt_2c4e6a8b0d1f3a5c7e9b1d3f5a7c9e1b",
"type": "webhook.test",
"apiVersion": "v1",
"createdAt": "2026-11-15T05:35:11.810422Z",
"data": {
"endpointId": "7c1e2f4a-9b3d-4e8f-a6c2-1d5b7e9f0a3c",
"message": "This is a test event from Call Mitra."
}
}Managing endpoints
Create, update and delete webhook endpoints, rotate signing secrets, send test events, and use the delivery log to inspect and redeliver events.
Verify signatures
Check the webhook-signature header and timestamp in Node.js, Python, PHP or Go, so you only trust webhooks that CallMitra sent.