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

1{
2 "type": "https://docs.usglobalmail.com/api/problems/validation_error",
3 "title": "Your request parameters did not validate.",
4 "status": 422,
5 "code": "validation_error",
6 "request_id": "req_8f3c2a1b9d",
7 "instance": "/v1/mails",
8 "errors": [
9 {
10 "field": "is_read",
11 "message": "must be a boolean"
12 }
13 ]
14}
Retrying without changing the request will not help — fix the request first.

See also: errors.