Skip to Content
CallMitraDocs
API referenceLeads

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.

POST
/api/v1/leads/bulk

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.

Authorization

headerX-API-Key<token>

Create in the console: Settings → API & webhooks.

Header Parameters

Idempotency-Key?string

Any unique string up to 255 characters. Retrying with the same key and body within 24 hours returns the first result instead of acting twice.

Lengthlength <= 255

Request Body

application/json
  1. body

One action applied to up to 500 leads.

action*Action

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

Value in"status""assign""tag""untag""dnc""undnc""delete"
ids*array<>

Lead IDs, 1 to 500.

Items1 <= items <= 500
value?|

Argument for the action, see action.

Response Body

OK

application/json
  1. response

How many leads the bulk action changed.

success?Success

Always true on a 2xx response.

Defaulttrue
updated*Updated

Leads changed. Leads already in the requested state, or not in your workspace, are not counted.

[key: string]?any
Example Request
curl -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"}'
Example Response
{  "success": true,  "updated": 1}