Skip to navigation

Validation error

HTTP 422 — Your request parameters did not validate.

Returned as application/problem+json with code validation_error and HTTP status 422.

The request was well-formed, but one or more fields failed validation. The errors array lists each failure by field.

Common causes

  • A required field is missing.
  • A field has the wrong type or an out-of-range value.
  • The cursor parameter is malformed.

How to resolve

  • Inspect errors[], fix the named fields, and resend.
  • Field names use the request’s JSON paths.

Example

{
"type": "https://docs.usglobalmail.com/api/problems/validation_error",
"title": "Your request parameters did not validate.",
"status": 422,
"code": "validation_error",
"request_id": "req_8f3c2a1b9d",
"instance": "/v1/mails",
"errors": [
{
"field": "is_read",
"message": "must be a boolean"
}
]
}
Retrying without changing the request will not help — fix the request first.

See also: Errors.