Agent Number

Errors

Stable HTTP status codes + machine-readable error codes in the JSON body. Switch on the error field, not on English strings — the prose is for humans, the code is the contract.

Response shape

{
  "error": "stable_machine_code",
  "message": "Free-form human diagnostic. Do not parse."
}

HTTP status codes you should expect

StatusClassWhat it means
200SuccessRequest succeeded; body has the payload.
400ClientBody or query string is malformed.
401AuthMissing, invalid, revoked, or expired bearer token.
402PaymentPayment required. Body carries the challenge.
403AuthToken is valid but doesn't own the resource you're touching.
404ClientPath or referenced ID doesn't exist.
409ConflictState conflict (e.g. number already on a call).
500ServerInternal error. Retry transparently — usually transient.
502ServerHardware-side error. Retry.
503ServerCapacity issue (pool exhausted, hardware busy). Retry with backoff.

Common error codes

CodeHTTPWhere
invalid_request400Body / query missing required fields
unauthorized401Bearer missing or invalid
signature_mismatch401Auth recovery: signature didn't recover the claimed wallet
nonce_invalid401Auth recovery: nonce expired, used, or unknown
no_active_subscription402Wallet has no active subscription
pool_exhausted503No phone numbers currently free
phone_node_error502Upstream hardware unreachable

Retry strategy