Skip to main content

Errors and rate limits

Every error response has the same shape, with a stable code your client can switch on:

{
"error": {
"code": "rate_limited",
"message": "Too many requests for this API key",
"retryable": true,
"retry_after_seconds": 60
}
}

Error codes​

CodeHTTPRetry?Meaning
unauthorized401noThe key is missing, malformed, unknown, or revoked.
forbidden403noThe key is valid but does not have the scope this endpoint needs.
invalid_request400noThe body or query failed validation. message says what.
not_found404noNo such conversation for this key's inbox, or it belongs to another user.
conversation_closed409noThe conversation was resolved or closed by the team. Start a new one.
rate_limited429yesWait retry_after_seconds, then retry.
account_inactive402noThe TrolleyChat account's trial ended without a subscription.
upstream_error502yesThe model or a dependency failed. Retry with the same message_id.

Only rate_limited and upstream_error are worth retrying. Retry with backoff and the same message_id, so a reply that was slow rather than failed is never produced twice.

Rate limits​

ScopeLimit
Per API key300 requests per minute
Per user30 conversation starts per minute
Per conversation30 messages per minute

A reply counts as one AI reply against the inbox's plan, the same as a widget reply.