Errors

Every error is JSON with a stable type, a message, a fix saying what to do next, a docs_url and a request_id. Branch on type; show or act on fix.

{
  "error": {
    "type": "rate_limited",
    "message": "Too many verifications for this destination. Try again in 42 seconds.",
    "fix": "Wait for the number of seconds in retry_after before sending again.",
    "docs_url": "https://authtext.com.au/docs/errors/rate_limited.md",
    "request_id": "req_01JD3XA7Q2M7Q8R5T6V1W0XYZA",
    "retry_after": 42
  }
}

To see one in test mode, send to +61400000003 with a test key.

Type Status Fix
invalid_request 400 Correct the field named in the message and send the request again.
invalid_api_key 401 Send a valid key in the Authorization header as 'Bearer at_test_...' or 'Bearer at_live_...'.
insufficient_balance 402 Ask the account owner to top up in the dashboard under Billing, or use an at_test_ key, which is free and sends nothing.
insufficient_scope 403 Use a key that has the scope named in the message, or ask the account owner to create one.
destination_not_allowed 403 Send to an Australian mobile number, or ask the account owner to enable the destination country.
account_suspended 403 Ask the account owner to resolve the billing or abuse hold in the dashboard.
live_scope_required 403 Ask the account owner to turn live sending on for this agent key, with a daily cap, in the dashboard under API keys, or remove 'live' from the request to keep working in test mode.
not_found 404 Check the path and use the id returned by POST /v1/verifications with the same account's key.
already_completed 409 Treat the user as verified if a check already returned approved; otherwise start a new verification.
idempotency_conflict 409 Use a new Idempotency-Key for a new request, or retry the identical request in a few seconds.
rate_limited 429 Wait for the number of seconds in retry_after before sending again.
daily_cap_reached 429 Wait until the cap resets at midnight UTC, or ask the account owner to raise the cap.
internal_error 500 Retry in a few seconds, and quote the request_id if you contact support.
delivery_unavailable 503 Retry in a minute; nothing was sent and nothing was billed.

A wrong code is not an error. The check call returns 200 with status denied and the attempts left.

This page as markdown, for an AI agent: /docs/errors.md