Errors
bad_request
The request could not be processed.
| HTTP status | Type | Code |
|---|---|---|
| 400 | invalid_request_error | bad_request |
What it means
The request was malformed or asked for something the resource does not allow in its current state. Read the message, correct the request, and try again.
How to handle it
Fix the request before sending it again; retrying the same request returns the same error. error.param names the offending field when there is one.
Example response
{
"detail": "The request could not be processed.",
"error": {
"type": "invalid_request_error",
"code": "bad_request",
"message": "The request could not be processed.",
"param": null,
"docUrl": "https://docs.callmitra.ai/errors/bad_request",
"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/dnc— Add numbers to do-not-callPOST /api/v1/tickets/{ticket_id}/activities— Add a note to a ticketPOST /api/v1/leads/bulk— Act on many leadsPOST /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/agents/— Create an agentPOST /api/v1/calls/— Place a callPOST /api/v1/campaigns/— Create an empty campaignPOST /api/v1/campaigns/create-with-leads— Create a campaign with its leadsPOST /api/v1/leads/— Create a leadPOST /api/v1/leads/{lead_id}/notes— Add a notePOST /api/v1/tickets/— Create a ticketPOST /api/v1/webhook-endpoints/— Create a webhook endpointPOST /api/v1/agents/import— Import an agent from another platformGET /api/v1/campaigns/— List campaignsGET /api/v1/leads/{lead_id}/notes— List a lead's notesPOST /api/v1/whatsapp/messages— Send a WhatsApp messagePOST /api/v1/campaigns/{campaign_id}/start— Start a campaignPUT /api/v1/campaigns/{campaign_id}— Update a campaignPUT /api/v1/leads/{lead_id}— Update a lead