2xx means success, 4xx means something is wrong with the request, and 5xx means a temporary problem on our side.
Every error has the same JSON body:
string
A stable, machine-readable code. Branch on this in your code.
string
A human-readable explanation. For validation errors it names each invalid field, for example
to: Must be a valid international phone number (E.164). The wording can change, so don’t parse it.A wrong verification code is not an error. Check a code returns
200 with "valid": false.Status codes
Error codes
Authentication
Request
Billing
Channels
Objects
Temporary
Retrying
- Retry
503and500errors with exponential backoff. - Don’t retry
4xxerrors unchanged — fix the request first. - Starting a verification or sending a message isn’t idempotent. A retry after a timeout can send a second message, so check for the first one before you retry if you can.