Update a lead
Changes only the fields you send. Send `If-Match` with the lead's `updatedAt` to refuse the write (`lead_changed`) when someone changed the lead after you read it. A new `phone` is stored in E.164 form like on create. Campaign IDs you cannot access are skipped.
Changes only the fields you send. Send If-Match with the lead's updatedAt to refuse the write (lead_changed) when someone changed the lead after you read it. A new phone is stored in E.164 form like on create. Campaign IDs you cannot access are skipped.
X-API-Key<token>Create in the console: Settings → API & webhooks.
lead_id*Lead IdLead ID.
If-Match?string|nullapplication/json- body
Send only the fields to change.
assignedToUserId?|A team member's user ID, or null to unassign.
attributes?|Profile facts to set; a null value clears that fact. Other facts stay.
campaignIds?array<unknown>|Replaces the lead's campaigns: campaigns missing from the list are removed.
company?|Company name.
dismissIssues?array<unknown>|Attribute keys whose kept-aside values (attributeIssues) should be dropped.
email?|Email address.
externalId?||Your business id for this person.
leadSourceId?|ID of a lead source, or empty to clear.
name?|Full name.
notes?|Deprecated: adds one note (never replaces notes). Use POST /leads/{leadId}/notes.
phone?|Phone number, saved in E.164 form: +919876543210, 9876543210 and 098765 43210 all save as +919876543210 (a number without a country code is taken as Indian). A value that is not a phone number returns 422 invalid_phone_number.
source?|Free-text source label.
status?|Pipeline status key.
tags?array<unknown>|Replaces the lead's tags.
timezone?|IANA time zone such as Asia/Kolkata for dial windows.
title?|Job title.
[key: string]?anyOK
application/json- response
The lead after the change.
lead*The lead.
success?SuccessAlways true on a 2xx response.
truewarnings?array<>|Values saved differently than sent (for example an unknown status).
[key: string]?anycurl -X PUT 'https://api.callmitra.ai/api/v1/leads/string' \ -H 'Content-Type: application/json' \ -d '{ "attributes": { "city": "Mumbai" }, "status": "qualified", "tags": [ "vip" ]}'{ "lead": { "assignedToUserId": "string", "assigneeName": "string", "attributeIssues": {}, "attributes": {}, "callAttempts": 0, "callStatus": "string", "campaignCallStatus": {}, "campaignIds": [ "string" ], "campaignNames": [ "string" ], "company": "string", "createdAt": "string", "dncOptOut": true, "dncReason": "string", "dncUpdatedAt": "string", "email": "string", "externalId": "string", "id": "string", "lastCallAttempt": "string", "lastContactDate": "string", "leadSourceId": "string", "merchantOutcome": "string", "name": "string", "nextCallScheduled": "string", "notes": "string", "notesCount": 0, "phone": "string", "pinnedNotePreview": "string", "source": "string", "status": "string", "tags": [ "string" ], "title": "string", "updatedAt": "string" }, "success": true, "warnings": [ { "key": "string", "label": "string", "reason": "string", "value": null } ]}List leads GET
Newest first by default. Page with `page` and `limit`, or for deep lists pass `cursor` (empty first, then `nextCursor`): cursor pages skip the count and stay fast. Without `cursor` matches are counted up to 10,000 unless `includeTotal=true`.
Get a phone number GET
One number with its carrier, call capacity and the agent using it.