Skip to Content
CallMitraDocs
API referenceLead intake webhook

Push a lead

Send the integration key in `X-Lead-Webhook-Key` (or as `?key=`). Limited to 300 requests per minute per IP. Errors return `{"success": false, "error": "..."}`.

POST
/api/v1/webhooks/leads/{webhook_token}

Send the integration key in X-Lead-Webhook-Key (or as ?key=). Limited to 300 requests per minute per IP. Errors return {"success": false, "error": "..."}.

Authorization

headerX-Lead-Webhook-Key<token>

The key of a lead integration.

Path Parameters

webhook_token*Webhook Token

The token in your integration's URL.

Request Body

application/json
  1. body

Any other top-level fields are kept on the lead as additional data. Phone or email is required.

company?string
email?string
is_test?boolean

Check the connection without creating a lead.

lead_id?string

Your ID for this lead. A repeat with the same ID is ignored. Without it, repeats are recognised by phone, email and name.

name?string
phone?string

Phone number, for example +919876543210. Saved in E.164 form when it parses (no country code means India); otherwise saved as sent.

title?string
[key: string]?any

Response Body

OK

application/json
  1. response

What happened to a pushed lead. Errors use the LeadIntakeError shape instead.

campaignAttached?|

The lead was added to the integration's campaign and will be called.

duplicate?|

Present and true when this lead_id was already received; nothing was created.

externalLeadId?|

Your ID for the lead, as received (lead_id).

leadId?|

ID of the new lead.

message?|

Human-readable note, sent with test requests.

success?|

True when the lead was saved, already received, or a test.

test?|

Present and true for an is_test request; nothing was created.

[key: string]?any
Example Request
curl -X POST 'https://api.callmitra.ai/api/v1/webhooks/leads/string' \  -H 'Content-Type: application/json' \  -d '{  "city": "Pune",  "email": "[email protected]",  "lead_id": "form-8812",  "name": "Asha Rao",  "phone": "9876543210"}'
Example Response
{  "campaignAttached": true,  "externalLeadId": "form-8812",  "leadId": "5a1d2c3b-4e5f-4a6b-8c7d-9e0f1a2b3c4d",  "success": true}