Errors
invalid_phone_number
The phone number is not valid.
| HTTP status | Type | Code |
|---|---|---|
| 422 | invalid_request_error | invalid_phone_number |
What it means
Send the number in E.164 format: a leading +, the country code, then the number, for example +919812345678.
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": [
{
"type": "missing",
"loc": [
"body",
"phone"
],
"msg": "Field required"
}
],
"error": {
"type": "invalid_request_error",
"code": "invalid_phone_number",
"message": "The phone number is not valid.",
"param": "phone",
"docUrl": "https://docs.callmitra.ai/errors/invalid_phone_number",
"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/calls/— Place a callPOST /api/v1/leads/— Create a leadPUT /api/v1/leads/{lead_id}— Update a lead