Skip to content

Webhooks for developers

Webhooks: connect CallMitra AI calls to your CRM and any software

Use CallMitra webhooks to push leads in from any form or CRM and send call summaries, transcripts and outcomes out. Signed, retried, built for Indian teams.

By Updated
Webhooks
CallMitra logoCallMitra
Call resultsMissed callsHandoffsCallbacks

In short

CallMitra has two kinds of webhooks. Lead webhooks let any form, CRM, Zapier, Make or n8n flow add leads with one HTTP POST. Event webhooks send signed call, lead, campaign, ticket and WhatsApp events to your server, including summaries, transcripts and collected fields. Together they connect CallMitra to any CRM without a native app.

Best fit for

  • Zoho, HubSpot or LeadSquared users
  • In-house CRMs and PHP panels
  • Google Sheets as a lead list
  • Zapier, Make and n8n flows
  • Website and landing page forms
Leads in by POST, signed events out to your server
2 directions
Event endpoints per workspace
20 endpoints
Retries over about 17 hours for a failed delivery
12 attempts
Delivery log with one-click redelivery
30 days

Set-up

Set up both directions

The first three steps bring leads in. The last three send results out. You can do either half on its own.

  1. 1

    Create a lead webhook

    Leads → Integrations → Webhooks and Google Sheets. Copy the URL, the key and the ready curl command.

  2. 2

    Post a test lead

    Run the curl command or send is_test: true from your tool. The drawer shows test received.

  3. 3

    Decide who calls

    Map an active auto-dial campaign, or add an auto-call rule matching source webhook. Rules start switched off.

  4. 4

    Add an event endpoint

    Settings → Developers → Webhooks. Enter your HTTPS URL and pick events, or leave the list empty for all.

  5. 5

    Store the signing secret

    It is shown once. Keep it in your secret store and use it to verify every delivery.

  6. 6

    Send a test event

    Send test event posts a signed webhook.test to your URL and shows your server's answer.

How data moves

Your system on both ends of every call

A lead goes in with your own ID, the agent calls it, and the result comes back with that ID so your receiver updates the right record.

  1. Your form or CRM

    Flat JSON with lead_id

  2. Lead webhook

    X-Lead-Webhook-Key header

  3. CallMitra agent call

    Inside the campaign window

  4. Signed event

    call.completed, about 20 s after

  5. Your CRM updated

    Matched on externalId

What works with Webhooks

Events you can subscribe to

Subscribe each endpoint to the events it needs. One call can notify several endpoints.

  • Call results

    call.completed carries summary, transcript, outcome, sentiment and collected fields.

  • Missed calls

    call.failed fires on busy, no answer or a carrier failure, so you can retry from your side.

  • Handoffs

    call.escalated when the agent transfers to a person; transfer.failed when that does not connect.

  • Callbacks

    callback.scheduled, completed and failed track every callback the agent books.

  • Lead changes

    lead.created for leads added one at a time, lead.updated for edits.

  • Campaigns

    campaign.started and campaign.completed, when a campaign begins and when every lead is dialled.

  • Tickets

    ticket.created, updated, resolved, reopened and rated for support follow-up.

  • WhatsApp messages

    whatsapp.message.received when a customer writes to one of your WhatsApp numbers.

Good to know

Delivery rules your receiver must follow

Build for these once and deliveries stay reliable.

  • Answer in 10 seconds

    Return any 2xx within 10 seconds and do slow CRM work afterwards. Redirects count as failures.

  • Expect repeats

    The same event can arrive twice and out of order. Store the webhook-id and skip ones you have handled.

  • Auto-disable

    An endpoint switches off after 20 failures in a row and 24 hours without a success. The workspace is alerted once.

  • Public HTTPS only

    Endpoints must be https URLs on a public host. Private or local addresses fail at once.

  • Bulk imports are silent

    CSV uploads do not send lead.created. Only leads added one at a time do.

  • No native CRM apps

    There is no HubSpot, Zoho, Salesforce or Shopify app. Every CRM connects through these webhooks.

On this page

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"}'
FieldWhat CallMitra does with it
name, phone, email, company, titleCore 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 valueSaved as a lead field the agent's script can use
is_test: trueChecks 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

#
StatusMeaning
400Bad body, for example no phone and no email
401Missing or wrong key
404Unknown webhook URL
429More than 300 requests a minute from one IP address
500Server 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

  1. 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.

  2. Lead: Yes, this is Farah. I was going to compare quotes first.

  3. 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.

  4. Lead: Okay. Call me on the 5th, after lunch.

  5. 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.

Frequently asked questions

Short answers to what teams ask before they switch on AI calling.

Is there a native HubSpot, Zoho or Salesforce app?

No. CallMitra connects to CRMs through webhooks. A lead webhook brings leads in, and an event webhook sends call results out, either straight to your code or through Zapier, Make or n8n.

What do I need to send a lead to CallMitra?

A POST request with flat JSON to your lead webhook URL, with the key in the X-Lead-Webhook-Key header. The lead needs at least a phone number or an email address.

How soon after a call does the call.completed event arrive?

About 20 seconds after the call ends. CallMitra waits so the summary, outcome and collected fields are ready in the payload.

What if my server is down when an event is sent?

CallMitra retries up to 12 times over about 17 hours, with growing gaps. After that you can redeliver the event from the delivery log for 30 days.

How do I know a webhook really came from CallMitra?

Each event is signed. Verify the webhook-signature header using the Standard Webhooks scheme and your endpoint's secret, or check the X-Signature-SHA256 HMAC of the raw body.

Can I use Google Sheets as a lead source?

Yes, through the webhook. Use an Apps Script or an automation tool to POST new rows to your lead webhook URL, and each row becomes a lead.

Do bulk CSV uploads send lead.created events?

No. lead.created fires for leads added one at a time, through the API, the console form or a lead source. Bulk imports do not send it.