Errors and limits

Error shape

Every error is JSON with a message for people and a code for programs:

{ "error": "You are out of credits. Upgrade your plan or buy a top-up to keep running agents.", "code": "insufficient_credits" }

Branch on code. The wording of error may change.

Codes

StatusCodeWhat to do
400invalid_requestFix the request. error says what is wrong
400invalid_schedulescheduledAt is in the past or outside chat hours. reason has the detail
401invalid_api_key, unauthorizedCheck the key
402insufficient_creditsAdd credits or upgrade in the dashboard
403api_plan_requiredAPI access needs an active Pro or Scale plan
403session_requiredOnly available in the dashboard
404not_foundThe id is wrong, or belongs to another account
409conflictThe action does not fit the current state
409no_pending_interventionThe chat is not waiting for help
409not_scheduledThe chat already started or was cancelled
409idempotency_in_progressThe first request with this key is still running. Retry shortly
422idempotency_key_reusedThe key was used before with a different request. Use a new key
400invalid_webhook_urlWebhook addresses must be public and start with https://
409webhook_limit, api_key_limitYou have the maximum number. Remove one first
423chat_closedThe retailer's chat is closed. Use nextOpenAt as scheduledAt
424proxy_unhealthyYour proxies are failing. Replace them, then retry
429rate_limitedSlow down. Wait the number of seconds in Retry-After
429schedule_fullToo many scheduled chats. Cancel some or wait
5xxserver_error, unavailable, upstream_errorOur side or the retailer's. Retry with the same Idempotency-Key

Rate limits

120 requests per minute per account, shared by all your keys and the dashboard. Every response includes:

HeaderMeaning
X-RateLimit-LimitRequests allowed per minute
X-RateLimit-RemainingRequests left in the current window
X-RateLimit-ResetSeconds until the window resets

The live stream allows 60 messages a minute per connection.

Other limits

LimitValue
Chats running at once25 on Pro, 50 on Scale. Extra launches queue
Parallel attempts per launch (agentCount)10
Queued chats10,000
Scheduled chats500
Drafts per create request100
Request body1 MB
CSV upload500,000 characters
Message length2,000 characters
API keys10
Webhooks10
Wait time per request50 seconds

Retrying safely

  • Retry 429 and 5xx responses, waiting longer each time.
  • Send an Idempotency-Key on every request that launches or creates something, and reuse the same key when you retry that request. You will never start a chat twice.
  • Do not retry other 4xx responses without changing the request.