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
| Status | Code | What to do |
|---|---|---|
| 400 | invalid_request | Fix the request. error says what is wrong |
| 400 | invalid_schedule | scheduledAt is in the past or outside chat hours. reason has the detail |
| 401 | invalid_api_key, unauthorized | Check the key |
| 402 | insufficient_credits | Add credits or upgrade in the dashboard |
| 403 | api_plan_required | API access needs an active Pro or Scale plan |
| 403 | session_required | Only available in the dashboard |
| 404 | not_found | The id is wrong, or belongs to another account |
| 409 | conflict | The action does not fit the current state |
| 409 | no_pending_intervention | The chat is not waiting for help |
| 409 | not_scheduled | The chat already started or was cancelled |
| 409 | idempotency_in_progress | The first request with this key is still running. Retry shortly |
| 422 | idempotency_key_reused | The key was used before with a different request. Use a new key |
| 400 | invalid_webhook_url | Webhook addresses must be public and start with https:// |
| 409 | webhook_limit, api_key_limit | You have the maximum number. Remove one first |
| 423 | chat_closed | The retailer's chat is closed. Use nextOpenAt as scheduledAt |
| 424 | proxy_unhealthy | Your proxies are failing. Replace them, then retry |
| 429 | rate_limited | Slow down. Wait the number of seconds in Retry-After |
| 429 | schedule_full | Too many scheduled chats. Cancel some or wait |
| 5xx | server_error, unavailable, upstream_error | Our 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:
| Header | Meaning |
|---|---|
X-RateLimit-Limit | Requests allowed per minute |
X-RateLimit-Remaining | Requests left in the current window |
X-RateLimit-Reset | Seconds until the window resets |
The live stream allows 60 messages a minute per connection.
Other limits
| Limit | Value |
|---|---|
| Chats running at once | 25 on Pro, 50 on Scale. Extra launches queue |
Parallel attempts per launch (agentCount) | 10 |
| Queued chats | 10,000 |
| Scheduled chats | 500 |
| Drafts per create request | 100 |
| Request body | 1 MB |
| CSV upload | 500,000 characters |
| Message length | 2,000 characters |
| API keys | 10 |
| Webhooks | 10 |
| Wait time per request | 50 seconds |
Retrying safely
- Retry
429and5xxresponses, waiting longer each time. - Send an
Idempotency-Keyon 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
4xxresponses without changing the request.