Error codes

The CheckYout API uses standard HTTP status codes and returns structured JSON error responses.

Error format

Most error responses follow this shape:

{
  "error": "Short error description",
  "details": "Optional extra information"
}
FieldTypeDescription
errorstringShort, machine-readable error description. Always present.
detailsstringOptional extra information about the cause.

Validation errors

When the request body has missing or invalid fields, we extend the error response with an issues array of field-level details so you know exactly which entry to fix:

{
  "error": "Validation error",
  "issues": [
    { "path": "phone", "message": "Phone must be in E.164 format (starting with +)", "code": "invalid_string" },
    { "path": "device_id", "message": "Required", "code": "invalid_type" }
  ]
}
FieldTypeDescription
issues[].pathstringDot-separated path to the field in the body (e.g. "phone" or "settings.timezone").
issues[].messagestringHuman-readable description of the problem (in English).
issues[].codestringMachine-readable error code (e.g. "invalid_type", "invalid_string", "too_small").

Which format applies when?

Endpoints with body validation (POST/PATCH/DELETE on /api/v1/*) return the extended format with an issues array on validation failures. Auth, rate-limit, and server errors keep the simpler error format.

HTTP status codes

CodeMeaningTypical causeExample
200OKRequest processed successfully{"success":true,"message_sid":"SM..."}
400Bad RequestValidation failed (see issues array){"error":"Validation error","issues":[…]}
400Bad RequestBody is not valid JSON{"error":"Invalid JSON body"}
401UnauthorizedMissing or invalid API key{"error":"Invalid or missing API key"}
404Not FoundDevice does not exist or does not belong to your account{"error":"Device not found or does not belong to your account"}
429Too Many RequestsRate limit exceeded (e.g. /api/v1/notify: 30/min/IP){"error":"Too many requests"}
500Internal Server ErrorWhatsApp delivery failed{"error":"Failed to send WhatsApp","details":"..."}

Error handling

  • 4xx errors: Check your request — API key, required fields, phone-number format, device assignment.
  • 5xx errors: Server-side issue. Retry the request after a short wait.
  • Always evaluate the HTTP status code and the error field.

Retry strategy

For 5xx errors we recommend a retry with exponential backoff (e.g. 1s, 5s, 30s) and at most 3 attempts.

Next: Changelog