Errors
lead_not_on_campaign
Lead is not on this campaign.
| HTTP status | Type | Code |
|---|---|---|
| 404 | not_found_error | lead_not_on_campaign |
What it means
The lead is not an active member of this campaign. Add it with PUT /campaigns/{campaignId}/leads or pick a lead from GET /campaigns/{campaignId}/leads.
How to handle it
Check the ID in the path. It may be wrong, deleted, or belong to another workspace; the API answers 404 rather than revealing other workspaces’ data.
Example response
{
"detail": "Lead is not on this campaign.",
"error": {
"type": "not_found_error",
"code": "lead_not_on_campaign",
"message": "Lead is not on this campaign.",
"param": null,
"docUrl": "https://docs.callmitra.ai/errors/lead_not_on_campaign",
"requestId": "req_3f9c2a7d1b8e4c6a9f0e2d4b6a8c0e1f"
}
}Branch on error.code; it never changes once published. The message text can change. See Errors for the envelope.
Returned by
POST /api/v1/leads/{lead_id}/call-now— Call a lead nowPOST /api/v1/instant/call-now— Call a lead in a campaign nowPOST /api/v1/calls/— Place a call