Skip to content

Errors

Every non-2xx Service API response uses the same envelope:

{
"error": {
"code": "not_found",
"message": "Not found.",
"requestId": "3f0c1a52-7d0e-4b8e-9a51-2c7f6d1e9b44"
}
}
  • code is always one of the codes in the table below — build your error handling on code, not on message.
  • requestId is a unique id for this request. If an error persists, quote it to support; it identifies exactly what happened on our side.
  • details is present on some 4xx errors and carries structured, code-specific information that helps you fix the request (see below). Server-side errors (5xx) never carry details and always use a generic message.
  • A resource that belongs to another project or organization returns the same 404 not_found as a resource that doesn’t exist, so a key can never learn whether someone else’s resource exists.

When request parameters or the body fail validation, details.issues lists what to fix:

{
"error": {
"code": "invalid_request",
"message": "Request validation failed",
"requestId": "…",
"details": { "issues": [{ "in": "params", "path": "/id", "message": "Invalid cuid" }] }
}
}

in is body, params, or querystring; path is a JSON pointer into that part of the request.

CodeHTTPWhen
unauthorized401Missing, invalid, or revoked API key.
forbidden403The key itself isn’t allowed here — a publishable key, or a key whose scope can’t call this endpoint.
not_found404The resource doesn’t exist or belongs to a different project or organization — including when a body field (not just the URL) names another project’s resource. Also returned for an unknown path.
invalid_request400The request body or parameters failed validation, or the body isn’t valid JSON.
payload_too_large413The request body, or a flow configuration inside it (limit 256 KiB), is too large.
secret_keys_not_mintable400POST /v1/projects/{projectId}/keys was called with keyType: "secret" — only publishable keys can be minted this way.
not_yet_supported501Reading or writing the design of a simple-kind Conversation — not yet available through this API.
unsupported_step501The stored design uses a step kind this API doesn’t yet expose. Edit the conversation in the dashboard instead.
invalid_transition422A Conversation Design write names a target step id that isn’t in the document.
invalid_route_option422A route step option has only one of title/description, or neither that pair nor a target.
invalid_layout_ref422A layout entry names a step id that isn’t in the document.
unknown_integration_ref422A design write references an integration id the project doesn’t have.
integration_kind_mismatch422A design’s integration reference kind doesn’t match the integration’s actual kind.
design_invalid422The saved design was rejected by server-side validation. details.issues is an array of { stepId, message }.
flow_schema_invalid422A simple flow configuration was rejected — an unknown field, a wrong type, or a value that doesn’t match the published flow format. details.issues is an array of { path, message }.
ai_disclosure_required422A changed greeting or recording-consent line doesn’t clearly disclose that the caller is speaking with an AI.
simple_agent_invalid422A Simple-project agent update was rejected (for example a locked skill or an invalid skill setting).
plan_limit_exceeded422 (saving a design) / 403 (elsewhere)Over a plan limit (conversation size, number of conversations/knowledge bases/phone numbers). details includes the limit, current usage, and plan.
cannot_revoke_current_key409POST /v1/keys/{id}/revoke was called with the same key that’s authenticating the request.
usage_unavailable501 / 503501: usage reporting is not available on this API yet. 503: live usage data is temporarily unavailable — retry.
validation_unavailable503Validation is temporarily unreachable — nothing was written; retry.
agent_config_unavailable503Simple-project agent configuration is temporarily unavailable — nothing was written; retry.
kb_query_unavailable503Knowledge base search is temporarily unavailable — retry.
internal_error500 / 502An unexpected failure on our side. Safe to retry after a short delay; if it persists, report it with the requestId.