Skip to main content

Error Response Format

All errors follow a consistent envelope format:

Error Codes

CodeDescription
VALIDATION_INVALID_BODYThe request body failed schema validation. Check the details field for specific field errors.
VALIDATION_INVALID_JSONThe request body is not valid JSON.
CHAT_RETRY_NO_USER_MESSAGEThe retry target message has no preceding user message to re-send.
AUTH_MISSING_API_KEYNo Authorization header was provided.
AUTH_INVALID_API_KEYThe API key is not valid.
AUTH_EXPIRED_API_KEYThe API key has expired. Generate a new one from the dashboard.
CHAT_CREDITS_EXHAUSTEDThe workspace’s message credit balance is zero. Upgrade the plan or wait for credits to reset.
CHAT_AGENT_CREDITS_EXHAUSTEDThe specific agent’s credit allocation has been used up.
SUBSCRIPTION_API_RESTRICTED_PLANYour current plan does not include API access. A Standard Plan or above is required.
AUTH_INSUFFICIENT_PERMISSIONSThe API key does not have the required permissions for this operation.
CHAT_MODEL_NOT_ALLOWEDThe agent is configured to use a model that is not available on the current plan.
CHAT_CONVERSATION_MISMATCHThe conversation does not belong to the specified agent.
CHAT_CONVERSATION_NOT_ONGOINGThe conversation has ended or been taken over and cannot receive new messages.
RESOURCE_NOT_FOUNDThe requested resource does not exist.
RESOURCE_TOOL_CALL_NOT_FOUNDNo pending client action matches the provided toolCallId. It may have expired or already been resolved.
RESOURCE_MESSAGE_NOT_FOUNDThe specified message was not found in the conversation.
RESOURCE_MESSAGE_NOT_ASSISTANTOnly assistant messages support feedback and metadata updates.
CHAT_RETRY_MESSAGE_NOT_FOUNDThe message ID provided for retry was not found in the conversation.
RATE_LIMIT_TOO_MANY_REQUESTSRate limit exceeded. Check the Retry-After header for how long to wait. See Authentication for details.
INTERNAL_SERVER_ERRORAn unexpected error occurred. If this persists, contact support with the x-request-id header value.
CHAT_STREAMING_ERRORAn error occurred during stream generation. The stream may have been partially delivered.
SOURCE_NOT_FOUNDSource doesn’t exist, belongs to a different agent, or has been permanently deleted.
SOURCE_TYPE_NOT_SUPPORTEDAttempting to update a notionPage via PUT. Manage Notion sources through the dashboard integration.
SOURCE_PENDING_DELETIONSource has toBeDeleted status. Restore it before making edits.
SOURCE_NOT_RESTORABLERestore was called on a source that is not in toBeDeleted state.
SOURCE_LINK_LIMIT_EXCEEDEDThe 15 crawl/sitemap-parent limit per agent has been reached on create or restore.
SOURCE_SIZE_LIMIT_EXCEEDEDCreating or updating this source would exceed the plan’s storage limit.
SOURCE_DUPLICATEA link source with this URL and linkType already exists for this agent.
SOURCE_URL_IMMUTABLEA link’s URL cannot be changed via PUT. Delete and recreate the source to use a different URL.
Example with field-level details (VALIDATION_INVALID_BODY):

Handling Errors