Why webhooks instead of a CRM app?
#Indian SMBs run on a long tail of systems: Zoho, HubSpot, LeadSquared, a custom PHP panel, and often a Google Sheet the owner trusts more than any of them. A native app would cover a few. Two documented webhook paths cover all of them, either from your own code or through Zapier, Make or n8n. If your system can send an HTTP POST or receive one, it can work with CallMitra.
What does a lead push look like?
#POST flat JSON to the lead webhook URL. Put the key in the X-Lead-Webhook-Key header, or add it as a key query parameter if your tool cannot set headers.
curl -X POST https://api.callmitra.ai/api/v1/webhooks/leads/WEBHOOK_TOKEN \
-H "X-Lead-Webhook-Key: $LEAD_WEBHOOK_KEY" \
-H "Content-Type: application/json" \
-d '{"lead_id":"crm-4471","name":"Farah Khan","phone":"+919812345678","policy_type":"motor","renewal_month":"December"}'
| Field | What CallMitra does with it |
|---|---|
| name, phone, email, company, title | Core lead fields. Phone or email is required. |
| lead_id (or leadId, leadgen_id, id) | Saved as the external ID and used to stop duplicates |
| Any other key with a simple value | Saved as a lead field the agent's script can use |
| is_test: true | Checks the set-up without creating a lead |
Send phones in E.164, such as +919812345678; the number is saved with a + prefix either way. A repeat with the same lead_id returns duplicate: true and creates nothing, so your sender can retry freely. Google Ads and Meta payloads are read as sent, which is why the Google Ads lead forms integration and the fallback route on the Facebook lead ads page need no reshaping.
What the intake endpoint answers
#| Status | Meaning |
|---|---|
| 400 | Bad body, for example no phone and no email |
| 401 | Missing or wrong key |
| 404 | Unknown webhook URL |
| 429 | More than 300 requests a minute from one IP address |
| 500 | Server error, safe to retry |
Regenerating the key stops the old one immediately. Turning off Accept new leads rejects deliveries until you switch it back on.
What comes back after a call?
#Here is an illustrative motor-insurance renewal call and part of the call.completed payload it produces. More insurance scenarios are on our insurance page.
Farah Khan
Call ended · 00:47
Agent: Hello, am I speaking with Farah Khan? This call is recorded. I'm an AI assistant calling from Suraksha Insurance Brokers about your car policy, which is due for renewal in December.
Lead: Yes, this is Farah. I was going to compare quotes first.
Agent: That makes sense. Would it help if an advisor sent you two renewal quotes to compare? I can note the best day to call you.
Lead: Okay. Call me on the 5th, after lunch.
Agent: Done. An advisor will call you on 5 December after 2 pm. Thank you, Farah.
Advisor callback: 5 Dec
Saved to lead · transcript attached
Sample call
Sample call: motor insurance renewal reminder
- On the call
- Agent, Lead
- Length
- About 47 seconds
- Result
- Advisor callback: 5 Dec
Illustrative call in English.
Scroll the phone screen to read the whole call.
{
"type": "call.completed",
"data": {
"status": "completed",
"duration": 74,
"merchantOutcome": "callback",
"sentiment": "neutral",
"summary": "Renewal due in December. Wants two quotes to compare. Callback on 5 Dec after 2 pm.",
"extractedFields": { "wants_quotes": true, "renewal_intent": "comparing" },
"lead": { "externalId": "crm-4471", "name": "Farah Khan" }
}
}
The externalId is the lead_id you sent in, so your receiver finds the CRM record without matching on phone numbers. The full payload also carries the transcript, the call ID, the lead's custom fields and a recording URL that you fetch with your API key. Because a callback was booked, an endpoint subscribed to callback events also gets callback.scheduled.
How do you check that a delivery is genuine?
#Every event is signed. New receivers should verify the webhook-signature header with the Standard Webhooks scheme and the endpoint's whsec_ secret, computed over the raw body bytes, so keep those before your framework parses the JSON. Receivers built for older campaign webhooks can check the X-Signature-SHA256 HMAC instead.
After you rotate a secret, deliveries carry two signatures for 24 hours, so you can switch without dropping events. The webhook-id header stays the same on every retry and redelivery, which makes it the key for skipping duplicates. Our security page covers how workspace data is handled more broadly.
Can the agent reach your system during the call?
#Yes, and that is separate from webhooks. An agent can call your own API mid-call to check an order status or save a booking, one of the actions listed in our features overview. Webhooks move data before and after a call; the API action works while the caller is still on the line.
Want to see a set-up end to end first? Book a demo. The full reference, including every payload field, is in the CallMitra webhook docs.