VALIDATION_FAILED
The request body did not pass validation
One or more fields are missing, malformed, or over a limit. error.errors lists each field with its messages.
- http status
- 422
- credits
- Nothing is billed for a failed request.
What it means
Typical causes: an email longer than 254 characters, more than 50 addresses in a batch or 100,000 in a bulk job, a callback_url that is not https, callback_secret missing or outside 16 to 128 characters, a bulk results variant that is not full, deliverable, risky or undeliverable, or a feedback outcome that is not delivered, bounced or complained.
Nothing runs and nothing is billed. The errors object is keyed by field name, with array items addressed as emails.3.
What to do
Read error.errors, fix the named fields, and resend. Validation rules are listed on each endpoint's reference page.
Example response
{
"success": false,
"error": {
"code": "VALIDATION_FAILED",
"message": "The email field is required.",
"errors": {
"email": [
"The email field is required."
]
},
"request_id": "req_01m1kgdm4xngzmbmff68g94w0c"
}
}Every error carries the request_id also sent in the X-Request-Id header; quote it when writing to support.
Related
markdown version: /docs/errors/VALIDATION_FAILED.md