Skip to content

Errors

Every error response from the API uses the appropriate HTTP status and returns a consistent JSON body. Regardless of the error type, the body always contains two fields: error and code.

{
"error": "Invalid or missing API token",
"code": "unauthorized"
}
FieldTypeDescription
errorstringHuman-readable message describing the error (always in English).
codestringStable, machine-readable code. Use this field in your error-handling logic.
codeTypical HTTP statusWhen it happens
invalid_request400Malformed body, missing or invalid fields, or an ID that is not a valid UUID.
unauthorized401Missing, invalid, or revoked token. See Authentication.
forbidden403The token does not have access to that resource.
not_found404Resource does not exist or belongs to another organization.
conflict409The operation conflicts with the current state — for example, editing a knowledge-base item with source='file', or an item that is currently being processed.
rate_limited429Request rate limit exceeded.
internal_error500Unexpected server-side error.

The API returns the following HTTP statuses:

StatusMeaning
200 OKSuccessful request with a response body.
201 CreatedResource created successfully.
202 AcceptedRequest accepted and processing asynchronously.
204 No ContentSuccessful request with no response body (e.g. deletion).
400 Bad RequestInvalid or malformed request data.
401 UnauthorizedMissing or invalid token.
403 ForbiddenValid token, but no permission for that resource.
404 Not FoundResource not found.
408 Request TimeoutTimeout on synchronous chat — the agent did not respond in time.
409 ConflictCurrent resource state prevents the operation.
429 Too Many RequestsRate limit exceeded.
500 Internal Server ErrorUnexpected server-side error.