Act on many leads
Change status, assignee, tags or do-not-call for up to 500 leads, or delete them. IDs outside your workspace are skipped, not reported. `updated` counts the leads that changed.
Change status, assignee, tags or do-not-call for up to 500 leads, or delete them. IDs outside your workspace are skipped, not reported. updated counts the leads that changed.
X-API-Key<token>Create in the console: Settings → API & webhooks.
Idempotency-Key?stringAny unique string up to 255 characters. Retrying with the same key and body within 24 hours returns the first result instead of acting twice.
length <= 255application/json- body
One action applied to up to 500 leads.
action*Actionstatus sets value as the status; assign assigns to user value (empty unassigns); tag / untag add or remove tag value; dnc / undnc set or clear do-not-call (value is the reason); delete deletes the leads.
"status""assign""tag""untag""dnc""undnc""delete"ids*array<>Lead IDs, 1 to 500.
1 <= items <= 500value?|Argument for the action, see action.
OK
application/json- response
How many leads the bulk action changed.
success?SuccessAlways true on a 2xx response.
trueupdated*UpdatedLeads changed. Leads already in the requested state, or not in your workspace, are not counted.
[key: string]?anycurl -X POST 'https://api.callmitra.ai/api/v1/leads/bulk' \ -H 'Content-Type: application/json' \ -d '{ "action": "tag", "ids": [ "6f1c2a9e-3b7d-4c55-9a0e-1d2f3a4b5c6d" ], "value": "vip"}'{ "success": true, "updated": 1}Edit a note PATCH
Send the `version` you read. If someone changed the note since, you get 409 `lead_note_changed` with the current note in `detail.note`. Only the author or a workspace manager can edit a person's note.
Create a lead POST
Creates one lead and optionally adds it to campaigns. The phone is stored in E.164 form (a 10-digit number gets `+91`, as in a CSV upload); a number that cannot be read is refused with `invalid_phone_number`. The number is not checked for duplicates. Values that could not be saved as sent (an unknown status, a mistyped field) come back in `warnings`.