HTTP Response Codes
The Botsi API uses standard HTTP status codes. 2xx means success, 4xx means something in your request needs changing, and 5xx means the failure was on Botsi's side.
Success#
Client errors#
These need a change on your side before retrying. Retrying without changing anything produces the same result.
429 is the one exception to "change something first": back off and retry.
Server errors#
A failed Fetch Paywall should fall back, not block
Retrying a 5xx with backoff is correct for events and validation, where the data matters and arriving late is fine.
It is the wrong behavior in front of a user waiting on a Paywall. Serve your baseline variant instead. See AI Pricing Model API.
Error response format#
Errors return a JSON object with a human-readable message and a machine-readable code:
{
"error": "Server Error.",
"code": "internal_server_error"
}Branch on code. It mirrors the status — bad_request, not_found, internal_server_error — so it identifies the class of failure, not the specific cause. The error string carries the detail, and is for humans reading logs rather than for branching on.