Skip to content
API docsOpen the app
ContentsRate limits and errors

Rate limits and errors

Errors have one shape and stable codes, so your code can branch on the code and show people the message.

Error shape#

Every error answers JSON { "error": "<code>", "message": "<one English sentence>" }. Branch on error; the message may change. A hidden chat, an id from another workspace and a malformed id all answer 404 not_found, the same way.

Rate limits#

  • Each key may make 600 requests per minute.
  • Failed key lookups are limited per address.
  • Replay: 10 per minute per webhook endpoint.
  • Connect sessions: 30 per minute per key and 200 per day per workspace.

Over a limit, Wagent answers 429 rate_limited with a Retry-After header in seconds. Wait that long, then retry with the same Idempotency-Key.

Error codes#

Error codes
CodeStatusMeaning
unauthorized401The API key is missing, unknown, revoked or not valid for this workspace.
ip_not_allowed403This address is not on the agent's allowed addresses.
read_only_key403This key is read only, so it cannot change anything.
agents_paused403Agents are paused by the workspace owner.
agent_off423This agent is switched off by the workspace owner.
approvals_off403Approving through the API is off for this agent.
own_item403A key cannot approve its own agent's items.
tool_off403The workspace owner has not turned this tool on for this agent.
trial_limit403This number reached its trial limit.
blocked403The owner's rules do not allow this.
not_found404Not found.
invalid400The request is not valid.
idempotency_key_required400Send an Idempotency-Key header (1 to 255 visible ASCII characters) with every write.
idempotency_key_mismatch422This Idempotency-Key was already used with a different request.
idempotency_in_progress409A request with this Idempotency-Key is still running. Retry shortly.
already_requested409This request was already made.
widget_unavailable409This workspace cannot connect numbers through the widget until it has an active plan.
session_expired410This connect session is used, expired or not valid. Ask the app for a new one.
origin_not_allowed403This site is not on the publishable key's allowed sites.
not_pending409This item is no longer waiting.
event_sending409This event is being delivered right now. Retry in a few seconds.
rate_limited429Too many requests. Retry after the time in Retry-After.
send_failed502WhatsApp did not accept the message. Nothing was delivered.
unavailable503Wagent could not complete this request, so nothing was done. Try again shortly.

Each operation in the API reference lists the codes it can answer.