Errors / invalid_phone_number

Invalid phone number

HTTP 422invalid_requestinvalid_phone_number

The destination could not be read as a real number.

What to do

Send E.164 — a +, the country code, then the number, with no spaces or punctuation: +447400123456. A UK number beginning 07 is assumed to be UK; anything else needs the country code, because 0400123456 is a different number in every country that has one.

What it looks like

{
  "error": {
    "type": "invalid_request",
    "code": "invalid_phone_number",
    "message": "…",
    "doc_url": "https://docs.textmast.com/errors/invalid_phone_number",
    "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.