Skip to main content
500CallsDocs
Browse the docs

validation_error

Validation error

HTTP status
422
Code
validation_error
Retry?
No

What it means

One or more fields failed validation, or no recipient of a send could be accepted. errors lists each failure with its field path and a code. Nothing was accepted.

What to do

Fix each entry in errors. For a send, each recipient's failure carries a message error code such as invalid_recipient.

Example

Example 422 response
{  "type": "https://docs.messaging.500calls.com/errors/validation_error",  "title": "Validation error",  "status": 422,  "code": "validation_error",  "detail": "No recipient could be accepted. No message was created.",  "request_id": "req_01M3KR6CQ26S90NG2V790GVFTX",  "errors": [    {      "field": "to",      "code": "invalid_recipient",      "message": "Not a valid mobile number."    }  ]}

Returned by

How errors work