Client behavior

Design clients around explicit failure modes.

Use conventional HTTP status codes, structured error bodies, request IDs, and retry budgets so failures are observable and safe to recover from.

Status codes

StatusMeaningClient action
400Request validation failed.Fix the request before retrying.
401Missing, malformed, or expired credential.Check bearer token, admin key, session cookie, or webhook signature.
404The requested resource was not found.Confirm identifier and tenant boundary.
409The request conflicts with current state.Reload current state and submit a new command.
412A precondition did not match.Fetch the latest version and retry with the current precondition value.
429Rate limit blocked the request.Back off with jitter and respect Retry-After.
500 / 502 / 503Server or provider failure.Retry only if the operation is safe or your workflow is idempotent.

Error response shape

{
  "error": "invalid_request",
  "message": "to must be a valid E.164 phone number",
  "details": {
    "field": "to"
  }
}

Retry guidance

  • Retry 429, 500, 502, and 503 with exponential backoff and full jitter.
  • Do not automatically retry validation, authentication, authorization, or not-found failures.
  • For outbound calling, avoid duplicate calls unless the prior request definitively failed before scheduling.