Errors / validation_failed

Validation failed

HTTP 422invalid_requestvalidation_failed

One or more fields were missing, the wrong type, or outside the allowed range.

What to do

Read error.param for the first field at fault and error.errors for every field at once. The API validates the whole request before rejecting it, so fixing only the field named in param may surface another on the next attempt — fix them all from errors.

What it looks like

{
  "error": {
    "type": "invalid_request",
    "code": "validation_failed",
    "message": "…",
    "param": "phone_number",
    "errors": {
      "phone_number": [
        "…"
      ]
    },
    "doc_url": "https://docs.textmast.com/errors/validation_failed",
    "request_id": "req_01j8xk2p7n4qc3m9v0wz5bt6ay"
  }
}

Quote the request_id if you get in touch. It is on every response, including this one, and it turns a support email into a single log query rather than an archaeology exercise.