Errors
Every error type and error code the Heyllo API returns, with its HTTP status.
Every error response has the envelope described in Errors. The doc_url in an error links to the code's row on this page.
Error types
| Type | HTTP status | Meaning |
|---|---|---|
invalid_request_error | 400 | The request is malformed or not permitted by your contract. Upload and body size errors use 413. |
authentication_error | 401 | The API key is missing or not valid. |
permission_error | 403 | The key can see the object but may not perform this action. |
not_found_error | 404 | The object does not exist or is outside the key's reach. |
conflict_error | 409 | The object is in a state that does not allow this action, or another operation on it is running. |
idempotency_error | 422 | The Idempotency-Key was reused for a different request. |
rate_limit_error | 429 | Too many requests or concurrent replies. Retry after Retry-After. |
quota_exceeded_error | 429 | A monthly quota or a capacity limit is reached. Retrying will not help until the limit changes. |
api_error | 500 | Something failed on Heyllo's side. Some codes use 502 or 503. Retry with backoff. |
Error codes
Branch on code. New codes can be added; treat an unknown code by its type and HTTP status.
| Code | HTTP | Meaning |
|---|---|---|
parameter_invalid | 400 | A field is missing, has the wrong type or is out of range. param names the field. |
json_invalid | 400 | The request body is not valid JSON. |
content_type_invalid | 400 | The body was not sent with Content-Type: application/json. |
payload_too_large | 413 | The JSON body is over 1 MB, or uploaded files are over 25 MB in total. |
api_version_invalid | 400 | The Heyllo-Version header names a version that does not exist. |
idempotency_key_required | 400 | This endpoint requires an Idempotency-Key header. |
idempotency_key_invalid | 400 | The Idempotency-Key is not 1 to 255 printable ASCII characters. |
cursor_invalid | 400 | The pagination cursor is not valid for this list. |
period_invalid | 400 | The usage period is not in YYYY-MM form. |
model_not_allowed | 400 | The model is not enabled for your organisation or is not available. |
tool_not_allowed | 400 | The tool (web_search or send_email) is not enabled for your organisation. |
domain_invalid | 400 | An entry in allowed_domains is not a valid hostname. |
url_invalid | 400 | The webhook URL is not https, points to a private or local address, contains credentials or uses a disallowed port. |
scope_not_allowed | 400 | Workspace- or bot-bound keys cannot hold workspaces:write or keys:manage. |
bot_workspace_mismatch | 400 | The bot given for a new key is not in the given workspace. |
ip_allowlist_invalid | 400 | An ip_allowlist entry is not an IP address or CIDR range. |
expires_at_invalid | 400 | expires_at is not in the future. |
multipart_invalid | 400 | The upload is not valid multipart/form-data. |
files_missing | 400 | No files were sent in the files field. |
too_many_files | 400 | More than 10 files were sent in one request. |
file_type_unsupported | 400 | A file has an unsupported type. See Knowledge for the supported types. |
knowledge_rejected | 400 | The knowledge content was rejected during ingestion. Check its size and format. |
invalid_api_key | 401 | The key is missing, malformed, unknown, expired or revoked, or its organisation is not active. Deliberately generic. |
missing_scope | 403 | The key does not have the scope this endpoint requires. |
ip_not_allowed | 403 | The key has an IP allowlist and the request came from another address. |
scope_escalation | 403 | A new key can only have scopes the creating key has. |
key_bound | 403 | Workspace- or bot-bound keys cannot create or delete workspaces or change a workspace's status. |
key_bound_to_bot | 403 | The key is limited to one bot and cannot create bots. |
workspace_suspended | 403 | The bot or conversation belongs to a suspended workspace. |
feature_disabled | 403 | Webhooks are not enabled for your organisation. |
resource_missing | 404 | The object does not exist, or is outside the key's organisation, environment or binding. |
request_in_progress | 409 | A request with the same Idempotency-Key is still running. |
conversation_busy | 409 | A reply is already being generated in this conversation. Retry once it finishes. |
workspace_exists | 409 | Another workspace already has this external_id. |
handoff_active | 409 | A human agent is already handling this conversation. |
handoff_inactive | 409 | The conversation has no open handoff, or the handoff has not been accepted yet. |
key_revoked | 409 | A revoked key cannot be rotated. |
idempotency_key_reused | 422 | The Idempotency-Key was already used with a different method, path or body. |
rate_limited | 429 | Too many requests, or too many failed authentication attempts. Wait for Retry-After. |
concurrency_limit | 429 | Your organisation is generating too many replies at once. Wait for Retry-After. |
monthly_message_limit | 429 | Your organisation has used its monthly message allowance. |
monthly_cost_limit | 429 | Your organisation has reached its monthly model spend limit. |
monthly_ingest_limit | 429 | Your organisation has used its monthly ingestion allowance, or this content would exceed it. |
test_token_limit | 429 | Test keys have used the monthly test token allowance set for your organisation. Live keys are not affected. |
workspace_limit | 429 | Your organisation already has its maximum number of workspaces. |
bot_limit | 429 | The workspace already has its maximum number of bots. |
endpoint_limit | 429 | The environment already has 20 webhook endpoints. |
internal_error | 500 | Something failed on Heyllo's side. Retry with backoff and quote the request_id if it persists. |
upstream_unavailable | 503 | A Heyllo service is temporarily unavailable. Retry with backoff. Returned as 502 when a synchronous reply fails this way. |
generation_failed | 502 | The assistant could not produce a reply. Sent as a stream error event, or as 502 in sync mode. |
turn_timeout | 502 | The reply did not finish within the 120-second turn limit. Sent as a stream error event, or as 502 in sync mode. |
api_disabled | 503 | The API is temporarily unavailable. |