Skip to content

Error codes

All errors returned by the gateway (admin API and inference endpoints) follow a consistent JSON structure.


Error response format

{
  "error": {
    "code": "invalid_request",
    "message": "Human-readable detail about what went wrong"
  }
}

The code field is a stable machine-readable string. The message is informational and may change between releases. Always branch logic on code, not message.

Anthropic-native routes (/v1/messages, /v1/messages/count_tokens)

A refusal the gateway itself authors on an Anthropic-native route is written in the Anthropic error shape, so an Anthropic SDK parses it. The gateway code stays available as error.code on every such gateway-authored body or frame, without exception (the context-window overflow 413 context_overflow, a failed leg after a tool round, a stream cut by the provider, and a refused tool-call or number encoding included):

{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "message": "Human-readable detail about what went wrong",
    "code": "duplicate_key"
  }
}

The HTTP status, the X-AIG-Error header and X-Request-Id are the same as on every other route. error.type follows the status: 400 invalid_request_error, 401 authentication_error, 402 billing_error, 403 permission_error, 404 not_found_error, 409 conflict_error, 413 request_too_large, 429 rate_limit_error, 503 and 529 overloaded_error, 504 timeout_error, any other 4xx invalid_request_error, any other 5xx api_error. The one addition is the start-up 503 (error.code: service_starting, error.type: overloaded_error), which also carries a top-level "code": "service_starting" next to type and error; every other Anthropic-native error has exactly the envelope shown. A streaming request refused before the first byte answers this JSON body; a failure after the stream has started is one event: error frame with the same envelope. Errors a provider returns are relayed unchanged, with the provider's own keys and no error.code: a provider HTTP error before the response has started, and a provider event: error inside a relayed native stream. A provider failure on a stream the gateway has already opened itself (a buffered tool or code-interpreter leg) arrives as the gateway event: error frame described above, with error.code. Every other route (/chat/completions, /responses, /embeddings, the admin API) keeps the format above. A request refused by the web server before it reaches the gateway (a body over the size limit) still uses the format above.

JSON responses from the Admin API (including its authentication, monitoring and public share-link routes) and from every other JSON endpoint of the gateway (SCIM, the partner API, the chat bridge, MCP proxy and its OAuth endpoints, workflow, scheduler, ingest and webhook-trigger routes, form upload, scrub preview, direct document AI, knowledge search) write every number with all its digits (a stored 9007199254740991 is returned as 9007199254740991). Responses are byte-identical to the previous format unless a body holds a number that needs more than 14 significant digits, or a whole number of magnitude 1e14 or more. A whole number from 1e14 up to 2^63 (9223372036854775807) is written as plain digits (100000000000000 instead of 1e+14); a larger whole number keeps exponent form with all its significant digits (9.223372036854776e+18), because readers clamp a larger plain integer. Negative zero is still written -0. If a response body cannot be written as JSON at all, the route answers 500 with { "error": "internal error", "code": "response_encode_failed" } instead of a truncated or empty body; the cause is logged server-side. Protocol endpoints answer in their own error shape instead: SCIM with an RFC 7644 error document at 500, the MCP proxy with a JSON-RPC -32603 error, the OAuth endpoints with { "error": "server_error" } at 500. The write that preceded it, if any, is not undone: re-read the resource before repeating the request. Values the gateway stores (entitlement parameters, the tenant guardrail baseline, agent task envelopes, workflow graphs, share snapshots, edited chat messages, the MCP connector selection of a conversation, protection pause evidence, response-cache entries, semantic-cache embeddings, the prompt text of a request-log row, a compliance report snapshot, the cached model prices, the cached plan configuration, the recorded plan change, the Stripe price mirror and the charge an automatic top-up replays to Stripe) also keep every digit; a non-finite number is refused, not rounded.


Public sign-up errors

The public sign-up request (POST /admin/auth/signup/request) puts its machine code in error: captcha_failed (400 — the EU Captcha token was missing, malformed or rejected; request a fresh one. An expected refusal: the sign-up page shows it but does not report it as a client error — the server counts it instead, see EU Captcha › Monitoring) and captcha_unavailable (503 — no trustworthy verdict could be obtained; carries Retry-After, 1–60 seconds).

The trial account-creation step (POST /admin/auth/signup/trial) answers signup_busy (503, Retry-After: 2) when the account-creation transaction could not run, or a check that runs before it could not (concurrent signups on every server-side retry, or the database was unreachable before anything was written; a pre-provision read counts only when it failed retryably, any other fault is 500 internal error): nothing was created, the email stays verified — POST signup/trial again (do not re-verify). See signup/trial. The paid sign-up's session poll (GET /admin/auth/signup/status) answers the same signup_busy (503, Retry-After: 2) when it cannot complete its account or session lookup for a moment; the success page keeps polling. The same step also answers signup_busy when it cannot complete its check for an existing live session for a moment (nothing was created).

The same step answers consent_required (422) when the verified sign-up carries no recorded terms (AGB/AVV) consent — an email-only sign-up, the paid funnel's first-step shape. The body is { "error": "consent_required", "message": "…" } (the machine code in error, like the other sign-up codes; the prose in message). Nothing is provisioned and the sign-up stays usable: go back to the first step, accept the terms and request a new code (use the code from the newest e-mail). See signup/trial.

too_many_session_cookies (400) answers POST /admin/auth/signup/trial and GET /admin/auth/signup/status when the request carries more than four distinct session cookies (aig_admin) — not something a browser sends. Nothing is created or set; repeating the same request cannot succeed.

already_signed_in (409) answers POST /admin/auth/signup/trial when the browser already carries a live session of an active account: nothing is created, the existing session is kept, and the sign-up cookie is cleared. The sign-up page takes the person to their own workspace. See Authentication — the no-card trial.

account_deactivated (409) answers POST /admin/auth/signup/trial when the one-trial dedup hits and a soft-deleted account still owns the verified address (a tenant-admin delete that kept the one-trial marker; a platform-admin delete clears the marker and this never fires). Body { "error": "account_deactivated" }; the page shows "your account has been deactivated, contact your administrator" instead of the misleading "trial already used". The decision is an authoritative server read (a user row with deleted_at IS NOT NULL for the exact, ascii_fold-normalized address) and fails closed: a non-matching (accent / homograph) address keeps the ordinary trial_already_used; a fault in the check answers the retryable 503 signup_busy with Retry-After (or 500 when the fault is not retryable) — never trial_already_used and never a trial. The Google/Microsoft OAuth sign-in path returns the same code as the account_deactivated ?oauth_error= bounce to /login (see quick sign-in bounce targets). See signup/trial.

link_confirm_required (428) answers otp/verify-link and signup/verify-link when the magic link is opened in a browser other than the one that requested it (or the link is bound to none). Body { "error": "link_confirm_required", "email": "<account address>" } (sign-in also carries "code"); nothing is consumed — re-POST with "confirm": true after the person confirms. link_other_browser (403) answers the same routes when the browser holds a malformed or another request's binding cookie; it never signs in, not even with confirm. invalid_confirm (400): a confirm that is not true / false. See Magic-link browser binding.

code_superseded (410) answers signup/verify, signup/verify-link, signup/trial and signup/checkout when the code, the unused link or the signup session belongs to an older sign-up without consent that the address has since superseded with a consented request (the consent-step recovery above). Body { "error": "code_superseded", "message": "This code is no longer valid. Use the code from the newest email." }; nothing is verified, provisioned or paid — use the code (or link) from the newest e-mail. When the address already has an account, verify, verify-link and checkout answer 409 instead. See Superseded codes.

signup_busy (503, Retry-After: 2) can also answer signup/request (every request is one retried transaction; a consented one includes the supersede) and signup/checkout (the consent write): nothing was stored — send the same request again.

Sign-up database faults. Every sign-up route (signup/request, signup/verify, signup/verify-link, signup/trial, signup/checkout, signup/status) separates a database fault that is worth retrying from one that is not. A retryable fault, such as a lost connection or a lock conflict, answers 503 { "error": "temporarily unavailable; retry later" } with a Retry-After header (the same value the other 503 temporarily unavailable answers carry). It is sent only when the server knows the fault is retryable and, for a write, that nothing was applied, so repeating the request is safe: the email stays verified and the sign-up cookie stays valid. Any other fault, including one the server cannot classify, answers the genuine 500 { "error": "internal error" } with no Retry-After; do not retry it blindly. signup_busy is the separate case of a transaction or a pre-provision check that could not run: concurrent writes on every retry, or the database was unreachable before anything was written. The pre-provision reads of signup/trial (the active-subscription lookup, the deactivated-account check, the one-trial and throttle counts, the trial-credit lookup) never skip a check on a fault: a retryable one answers signup_busy, any other the 500. Which answer a route gives:

Route 503 temporarily unavailable; retry later (Retry-After = the database retry hint) 503 signup_busy (Retry-After: 2) 500 internal error
signup/request the existing-account lookup failed retryably the sign-up transaction could not run any other fault
signup/verify a retryable read, or a mark-verified that wrote nothing none any other fault
signup/verify-link a retryable consume fault, or a retryable account lookup for a superseded link none any other fault
signup/checkout a retryable read (intent, account, active subscription, re-read) the consent write could not run any other fault
signup/trial the intent read failed retryably provisioning could not run, or the live-session check failed any other fault. A session-claim fault after provisioning is not a 5xx: it answers 200 with session_issued: false because the account exists, so sign in normally
signup/status a retryable intent or by-session read, or a claim that applied nothing the account or live-session lookup failed for a moment any other fault

The sign-up page treats every application 503 it receives as retryable and shows its "service is busy, try again" message for both answers above, on the sign-up routes and on the provider sign-in start from the sign-up page. The exceptions keep their own message: captcha_unavailable, checkout's checkout_unavailable ("payment is not available"), and the emailed link (signup/verify-link), which asks the visitor to enter the code or request a new one. A 503 that a CDN or proxy sent (not the application) keeps its own diagnosed message.

Everything not listed as retryable is the 500. The cause of a retryable fault is described in Database capacity; the public sign-up routes answer the same retryable-fault 503 as the admin routes.

Sign-in database faults

The browser sign-in routes POST /admin/auth/otp/request, otp/verify and otp/verify-link classify an account-lookup fault the same way. A fault the storage layer reports as retryable answers 503 { "error": "temporarily unavailable; retry later" } with Retry-After; any other fault, including one that cannot be classified, answers 500 { "error": "internal error" }, as JSON with the CORS headers and no Retry-After. Neither sets a session cookie, consumes a code, counts a failed attempt or writes an audit row, and both bodies are the same for a known and an unknown address, so the answer reveals nothing about the account. A plain (non-break-glass) otp/request still sets its login-binding cookie; a break-glass one does not, because its lookup fault answers before the binding. On otp/verify-link a fault while the account is re-loaded happens after the link was consumed: a retry answers 400 invalid_or_expired, so request a new code. For Google and Microsoft sign-in the visitor always lands on the same ?oauth_error=try_again bounce; the audit row of the failed attempt carries 503 for a retryable fault and 500 otherwise.


Storage faults (admin API)

Every admin, account (me) and chat route under /admin/v1/... answers a database fault with one of exactly two generic bodies. There are no route-specific storage messages (bodies such as "could not create the partner", "failed to load gateways" or "wallet_lookup_failed" are gone — those faults now answer one of the two bodies below). Neither body ever carries database text.

Status Body When
503 { "error": "temporarily unavailable; retry later" } A failed read — always. An existence or access check, a list, a lookup the answer depends on, or the read a write performs before writing. Such a fault is never answered as "not found", "forbidden", "disabled" or an empty list. Also a write that wrote nothing: a transient conflict (deadlock / lock wait the server did not re-wait) or no database connection could be obtained. Nothing was written — send the same request again. GET /admin/v1/chat/voice/availability answers it when the gateway, its config, the voice entitlement or the local-model pick cannot be read or decided, never as "not available".
500 { "error": "internal error", "request_id": "<id>" } Any other write fault. The write may or may not have landed — re-read the resource before repeating it. Also a read after a committed write (the route re-reads the row to echo it back): the write landed, only the echo failed. Also stored data that cannot be decoded (a corrupt version snapshot, gateway configuration, compliance report or share snapshot): permanent — a retry fails the same way. A create or update whose response echo (the read-back of the saved row) fails answers this 500 too — the change is saved: re-read, do not repeat it.
  • The rule in one line: a failed read is the 503; a failed write is the 503 only when the server knows nothing was written, otherwise the 500. The 503 is a promise that a retry cannot double-apply.
  • Unclassified driver failures. A read whose database error carries no usable classification is marked retryable by the storage layer (the 503); a write whose error carries none is never retried blindly (the 500). A flag that is missing or malformed is always the 500, never the 503.
  • What the rule covers. The voucher series list and create, the trust page's sub-processor register, the insights endpoint (a fault in the current or the previous window is the 503, and a failed result is never cached), the account-group override, the enterprise wallet grant on a tenant PATCH (the whole edit is rolled back, so repeating it with the same grant nonce is safe) and the token-mint routes (POST /admin/v1/me/tokens, POST /admin/v1/users/{id}/tokens, the gateway tokens, the playground token, the connect token and the agent MCP token). A token-mint insert is the 503 only when nothing was written and the failure is not a foreign-key refusal (a deleted user, gateway or agent is not retryable; it keeps its own 404, 400 or 500 answer).
  • Known gap: a few storage lookups still return a single value and cannot yet tell "absent" from "failed"; on the routes that use them a read fault can still surface as that route's "not found" answer. They are being converted to the rule above.
  • The database's own error text (SQL, driver messages, table or column names) never appears in a response body. The cause is logged server-side under the request_id; quote it when reporting the fault.
  • The 500 carries no code and no detail; the 503 carries neither either. Branch on the status, not on the message.
  • Earlier variants of the retry body ("temporarily unavailable", "temporarily unavailable; retry", and route-specific sentences such as "feature check unavailable" or "tenant lookup temporarily unavailable; retry") are now the one body above; match on the status 503, not the text.
  • Every admin 503 carries Retry-After. The value is 1 second unless the route documents its own (for example 10 or 5); a Retry-After a route already sets is kept. The header is advice for a retry that can succeed, so a few 503s that no retry can clear omit it: configuration the operator must fix, or (impersonation_stop_failed) a session already cleared with the cookie. One rule decides this for every route (storage_fault.apply_retry_after): a 503 gets the default Retry-After unless the route explicitly opts out, and a route that sets its own keeps it. The list below names the opt-outs at the time of writing; the rule, not the list, is the authority. They are ingest_unavailable (document ingestion is not set up), oauth_redirect_unconfigured (no OAuth callback URL), SAML is not available, the playground web-search 503s (search not configured, or the stored key cannot be read), files_api_key_missing, impersonation_stop_failed (the session cookie is cleared, so a retry cannot end the record), the connector connect / OAuth-start config failure (the app-mode 503; retry keeps the header), and privacy_policy_unreadable when the stored policy is missing or invalid (a database fault reading it keeps the header). Sign-in single-sign-on failures are 302 redirects, not 503s.
  • Paging parameters are input, not storage. On the admin list routes that page (limit / offset), a value that is not a plain decimal integer in range (0 or -1 for limit, 1e2, 0x1E, 30, empty, repeated) answers 400 {"error": "<name> must be an integer >= <min>", "code": "invalid_limit"} (or invalid_offset) before any query runs — never a 503. An absent value takes the route's default. A value above the route's cap is clamped to it (offsets to 100,000,000); a value of more than 9 digits is rejected with the 400.
  • Not storage faults — these keep their own documented bodies: coded answers a client branches on (catalog_unavailable, fx_unavailable, topup_unavailable, checkout_unavailable, body_unreadable), 503s from an external service (text recognition / OCR, the video service, text-to-speech, the document converter), the approval gate unavailable 503 (only when nothing was captured — see Config approvals), 409 conflicts and every 4xx validation message.
  • Routes outside the admin dispatcher — the sign-in routes under /admin/auth/..., public share pages, the partner portal and the SCIM server endpoints — keep their own documented answers. The sign-up routes follow the rule above too; see "Sign-up database faults" below. (SCIM /Groups writes are idempotent, so there a write fault — and a failed read-back after a write — is the retry 503; see SCIM.)

Checkout errors

The self-serve checkouts — sign-up (signup/checkout), the trial conversion (POST /admin/v1/billing/checkout) and reactivation — and the plan change of a paying workspace (preview, commit and cancel) put the machine code in error. Each endpoint's table is the authority; every one of these answers also repeats the same string as a sibling top-level code (see Typed codes on billing and voucher routes). Below are the codes of the EU-governed add-on, the self-serve limit and the plan change. Several are shared between checkout and plan change; the codes only the plan change uses are at the end.

error Status Meaning
token_owner_required 400 POST /gateways/{id}/tokens with neither user_id nor agent_id while the workspace has require_token_owner on.
invalid_owner_filter 400 GET /gateways/{id}/tokens with an owner query parameter other than exactly none.
invalid_addon 400 Conversion: addon is present but not an object, or its slug is malformed (addon without expect → missing_field; a malformed addon.expect → invalid_expect). Plan change: addon is neither null nor a slug string matching the pattern.
unsupported_field 400 Any top-level body key outside the route's allow-list, with field naming it: the sign-up checkout (addon and topup included; sign-up sells neither), the conversion checkout (topup included; the wallet is loaded afterwards), the wallet top-up (POST /billing/wallet/topup; the retired price_id/amount still answer field_retired). Plan change (preview and commit): any unknown top-level key, on preview including expect. Voucher edit (PATCH /admin/v1/vouchers/{id}): any key outside the editable set, code and type included.
unknown_addon 400 Conversion and plan change: the add-on slug is not a public, self-serve, Stripe-bound add-on row. In a plan change only a newly added add-on is checked this way; the add-on the subscription already has is accepted even when its row is no longer public.
addon_unavailable 409 The add-on cannot be sold with this plan or interval (for example no annual add-on price for an annual plan) — permanent until the catalog is fixed. Also on the plan change. On reactivation: the lapsed subscription's add-on cannot be re-added. The UI offers contact instead of payment.
above_self_serve_limit 409 The purchase's monthly net (seats + add-on) is above the self-serve limit; the body carries limit_minor and currency. Also on the plan change (the target's monthly net). Reactivation is exempt.
price_changed 409 A shown price changed. Checkout: the body carries offer and, when an add-on was asked for, addon_offer. Plan change commit: the amount due now, the currency, the target's monthly net or the kind differs from expect; the body carries a fresh preview (also when expect.proration_date is outside its window).
checkout_unavailable 503 Transient: the catalog cannot be read or offer a price, the self-serve limit cannot be read or is malformed (never replaced by the default), or (reactivation) the add-on check could not complete. Also the plan-change preview and commit.
invalid_seats 400 Checkout (sign-up, conversion) and plan change: seats is not an integer, below 1, or above the plan's maximum. Only when it is above the plan's maximum does the body carry max_seats.
missing_field 400 Checkout (sign-up, conversion) and plan change: a required key (for checkout plan, interval, seats or expect; for a plan change seats, addon, or in the commit expect and its members) is absent (checkout: absent or null; plan change: absent only — a null there is invalid_seats / invalid_expect); the plan change body carries field, the checkout body carries message. Conversion also answers it for an addon without its expect.
invalid_expect 400 Checkout (sign-up, conversion) and plan change commit. Checkout: expect is not an object, or a member is absent, null, of the wrong type or out of range (unknown members are ignored). Plan change commit: expect is null or not an object, a member is null, of the wrong type or out of range, or an unknown member is present; an absent member is missing_field there.
invalid_email_domain 400 PUT of an OIDC or SAML SSO configuration: an allowed_email_domains entry is not a plain hostname with at least two labels (wildcard, port, @, non-ASCII, IP literal, over-long label or entry, leading or trailing hyphen or dot), or the list is too long (more than 100 entries, more than 16384 bytes submitted, or more than 8192 bytes once normalized). The body carries field.
freemail_domain_not_allowed 400 PUT of an OIDC or SAML SSO configuration: allowed_email_domains contains a public e-mail provider domain (exact match). The body carries field.
sso_domain_conflict 409 PUT of an OIDC or SAML SSO configuration whose allowed_email_domains contains a domain already allow-listed by an enabled SSO configuration of another organisation, or a newly added domain on which accounts outside the organisation exist (a live user of another organisation or without one, or a paid sign-up in flight for less than 3 days). Nothing is stored; the body does not identify the other organisation. Remove the domain or contact support. A collision that nevertheless exists (legacy data, a restored organisation, a concurrent save) is never resolved to one organisation: sign-in discovery answers no SSO for that domain and the e-mail code stays available.
sso_domain_in_use 409 PUT of the SSO enforcement (turning it on, 0 to 1), or an OIDC/SAML configuration save while the organisation enforces SSO that newly covers a domain the organisation already holds in its own stored configurations (a disabled stored config re-enabled, or a domain carried over from its other-protocol config) while that domain has accounts outside the organisation. A domain newly added to the organisation's configurations answers sso_domain_conflict instead, and another organisation's enabled configuration is checked first. Nothing is stored.
seats_below_active_users 409 Conversion and plan change: seats is below the workspace's active users; the body carries min_seats. A plan change that is a pure reduction (seats at or below the current seats, no add-on added or replaced) is never refused for active users. The entitlement write answers it too when it would drop the effective seat cap below the active users; that body carries detail only. When a cancelled workspace is reactivated and the requested seats are below its active users, the body carries min_seats and max_seats.
noop 409 Plan change: the target equals the current plan or the scheduled one; on cancel, nothing is scheduled.
change_blocked 409 Plan change: a blocker applies; the body carries blocker (see the summary).
downgrade_scheduled 409 Plan change: an upgrade while a downgrade is scheduled — cancel the downgrade first. The body carries pending_change.
payment_pending 409 Plan change: a previous upgrade still waits for payment; the body carries pending_payment. Right after that invoice was paid, or after an upgrade paid at once, while Stripe has applied the upgrade but the gateway has not recorded the new seats yet (until customer.subscription.updated is processed: usually seconds, longer if that delivery keeps failing), the same answer comes with pending_payment: null; retry once the summary shows the new seats.
busy 409 Plan change commit and cancel: another change for this workspace is in flight — retry shortly. Preview never answers it.
rate_limited 429 Plan change preview and commit: more than 30 previews or 10 commits per workspace within 60 s (counted per server node, only for a body that passed validation) — see the rate limit. Retry shortly.
stripe_unavailable 502 A Stripe call failed or timed out: plan change (preview, commit, cancel) and forgetting the wallet card (DELETE /billing/wallet/payment-method); the wallet top-up answers 502 checkout_unavailable instead. For a plan change the change may have applied — read the summary again; retrying a commit is safe. Also POST …/plan-switch (MAP-4701): the live subscription could not be read, or its cancellation date is malformed; nothing changed.

Error codes

💡 Note: Inference endpoint errors (/v1/...) use the structured format below with code and message fields. Admin API errors (/admin/v1/...) use a simpler flat format, {"error": "message string"} — though a few admin endpoints add a sibling top-level code for outcomes a client must branch on (the MCP connector routes and the connector-sync routes carry one on every JSON error — see MCP connectors and Connector sync; the OAuth start and callback redirects use ?oauth_error= instead; e.g. the last-administrator delete guard returns {"error": …, "code": "last_admin_confirm_required" | "last_admin_blocked"} — see Deleting a user; voucher creation returns a code for every validation rejection — see Vouchers; the free-trial gateway lock (PATCH /admin/v1/gateways/{id}, POST /admin/v1/tenants/{id}/gateways, DELETE /admin/v1/gateways/{id}, the guardrail-config import and the governance template apply) returns trial_gateway_locked (403) — see Tenants & gateways; a tenant create, or a gateway create with create_only, whose name already exists returns slug_taken (409) — see Tenants & gateways; a group create or rename (POST/PATCH /admin/v1/groups) whose name already exists in the tenant returns group_name_taken (409) — see Groups; a mutation of an identity-provider (SCIM) managed group (rename to a different name, delete, add a member, remove a scim member; a description or role_id change is allowed) returns idp_managed (409) — see Groups; a group or grant change that would leave a project without an owner returns last_owner (409) — see Project ownership guarantee; deleting a custom role that a user outside your reach holds returns role_held_by_unreachable_user (409, with a count) — see Deleting a custom role; app-feedback submission returns invalid_type, description_required (400 — a missing/blank Details field), invalid_url / invalid_description (400 — an optional field sent as a number/boolean/object/array; the app-feedback edit and the content reports answer invalid_<field> the same way) and support_rate_limited — see Feedback, and the app-feedback inbox list returns invalid_type / invalid_status / invalid_roadmap (400) for an unknown, repeated or valueless type / status / roadmap filter — see Feedback; the tenant prompt create and update routes answer every field-validation 400 with a per-field code (name_required, invalid_template, description_too_long, nothing_to_update, …); the single-version read and restore routes answer a malformed version with invalid_version; the Contact us enquiry POST /admin/v1/contact returns invalid_email (400 — a present-but-malformed email; an absent one falls back to the account email), invalid_name / invalid_message / invalid_url (400 — a non-string name/message/url), support_rate_limited (429 — the shared support-egress window), contact_send_failed (502 — the relay rejected the message, logged and audited delivered=false, retryable) and contact_unavailable (502 — the configured recipient is invalid, nothing sent); the one-time-code sign-in routes return invalid_email (400) for a malformed address and the three 429 caps otp_request_cap (too many codes requested for the address), otp_attempt_cap (this code's five guesses are spent — request a new code) and otp_failure_cap (twenty rejected attempts in an hour, wrong guesses and otp_attempt_cap answers alike — wait) — see Authentication; the public cancellation button carries its machine code in error itself — email_required / invalid_email / invalid_code / malformed_body (400), invalid_otp (401: wrong, expired or no live code; formerly code_invalid), code_request_cap (429: five codes an hour for the address — a mailed code still works), code_attempt_cap (429: request a new code) and code_failure_cap (429: wait an hour) — see Billing; the project knowledge upload POST /admin/v1/projects/{id}/knowledge/upload returns a code for every refusal of the uploaded content (the access refusal 404 not found keeps the plain {"error": …} shape; the 403 forbidden of a caller without the project role carries project_role_insufficient) — see the rows below and Projects; a project or tenant knowledge write whose file name already exists returns knowledge_name_conflict (409) — see Projects and Tenant Knowledge; the route-resolution refusals of POST/PATCH /admin/v1/conversations return the machine string in BOTH error and a sibling code — no_runnable_route (no gateway that routes can serve the request: the tenant has no purpose: "production" gateway at all, or none of them serves a model that survives the plan / residency / allowlist filters) and no_local_route (409), and model_override_gateway_not_visible, project_gateway_not_visible and unknown_task (400) — see Conversations; on those refusals the two fields are equal and that value is frozen, while the endpoint's OTHER failures keep the plain flat shape; speech-to-text POST /admin/v1/chat/transcribe returns unsupported_audio (415 — the bytes are not an accepted audio container), undecodable_audio (422), no_speech (422 — the recording holds no speech), empty_transcript (422 — the recognizer returned no text), unusable_audio (422) and too_long (413 — more than 30 minutes of decoded audio) — see Audio transcription; an in-place save of a stored file (the artifact panel's write-back, PUT …/conversations/<CID>/knowledge/<KID> and the by-id form of PUT …/projects/<ID>/knowledge) returns version_conflict (409 — the file changed since the base_version the save was based on; the body carries current_version), not_editable (409 — an uploaded / binary-backed file), invalid_base_version (400 — a present base_version that is not a positive integer, or one sent with the by-name form), invalid_id and invalid_target (400 — a malformed id, or id together with filename) — see Projects and Conversations; the conversation message, sharing, comment and file routes return a top-level code for their refusals, except the shared uncoded answers (the audited 404 not found, the storage-fault 503) — see the exception list in Conversations; the admin gates and the dispatcher carry a code too — see Typed codes on the admin gates; the usage analytics routes GET /admin/v1/stats/analytics and GET /admin/v1/stats/usage-series return bad_param (400 — a malformed query parameter: a non-UUID, repeated or value-less tenant_id, a repeated or value-less group_id, and on /stats/usage-series any malformed since/until/dimension/metric/tz_offset), and /stats/usage-series additionally invalid_window (formerly window_invalid; 400 — the window's start is not before its end, e.g. a device clock ahead of the server) and span_too_long (400 — the window is longer than 92 days) — see Stats; a stored file's /download (GET …/projects/<ID>/knowledge/<KID>/download and GET …/conversations/<CID>/knowledge/<KID>/download) returns bad_param (400 — an inline value other than 1) and inline_not_pdf (415 — ?inline=1 on bytes that are not a PDF) — see Projects). Read such a code from the response body's top level, not from the message string: the error prose is the operator/log text, it is English only, it names internal fields, and it may change between releases. A client that wants to show the user something must key its own localised message off the code.

A third shape exists for the typed policy refusals in this table (share_restricted_project, project_release_forbidden, share_source_project_forbidden, project_tier_unresolved, project_access_unresolved, agent_area_unresolved, project_tenant_mismatch, …): those put the machine code in error and the prose in a sibling message — {"error": "share_restricted_project", "message": "This conversation is in a project…"}. On the conversation routes (/admin/v1/conversations…) the same code is also repeated in a sibling code ({"error": "project_tenant_mismatch", "code": "project_tenant_mismatch", "message": "…"}); other endpoints that return one of these codes may not carry code, so read error. The rule is unchanged and is why the shape exists: branch on the machine string, render your own localised text, never parse the prose.

Code HTTP status Description
invalid_otp 400 / 401 (formerly otp_invalid) A one-time sign-in, sign-up, IBAN-change or cancellation-button code was refused. 400 — the submitted code is not of a valid shape; it is refused before any counter, database read or hash and is never counted as a guess. 401 — a well-formed code that is wrong or expired, on the routes that type that answer. On the public cancellation button only the 401 is invalid_otp (it was code_invalid); a malformed code there answers 400 invalid_code — see Cancellation button. The per-route shape rules are in Authentication and Partner.
bad tenant ({"error":"bad tenant"}) 400 The {tenant} URL segment of an SSO route is not a UUID (8-4-4-4-12 hex). Returned by SAML metadata, logout (which still clears the local session) and sls; SAML start/acs and OIDC start instead redirect to /login?error=sso_failed. Checked before the rate limit, storage and validator.
unauthorized 401 No auth token, or the token is unknown for the gateway named in the path. Tokens are gateway-scoped: a valid token used on the wrong gateway also returns 401. The message distinguishes the cases — missing token, a token scoped to a different gateway of the same tenant, or an unknown/other-tenant token. An expired token has its own code, token_expired; an explicitly revoked one has token_revoked. A token that disappeared together with its agent, user or gateway (a cascade, not an explicit revocation) answers this generic code. See Token security model.
token_revoked 401 The token was valid and was revoked — deleted under Gateways → Tokens, Profile → My tokens, by a chat-bridge teardown, or because the token's owner was disabled, deleted, or SCIM-deprovisioned (ending a user's access revokes their /v1 tokens in the same step). Distinct from unauthorized because nothing about the URL or the gateway is wrong, and distinct from token_expired because re-minting is not something the caller can do alone: an administrator (or the token's owner) has to mint a new token and update the caller. The message names the revocation date (UTC) when it is known. The decision comes from a revocation tombstone written in the same transaction as the delete, read for the gateway named in the path only — a token revoked on another gateway or in another tenant is reported as the generic unauthorized, never as revoked. A client must not retry on this code.
token_expired 401 The token was valid and has expired. Distinct from unauthorized because it is a different situation with a different remedy: the credential was real, nothing is misconfigured, and the call succeeds again once a fresh token is used. The message names the expiry and points to Gateways → Tokens, so a scheduled agent or client stuck on a stale token gets an actionable next step. A client may safely re-mint and retry on this code, which it must not do for unauthorized. The chat app does exactly that: when a turn's request is refused with this code before any byte streamed (the short-lived play token lapsed between the pre-turn check and the request), it re-mints once and replays the same turn — safe because authentication runs before the turn is claimed or anything is persisted. When it cannot re-mint (the browser session itself expired) it shows a typed "session expired" state in the conversation with a sign-in action, instead of leaving the page mid-turn; a refusal that is not an expiry (unauthorized, or a refused mint) is shown as a typed refusal and is never retried. The accepted 401 body shape is { "error": { "code": string, "message": string } }; a body whose code is absent or not a string is treated as unauthorized (no retry).
forbidden 403 The token is valid but does not have permission. Causes: viewer role on inference, or IP not in the ip_allowlist of the gateway. Admin message writes (POST/PATCH/DELETE /admin/v1/conversations/{id}/messages…) return the same code, in the admin { "error": <prose>, "code": "forbidden" } shape, when the caller can read the conversation (a project member it is shared with) but may not write to it right now — off-session only the owner writes. A refusal the app shows as a notice, not an error. See Messages.
impersonation_forbidden 403 An administrator who is viewing the app as a user (see Admin impersonation) tried to mint a durable credential or create a persistent out-of-band effect — the short-lived chat token, a personal or gateway token, a share link, a webhook trigger — or to read the person's own data, such as GET /admin/v1/me/security (see personal data is refused). Refused so nothing survives Stop and nothing personal is shown. Shape: { "error": "impersonation_forbidden", "code": "impersonation_forbidden" } — the machine code is BOTH the error value and the sibling code (added the sibling); branch on it, never render it. The chat app localises typed codes (code, or error.code), so the banner carries "Chat is unavailable while you are viewing the app as this user…" (the copy already ships; the "Could not create gateway token:" prefix stays until the banner's own follow-up). Stop viewing as the user to continue. The app treats it as an expected refusal: it is shown to the person, not reported as a client error (the MCP connector list, GET /admin/v1/mcp, is one such route).
invalid_user_id 400 Impersonation start (POST /admin/auth/impersonation/start) was sent a user_id that is present but is not 1 to 36 printable non-space ASCII bytes. Shape: { "error": "invalid user_id", "code": "invalid_user_id" }. Recorded as an impersonation.denied security event without the sent value. See Admin impersonation. Also sent when a group or project member user_id (POST /admin/v1/groups/{id}/members, POST /admin/v1/projects/{id}/members) is present but not a 1–36 byte string without control characters (an absent one is user_id_required; see Groups). Also sent by GET /admin/v1/device/families when ?user_id is repeated, bare (?user_id) or empty (?user_id=); there it is a shape error only, not audited, and any other non-matching string answers the audited 404 not found instead.
viewer_read_only 403 The caller holds the viewer role and tried a chat write that spends inference credit or reshapes a conversation's content/context on the admin session plane — creating a conversation (POST /admin/v1/conversations), forking one (.../fork), a message POST/PATCH/DELETE, an attachment upload, a chat-file upload (POST /admin/v1/chat/files), summarize, summaries, context-drop, or a knowledge/<KID> PUT. Emitted in the admin { "error": <prose>, "code": "viewer_read_only" } shape and decided before any conversation lookup, so it is not an existence oracle. Distinct from forbidden (which the app reads as "you can read this conversation but not write to it right now"). It is not a blanket write ban: a viewer may still read and do owner-housekeeping (rename, delete, rate, delete an attachment), plus share links, comments and read-aloud. The /v1 inference twin is forbidden (see above). See Viewers cannot spend credit or reshape a conversation.
processing_restricted 403 The user is under a GDPR Art. 18 processing restriction (a reversible admin-set legal hold). No model is called. The check fails closed: a user is unrestricted only while the stored flag is exactly 0; a missing or unrecognised stored value counts as restricted. An admin lifts it via PATCH /admin/v1/users/{id} with {"processing_restricted": false}.
data_residency_blocked 403 The gateway requires EU model hosting (eu_region_routing: true) but the selected provider is not EU-owned. The request is refused before any upstream call. Route the model via an EU-owned provider (Myra, Mistral, IONOS AI Model Hub). AWS Bedrock, Google Vertex and Azure OpenAI are US-owned clouds and are refused this way in every region, an EU region (eu-central-1, europe-west3, westeurope, …) and any model id included. A provider-qualified model id (groq/<id>) on an EU gateway is refused this way too, even when an EU fallback exists: a pin is never failed over to another provider. The message reads This gateway requires EU model hosting; the selected provider is not EU-owned (AWS Bedrock, Google Vertex and Azure are US-owned clouds and are refused in every region, an EU region included). Route this model via an EU-owned provider (Myra, Mistral, IONOS). See Data residency. After a tool result: when the gateway refuses the server-side tool loop's model call after a tool result for this reason, the turn ends with this code (non-retryable, no model-error triage row) — see After a tool result.
transfer_safeguard_required 403 The gateway requires the GDPR Art. 44–46 transfer safeguard (transfer_safeguards_required: true, set by the GDPR governance template) and does not mask personal data in this request (no pii_protector / presidio scrubber on the request, or it could not run and the request went unscanned), so the selected model's provider, which is not EU-owned, is refused before any upstream call. EU-owned providers (Myra, Mistral, IONOS) still serve. Pick a model served by an EU-owned provider (Myra, Mistral, IONOS), or ask an administrator to enable a PII scrubber (pii_protector or presidio) on the gateway's request guardrails. Returned by inference, /compact, the save-time model pins and the Files-API upload. A deterministic policy refusal: no retry, no model-error triage row. See Transfer safeguard. After a tool result: when the gateway refuses the server-side tool loop's model call after a tool result for this reason, the turn ends with this code (non-retryable) — see After a tool result.
provider_not_allowed 403 The gateway enforces an explicit provider allowlist (provider_allowlist_enforced: true, or a deployment-wide enforcement setting configured by your operator) and the selected model resolves to a provider that is not on provider_allowlist. The request is refused before any upstream call — no attempt, primary or fallback, can silently reach a non-approved provider. Pick a model served by an approved provider, or add the provider to the allowlist. Fails closed: under enforcement a missing/empty/malformed allowlist denies every provider. See Provider allowlist. After a tool result: when the gateway refuses the server-side tool loop's model call after a tool result for this reason, the turn ends with this code (non-retryable, no model-error triage row) — see After a tool result.
role_model_not_allowed 403 The gateway defines a per-role model mask (role_policies.<role>.models) and the request's resolved model is not in the user role's allowance. Enforced on the primary (user-chosen) model at the guardrail stage, and re-asserted on the primary turn's upstream retry/fallback swap targets before any network call — so a system-initiated swap can never carry the user's turn onto a model the role excludes. A deterministic policy refusal (not a provider outage; no retry, no model-error triage row). Pick a model in your role's allowance. See Per-role policy. After a tool result: when the gateway refuses the server-side tool loop's model call after a tool result for this reason, the turn ends with this code (non-retryable, no model-error triage row) — see After a tool result.
gateway_disabled 403 An administrator switched this gateway off (purpose: "disabled", see Switching a gateway off). Every request that resolves to it is refused, including a dispatch re-target or fallback onto it; the refusal ends the failover chain. A deterministic policy refusal: no retry, no model-error triage row. A pin to a gateway disabled later returns this code until re-pinned (pin validation is not affected). Re-enable the gateway (set purpose back to production) or use another one. An unrecognised or malformed stored purpose is refused with the same code.
tenant_suspended 403 The workspace is suspended by the partner portal. Every request of that workspace is refused, on the API, in the admin session and in SCIM (workflow runs are refused at their claim, see Workflows) (for SCIM the detail is tenant_suspended), and on the chat file upload, the conversation attachments, the sales-knowledge search, the MCP proxy and the Agent Builder plan and tidy routes (the purpose proposal answers 200 with dispatch_blocked); the chat file upload, the attachments and the Agent Builder helpers are refused for platform administrators too; administrators of the platform are not affected on session routes. A deterministic policy refusal: no retry, no failover, no model-error triage row, masked as assistant_unavailable on the anonymous docs lane. The access decision is recorded with blocked_by tenant_suspended. A scheduled run that was claimed just before the suspension and is refused this way is not counted as a failure and sends no owner mail. Resuming the workspace lifts it with no re-login. If the suspension state cannot be read the answer is 503 instead (blocked_by tenant_state_unknown). Only with the tenancy switch on, see Partner tenancy API. Sign-in is refused the same way (403 tenant_suspended, Cache-Control: no-store) on the e-mail code, magic link, static code, session renew and CI session routes and on POST /admin/auth/signup/trial; GET /admin/auth/signup/status answers 200 with session_issued: false instead and never emits this code, and the demo sign-in answers 404 demo_unavailable, see Authentication.
static_code_expired 403 A legacy fixed sign-in code (set before the 12-character minimum) was presented correctly after its 30-day grace ended. Admin and partner sign-in. No session is created; an administrator must set a new code of at least 12 characters (docs carries the anchor). A wrong guess stays 401. Audited auth.static_otp_expired.
model_disabled_on_gateway 403 A tenant admin disabled this Myra-hosted local model on the gateway (Organisation › AI setup › Gateways › Add Model › Use Platform Key › Myra models). A hard block: the model is neither offered in any model picker nor routable on that gateway — enforced per dispatch attempt (primary and every fallback/failover re-target), at agent/project/scheduled-task save time for new pins (those save-time rejections return 400 with this same code), and excluded from the attachment auto-upgrade and the 413 switch-model suggestion. A deterministic policy refusal (not a provider outage; no retry, no model-error triage row). A pre-existing pin to a since-disabled model returns this code until re-pinned. Re-enable the model in the same dialog, or pick a different one. After a tool result: when the gateway refuses the server-side tool loop's model call after a tool result for this reason, the turn ends with this code (non-retryable, no model-error triage row) — see After a tool result.
model_disabled_for_tenant 403 A tenant admin blocked this model for the whole organization (every gateway of the tenant; see Blocking a model for the whole tenant). Same hard-block semantics as model_disabled_on_gateway but tenant-wide and for any provider: not offered in pickers, refused on the primary and every fallback re-target. A deterministic policy refusal (no retry, no circuit-breaker failure, no model-error triage row). Lift the block or pick a different model.
provider_objected 403 The selected model resolves to a provider whose sub-processor this tenant has objected to (Art. 28 Abs. 6 DSGVO — a per-tenant deactivation recorded by Myra Ops via the subprocessor-objection API). A hard block scoped to that one tenant: the provider is neither offered in any model picker nor routable for that tenant — enforced per dispatch attempt (primary and every fallback/failover re-target, plus the observed LiteLLM-overflow leg), at agent/project/scheduled-task save time for new pins, and excluded from the model-offer set. A deterministic policy refusal (not a provider outage; no retry, no model-error triage row). No other tenant is affected. Pick a model served by a different provider, or ask Myra to withdraw the objection. The web chat shows this code with its own localized (en/de) message. After a tool result: when the gateway refuses the server-side tool loop's model call after a tool result for this reason, the turn ends with this code (non-retryable, no model-error triage row) — see After a tool result.
inherent_search_rejected 403 (on resume) The run's held call to a model that searches the web on every call was rejected by the approver, or the hold expired undecided. The run ends; nothing was sent to the provider.
native_grounding_rejected 403 (on resume) The run's held Gemini or Vertex call, which would have sent the model's own search queries to Google's search backend, was rejected by the approver, or the hold expired undecided. The run ends; nothing was sent to the provider.
native_grounding_blocked 403 A run that has already processed outside content would send a Gemini or Vertex call with Google Search grounding, a hold for approval was attempted, and it could not be created or saved, or the client had already disconnected. The model chooses its own search queries; they are sent to Google's search backend and are not shown to you in advance. Refused before any upstream call; recorded in the access decisions with reason native_grounding. A run that cannot hold the call at all (for example a sub-agent in fan-out or a parent that is not attached to a run) sends it without grounding, with no error and nothing recorded. On an agent run the call is otherwise held (hold_reason: "native_grounding"; see native_grounding_rejected).
inherent_search_blocked 403 The run has already processed outside content (it was started by a webhook, an email or similar, or it read untrusted material), and the selected model searches the web on every call (for example gpt-4o-search-preview, Perplexity sonar, OpenRouter perplexity/sonar) with no way to switch that off. The gateway first routes to the model's non-searching sibling where one exists (OpenAI: gpt-4o, the served model is shown in X-AIG-Model), then sends the provider's switch that disables search (Perplexity direct), and only when neither exists refuses with this code before any upstream call. A deterministic policy refusal (no retry, no model-error triage row). On an agent run (webhook, email, schedule, chat bridge) the call is instead held for approval; see inherent_search_rejected. The hold outcome on the wire: when the response has not started, it is HTTP 202 with the body {"object":"agent.run.suspended","run_id":"...","review_id":"...","hold_reason":"inherent_search"}; when the response headers were already sent (a stream opened earlier), the response is a plain [DONE] with no content, and the run status (suspended) is the source of truth. Pick a model without built-in search. An unmarked run, such as an interactive chat, is not affected. The refusal is recorded in the access decisions with reason inherent_search.
inherent_search_egress_blocked 403 The request may not reach external services (a local-only project, or an agent invocation with x-aig-no-egress: 1), and the selected model searches the web on every call (for example gpt-4o-search-preview, Perplexity sonar-deep-research, Groq compound). The gateway first uses the model's non-searching sibling where one exists (OpenAI: gpt-4o), then the provider's switch that disables search (Perplexity direct), and only when neither exists refuses with this code before any upstream call. A deterministic policy refusal (no retry, no model-error triage row), also on an agent run: it is never held for approval. Pick a model without built-in search.
provider_not_configured 400 Returned by a save-time validation (pinning a project default model, pinning an agent's model, or the /compact conversation-summary call) when the pinned/summary (provider, model) resolves to a keyless provider this gateway never opted into — no provider_config row and no per-gateway base-URL override for it. Refused at save so the pin cannot be accepted and then block every conversation ("offer-then-block"). It is the config-time twin of the runtime invalid_request case below, decided by the same opt-in predicate, and — like provider_not_allowed — is a caller-fixable routing error, not a provider outage (no retry, no operations alert). Pick a provider this gateway serves, or opt the provider in on the gateway. (A provider that requires an API key returns provider_key_missing (424) instead.) Also returned at request time when a /compat model id pins a provider the gateway does not serve (for example groq/<id> on a gateway with no Groq key or base-URL override); see Provider-qualified model ids.
web_search_provider_unknown 400 POST /admin/v1/tenants/{id}/gateways or PATCH /admin/v1/gateways/{id} carried a config.web_search.provider that is not a supported search provider (an unknown name, an empty or whitespace-padded string, or a non-string). The body lists the valid values in allowed (["brave", "linkup"]); nothing was stored.
live_not_driver 403 The conversation has a live shared session and the caller is not the current driver — only the driver may write. Request the turn via POST /admin/v1/conversations/{id}/live/driver. On the /v1 turn path it is also returned (fail-closed) when the session state cannot be resolved. The three admin message writes (POST/PATCH content/DELETE /admin/v1/conversations/{id}/messages…) return it in the admin { "error": <prose>, "code": "live_not_driver" } shape — there a session-read fault is the retryable 503 { "error": "temporarily unavailable; retry later" }, not this code, so a database blip never reads as "someone else is driving". See Live shared session and Messages.
not_message_author 403 POST /admin/v1/conversations/{id}/attachments: the message_id is a live user message of this conversation, but someone else wrote it — a file is attached only to the caller's own message (a co-driver never to the owner's turn, the owner never to a co-driver's). Nothing is stored. See Attachments.
not_conversation_owner 403 PATCH (content / content_text) or DELETE /admin/v1/conversations/{id}/messages/{mid} by a caller who does not own the conversation and is not a live co-driver holding the wheel editing or deleting a message in their own tail (their own user message with no other author's message after it). Anything else a non-owner tries is refused; nothing was changed. The web app shows the refusal as an error toast with this reason.
message_author_unknown 403 POST /admin/v1/conversations/{id}/attachments: the message_id is a live user message of this conversation that records no author (written before authors were recorded, copied, or its author's account was erased). Nobody attaches files to it, the owner included; nothing was stored. Send the files with a new message.
model_pin_invalid 400 A provider-qualified model id on /compat (for example ionos/openai/gpt-oss-120b) has a malformed remainder: empty, whitespace or control characters, or a leading /. Refused before any upstream call; caller-fixable, no retry. See Provider-qualified model ids.
model_pin_conflict 409 The request pins a provider through its model id, but a routing rule or the self-serve outage failover would send it to a different provider. The pin wins: the request is refused rather than served by the other provider. Remove the prefix or change the rule. A fallback or failover leg on another provider is dropped silently, not reported with this code.
field_retired 400 The request carried a field that was retired and no longer does anything. Sent as { "error": "field_retired", "code": "field_retired", "field": "<field>", "message": "…" }. A field that is absent, JSON null or "" is ignored; any other value is refused before anything is applied, so nothing is written. Per route family: Tenants (POST /admin/v1/tenants, PATCH /admin/v1/tenants/{id}): budget_usd, budget_period, budget_four_eyes_required, budget_currency or budget_amount; the one exception is a PATCH that echoes back the tenant's unchanged budget_currency, which is accepted as a no-op. Use spend_cap_usd (tenant cap), the wallet (grant_usd) or the gateway config.budget_usd instead; see Tenants & gateways. Wallet (POST /admin/v1/billing/wallet/topup: price_id, amount; PUT /admin/v1/billing/wallet/auto-topup: price_id): send amount_minor + amount_currency for a top-up, or reload the page; see Billing. Plan config (PUT /admin/v1/plan-config) and catalog (PUT /admin/v1/catalog): plan config: its legacy price-id fields and the trial-credit field; catalog: its legacy price-id fields; reload the page. See Plan config and Catalog.
user_id_required / resource_id_required 400 A group or project member user_id (or a group grant resource_id) was absent. A present-but-malformed one is invalid_user_id / invalid_resource_id instead. See Groups, Projects.
invalid_resource_id 400 POST /admin/v1/groups/{id}/grants carried a resource_id that is not 1–36 printable ASCII characters, no spaces.
too_many_params 400 The query string carried more than 100 parameters (the web server truncates beyond that, so a bound could silently read as absent). Compliance report, governance dashboard, Anthropic usage and product insights routes. See Compliance, Governance dashboard, Anthropic usage, Product insights.
invalid_description / description_too_long 400 A role description (POST / PATCH /admin/v1/roles) that is not a string / not valid UTF-8 / over 255 characters. Rejected, never truncated. See Roles.
bad_param 400 A query parameter was malformed: the compliance / governance from / to window (empty, repeated, non-digit, lone bound, from >= to), the anthropic-usage from / to dates (not a real YYYY-MM-DD, repeated, lone bound, from after to), and others. See Compliance, Anthropic usage.
token_required / invalid_token / invalid_platform 400 POST /admin/v1/me/device-token: token absent / not a valid 1–200 byte [A-Za-z0-9:_-] string / platform not ios or android. See Account.
invalid_slug 400 POST /admin/v1/tenants carried a slug with a character other than lower-case letters, digits and hyphens, or one starting with a hyphen.
user_not_found 404 PUT /admin/v1/users/{id}/static-otp named an unknown or deleted user. Also POST /admin/v1/projects/{id}/members and PUT /admin/v1/gateways/{gw}/agents/{id}/sharing (user_ids) naming a user that is unknown, in another tenant or deleted; recorded as an access.denied event.
sso_link_not_found 404 DELETE /admin/v1/users/{id}/sso-links named a provider, issuer and subject that match no SSO link of that user (byte-exact). Nothing is changed. See SSO links.
invalid_role 400 POST /admin/v1/tenants/{id}/users carried a role that is present but not a string.
invalid_tenant_id 400 A tenant_id that is present in the body but is JSON null, not a string, or not a tenant id. Seen on POST /admin/v1/groups (platform admin; see Groups), the department routes and POST /admin/v1/users/bulk (platform admin; see Departments), POST /admin/v1/users/{id}/move (see Users & Tokens), the support-access request (see Support access) and POST /admin/v1/projects when a platform admin names a tenant (see Projects); the support-access list tenant_id filter answers it too. An absent or empty tenant_id is tenant_id_required instead; a well-formed id of no live tenant is 404 tenant_not_found.
name_required / invalid_name / name_too_long 400 A role name (POST / PATCH /admin/v1/roles) that is absent, empty or with nothing visible / not a string or holds a control character / not valid UTF-8 / over 80 characters. The same invalid_name / name_too_long codes (255 characters) apply to user names and to a project name (POST / PATCH /admin/v1/projects; absent or empty on create is name_required).
ambiguous_cookie 400 POST /admin/auth/impersonation/start or /stop saw a repeated aig_admin / aig_imp cookie. Stop still clears aig_imp. See Impersonation.
unknown_field 400 PATCH /admin/v1/tenants/{id}, PATCH /admin/v1/users/{id}, PUT /admin/v1/users/{id}/static-otp and PUT /admin/v1/partners/{id}/static-otp (only code is accepted), PATCH /admin/v1/gateways/{id} (only config is accepted), POST /admin/v1/tenants/{id}/gateways (only slug, config, purpose and create_only are accepted), PATCH /admin/v1/gateways/{id}/tokens/{token_id} (see Tenants & gateways) carried a body key the endpoint does not accept (for example spend_cap instead of spend_cap_usd, or account_group). Sent as { "error": "unknown_field", "code": "unknown_field", "field": "<key>", "message": "…" }; the field echo is capped at 64 bytes. Nothing is written. See Tenants & gateways and, for gateway create, Creating a gateway. Also POST …/plan-switch: any body key other than plan.
read_only_field 400 PATCH /admin/v1/tenants/{id} carried a read-only key (such as slug, id or created_at) with a value that differs from the stored one. Re-sending the unchanged value is accepted as a no-op. Sent as { "error": "read_only_field", "code": "read_only_field", "field": "<key>", "message": "…" }. Nothing is written.
malformed_body 400 The body of an object-body route on tenants or gateways (tenant and gateway create/update, rules, tokens, assets, keys) is a JSON array, string, number, boolean or null, in addition to the parser-wide malformed_body cases (a body that is not valid JSON, or holds a non-finite number — see Request body shape). The chat-bridge events endpoint answers 400 malformed_body for an authenticated body that is not valid JSON or holds a non-finite number, and the Mattermost slash endpoint for a form field sent without a value (see Chat bridge). This is the general rule for every default object-body admin, auth and partner route (see Request body shape): the body is 400 {"error": "request body must be a JSON object", "code": "malformed_body"} and is never read as {}; only an absent or blank body is read as {} and gets the route's empty-body answer. Nothing is written for a wrong-shaped body. Strict routes answer their own code.
model_not_servable 400 Admin API only — a routing rule (POST/PATCH /admin/v1/gateways/{id}/rules, or a held rule change being applied) names a (provider, model) pair the provider cannot serve, so every request the rule matched would fail. Carries field, model and provider. A retired id that is locally blocked reports as deprecated. A disabled rule is not judged. A malformed model id answers invalid_field; an unreadable catalog answers 503 catalog_unavailable. See Routing rules.
invalid_field 400 A request field is missing or has the wrong type or shape (for example a non-string slug, a rule conditions that is not an array). Carries field, the offending key (capped at 64 bytes, control characters shown as ?). Whether an absent value answers this code or field_required / <field>_required is stated on the route page. This is the generic code for new validation sites; the older specific invalid_<name> codes (for example invalid_email) stay as they are.
invalid_config 400 A gateway config value fails validation (config is not an object, test_headers_allowed is not a boolean, a siem block is not an object). field names the key when one applies. Other siem / webhook / tracing refusals keep their own codes; a bad siem.token / siem.password (or *_set) value is invalid_siem.
no_fields 400 A PATCH carried nothing to change (a token edit with none of rate_limit / budget_usd / expires_at; a tenant document-AI update with no document-AI field).
platform_admin_only 403 The tenant PATCH changes a field only a platform admin may change (plan, provider_allowlist, provider_allowlist_enforced, pii_masking_enforced, and similar). field names it.
tenant_admin_only 403 The change needs a tenant admin or a platform admin (a group-mapping change that adds, removes or re-points a role target, including a group target whose group carries a role_id; default_user_type, jit_provisioning, the default-department fields, eu_region_routing). field names it where one key is responsible.
tenant_editor_only 403 guardrail_baseline / guardrails_fail_closed need the permission to edit the organisation. field names the key.
service_credential_protected 403 PATCH or DELETE of an internal service credential token on a gateway. Not retryable.
stale 409 A tenant PATCH lost a concurrent-write race (the tenant changed between read and write). Nothing was applied; re-read and retry.
plan_switch_required 409 A tenant PATCH changes the plan of a paid Custom workspace (a live Stripe subscription). Its plan changes only at period end, through POST /admin/v1/tenants/{id}/plan-switch (MAP-4701). Nothing was applied.
invalid_plan_switch_target 400 POST …/plan-switch: plan is missing, not a string or not a switch target (enterprise or self_serve_trial).
plan_switch_not_applicable 409 POST / DELETE …/plan-switch: the tenant is not on a paid Custom plan, has no subscription, or the subscription has already ended.
plan_switch_pending 409 POST …/plan-switch: a switch is already recorded. Undo it first. Also POST /billing/checkout on a Custom workspace whose ended subscription still carries an un-applied switch (see Billing — trial → paid conversion).
plan_change_pending 409 POST …/plan-switch: the customer's own plan change is in flight, scheduled or waiting for payment.
no_plan_switch 409 DELETE …/plan-switch: no switch is scheduled.
plan_switch_committed 409 DELETE …/plan-switch: the switch is already committed (Stripe ends the subscription at period end). It can no longer be undone by an admin; the customer keeps the plan by choosing "Don't cancel" in the Stripe billing portal, which drops the switch.
subscription_present 409 A tenant PATCH moves the plan onto self_serve_trial while the tenant has a Stripe subscription that has not ended (an ended one does not block, MAP-4702). Nothing was applied. A paid Custom workspace gets plan_switch_required instead.
trial_ends_at_required 400 A tenant PATCH moves a tenant (from any plan) to self_serve_trial with trial_ends_at: null. Omit the field (the end defaults to now) or send a past timestamp.
trial_ends_at_future 400 A tenant PATCH moves a tenant (from any plan) to self_serve_trial with a trial_ends_at in the future.
config_changed 409 PATCH /admin/v1/gateways/{id} under config approval: a guardrail key or provider_base_urls the body names was changed by another write (for example an approved request) after you read the gateway, so saving the value you read would revert it without an approval. field names the key (config.<key>). Nothing was written; reload the gateway and save again. See Updating gateway config.
tenant_not_found 404 The tenant id is unknown (or soft-deleted where the route needs a live tenant).
gateway_not_found 404 The gateway does not exist or is not visible to the caller. On a project default_gateway_id pin it also covers an id that names no gateway, a gateway of another tenant and a gateway of a deleted tenant, with one identical body; a probe is audited as access.denied. GET /admin/v1/chat/voice/availability answers it with one identical body for an unknown gateway, another tenant's gateway and one the caller's department does not reach.
invalid_default_gateway_id 400 A project or department default_gateway_id that is not a gateway id (non-string, empty, over-long or malformed). Absent or null is accepted as no pin.
rule_not_found 404 The gateway rule id does not exist on this gateway.
token_not_found 404 The token id is not a token of this gateway (also for a device-session or MCP grant token).
not_found 404 A tenant or gateway sub-resource does not exist.
asset_not_found 404 The tenant has no stored logo / favicon for that slot.
unknown_agent 400 A token or gateway references an agent_id that does not exist for this gateway.
unknown_plan 400 plan is not a known plan. field is plan.
trial_plan_locked 409 While "Offer paid upgrade at signup" is on, the plan of a free-trial tenant can only be changed to enterprise.
paid_signup_state_unavailable 503 The "Offer paid upgrade at signup" setting could not be read; retry shortly.
tenant_not_restorable 409 Restore of a tenant that is purged or does not exist.
tenant_not_soft_deleted 409 Purge of a tenant that was not soft-deleted first.
confirmation_required 400 Tenant delete or purge without {"confirm": "<tenant slug>"}.
confirmation_mismatch 400 The confirm value does not match the tenant slug.
purge_own_tenant 409 Purge of a tenant the acting administrator is a member of.
actor_unknown 409 The acting administrator is not a known user (purge).
invalid_users_option 400 Tenant move/delete users option is neither "delete" nor "keep".
protected_user_in_tenant 409 Tenant delete with users: "delete", but the tenant holds a protected account. Delete the others individually, or keep the users.
platform_user_in_tenant 409 Same, for a platform-role account in the tenant.
actor_in_tenant 409 Same, for the acting administrator's own account.
portal_managed 409 DELETE /admin/v1/tenants/{id} by an organisation administrator on a portal-managed tenant; delete it in the partner portal.
image_too_large 413 A tenant logo / favicon upload exceeds the size limit.
unsupported_image_format 415 The logo / favicon is not an accepted PNG or JPEG.
tenant_key_provider_not_allowed 400 A tenant-level key was set for a provider that is not administrative (anthropic-admin only).
wallet_credit_failed 500 The wallet credit of a tenant create/convert failed; nothing was granted.
model_not_found 400 The requested model cannot be served, from one of several origins. (a) Pre-routing (a client error): (also a provider-qualified model id, <provider>/<id>, whose remainder is deprecated or unknown to that provider, see Provider-qualified model ids); a raw OpenAI-compatible (/compat) request names a model id the gateway cannot place on any provider it serves — the id is not a catalogued model, matches no known provider prefix, and the gateway does not configure openrouter (which passes an arbitrary id through). Refused at the routing boundary before any upstream call — not a provider outage, no retry, no operations alert. Check the model id, or pick a model this gateway serves. Note: a gateway that does configure openrouter still passes an uncatalogued, unprefixed id through to openrouter (its purpose as an aggregator), so this origin is returned only where there is genuinely no provider to route to; a provider-qualified id (<provider>/<id>) is the exception: it is never passed on to openrouter, and is refused with provider_not_configured (the named provider is not served) or this code (the provider is served but has no row for that id) unless the earlier prefix routing already lands on the named provider; an unknown id is never silently attributed to openrouter when openrouter is not configured. (b) Post-upstream (a serving-side registration gap): the gateway's own model proxy accepted the request but reports the routed model group as an unknown alias (the group is not registered on the proxy). Rather than dumping the raw upstream NotFoundError string, the gateway surfaces the same typed model_not_found and, for a chat turn, the model-unavailable recovery card (Send to <model> — switch the conversation to the suggested model and re-run the turn — or Choose a model). Unlike origin (a), this happens after an upstream attempt and does leave a model-error triage row (currently categorized user_fault, still notified to ops). Retrying the same model will not help until the group is registered. (c) Unpriced self-hosted chat model (a config gap): a Myra self-hosted chat model with no usable internal price is refused at dispatch with this same model_not_found (deliberately indistinguishable on the wire from a deprecated/absent model) so it is never served at an implicit $0. Deterministic (no retry) and not paged (no triage row) — a platform admin setting a real price makes it usable. Non-chat fleet models (embeddings/rerank/image/speech) are priced at zero on purpose and are not affected. (d) A Myra-hosted model on a first-party provider route (a client error): a request on an explicit route of a provider that serves only its own models (anthropic, openai, xai, perplexity, cohere) — the native /v1/{tenant}/{gateway}/anthropic/v1/messages passthrough, or /v1/{tenant}/{gateway}/{provider}/… — names a Myra-hosted model (for example qwen3.8-27b, a retired id such as qwen3.6-27b, or myra/<id>) that the provider does not list itself, and the gateway does not send that provider to your own base URL. After routing rules have been applied, the gateway refuses it before any upstream call, instead of forwarding a request the third party can only answer with its own 404. The message names the model and the provider, gives the successor for a retired id, and points to the same endpoint on the myra provider (/v1/<tenant>/<gateway>/myra/<same path>, plus /compat/chat/completions for a chat-completions caller), provided the gateway serves Myra models. For an agent it says to change the agent's model or provider instead. The check runs per request: an agent saved with such a pair is accepted and then refused on each run. No model-error triage row, no retry. Routing-rule fallbacks do not change this (a provider's 4xx is never retried on a fallback). Providers that host open-weight models (OpenRouter, Together, Groq, Gemini, …) are not affected. (e) A legacy routing rule with an unservable target (a configuration error): a rule saved before the model_not_servable save check, or whose model was retired since, sends the request to a (provider, model) pair the provider does not serve. The message names the model and the provider and says a gateway admin must change or disable the rule. Refused before any upstream call, when no fallback can take over. After a tool result: when the gateway refuses the server-side tool loop's model call after a tool result for this reason, the turn ends with this code (non-retryable, no model-error triage row) — see After a tool result.
model_not_allowed_for_project 403 The conversation is in a project restricted to local models only, and the requested model does not resolve to a local model. The request is refused before any upstream call. Pick a local model to continue. Also returned by the conversation-route PATCH (see Route policy validation) when a pin would move a local_only conversation onto a non-local model — refused at save so the pin cannot brick the conversation. And by the conversation-summary (compaction) call, which is generated from the conversation's own text and so is refused for a local_only project on a non-local model before anything is sent.
local_only_egress_blocked 403 A conversation in a Local only (Tier-1) project was refused because the request could not be confirmed to stay inside Myra's infrastructure. Three causes. (a) After the reply was generated: Myra's model fleet reports which of its servers produced each reply (the x-litellm-model-api-base response header from the fleet's router — untrusted upstream data, validated by the gateway). The reply is accepted only when that names a host under the Myra estate domain (*.myra.eu); it is refused when the named host is anything else (another provider's host, an IP address, loopback), when the value is malformed (not a single string — e.g. a repeated header — or not a URL with a host), or when it is missing on a route where the fleet always reports it (chat completions, embeddings, buffered legacy completions; the models route is treated the same way). On the routes where the fleet never reports it (the Anthropic-native /v1/messages and its count_tokens, streamed legacy /v1/completions) a missing value is not refused, but a present one is still checked. The reply is withheld before any byte reaches the client and nothing of it is stored. (b) Before anything is sent: the gateway is configured to send the local model provider to its own endpoint (provider_base_urls.myra) instead of Myra's fleet — a Local only project is served by Myra's fleet only. (c) Before anything is sent, operator side: the deployment's address for Myra's fleet is not inside the Myra estate (a *.myra.eu name, or a private IPv4 address of Myra's own fleet network: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16; a public address, loopback and IPv6 stay outside) — nothing is sent until the operator corrects it (logged at error level). A deterministic policy refusal (no retry on the same model, no model-error triage row; the next local fallback may serve); the cause (a) is logged at error level for Myra operations. When the conversation is restricted only because its project binding could not be confirmed at that moment, the same refusal answers with the retryable project_tier_unresolved (503) instead — never the permanent "only Myra models" claim during a transient fault (after a tool result it ends as a retryable provider_error, with Try again). Also returned by the conversation-summary (compaction) call. After a tool result: when the gateway refuses the server-side tool loop's model call after a tool result for this reason, the turn ends with this code (non-retryable, no model-error triage row) — see After a tool result.
project_tier_unresolved 503 The conversation's project binding could not be confirmed for this request, so its data-residency tier is unknown and the turn is refused (fail-closed) rather than risk egressing a restricted conversation. Retryable — this is a transient state (the binding resolves on retry), NOT the permanent model_not_allowed_for_project; the message avoids the false "only local models" claim for a project that may not be local at all. See How the egress tier is resolved. Also returned by create-from-share (POST /admin/v1/conversations with source_share_token) when the source conversation's binding cannot be read transiently — the continuation is refused rather than created unbound, and retryably, because the source's project may not be restricted at all. See Continuing a shared conversation. Also returned when moving a conversation out of a gateway-locked project and the caller's project role (owner or not) cannot be read — retry.
share_source_project_forbidden 403 Continuing a shared conversation (POST /admin/v1/conversations with source_share_token) whose source lives in a project the caller is not authorized on and whose access tier is restrictive (Local only or PII mandatory) — or whose binding cannot be confirmed at all (the project belongs to another workspace, was deleted, or its tier is unrecognized). Copying a restricted transcript into an unbound conversation would strip the residency guarantee that project exists to provide, so the continuation is refused instead. Permanent — unlike project_tier_unresolved there is nothing to retry; ask the project's owner for access. "Not authorized" and "could not confirm" deliberately share this one code, and the message names no project, workspace, tier or owner, so the response is not an oracle over a stranger's project. See Continuing a shared conversation.
guardrail_unavailable 503 A request-phase safety guardrail is DOWN and the gateway is configured to refuse rather than skip it, so the request was rejected instead of being sent unscanned. Retryable — nothing about the content was wrong, which is why it is deliberately not guardrail_blocked (400, permanent). On a chat turn this same condition is delivered as a "temporarily unavailable" policy bubble rather than a typed error; the typed code is what non-chat callers (the conversation-summary call, and POST /admin/v1/chat/files when the cut of an over-long inline text cannot be masked) receive.
guardrail_unconfigured 503 A request-phase safety guardrail is not set up (for the Prompt Injection detector: the classifier has no usable endpoint or credential) and the gateway is configured to refuse rather than skip it, so the request was rejected instead of being sent unscanned. Not retryable — every request is refused until an administrator sets the guardrail up (or turns on its fail-open). Deliberately distinct from guardrail_unavailable (a transient outage). On a chat turn it is delivered as the guardrail_unconfigured policy bubble, without a Try again action; the typed code is what non-chat callers (currently the conversation-summary/compact route) receive.
guardrail_doc_too_large 503 A PII scan could not finish inside its wall-clock budget because the document was too large for the sidecar's current throughput, so the request was refused (fail-closed) rather than sent unscanned. Retryable — and it genuinely converges: the chunks already scanned are cached, so a re-upload measures faster and fits. Deliberately distinct from guardrail_unavailable (a generic transient outage) and provider_quota_exhausted (a provider billing 503): the honest guidance is "too large right now, try again", not "temporarily unavailable". On a chat turn it is delivered as the guardrail_doc_too_large policy bubble with a Try again action; the typed code is what non-chat callers (currently the conversation-summary/compact route) receive. See Large messages: chunked analysis and the scan budget.
project_access_unresolved 503 The authoritative check of your access to a conversation's project failed transiently while continuing a shared conversation. Retryable, and deliberately distinct from a denial: a database fault is not "you are not a member", and refusing on it would hand out a permanent-sounding refusal for a project you may well belong to. Also distinct from project_tier_unresolved, which is the same class of fault on the project's tier read — keeping them apart says which of the two authorities is degraded. See Continuing a shared conversation.
share_pii_masking_unavailable 503 Minting a public share link for a conversation whose gateway masks personal data, while the masking check is temporarily unavailable. Nothing is stored. Retryable.
share_pii_unmaskable 422 Minting a public share link where a gateway requires personal data to be masked but cannot mask it for a public link (including a conversation whose owner no longer exists while a gateway masks). No link is created. Permanent until the gateway configuration changes.
share_too_large_to_mask 422 Minting a public share link for a conversation too large to mask. No link is created. Permanent for that conversation.
share_needs_recreate 403 GET /share/<token>, the owner's GET /admin/v1/conversations/<ID>/share and the share-continue endpoint on an unmasked link that was created before masking applied, while a gateway of the conversation now masks personal data or a PII mandate is in force. Permanent; the owner revokes the link and creates a new, masked one.
share_unreadable 500 The owner's GET /admin/v1/conversations/<ID>/share when the stored snapshot of the link cannot be decoded. No token or URL is returned. Permanent; the owner revokes the link (DELETE) and creates a new one.
share_restricted_project 403 Minting a public share link (POST /admin/v1/conversations/{id}/share) for a conversation whose project restricts data residency (Local only or PII mandatory), or whose project binding cannot be confirmed. A share link is a persistent, unauthenticated read credential, so one click would publish the transcript of a project that exists to keep its data inside the estate. Permanent — the remedy is to move the conversation out of the project first (which requires owner rank on it and is audited), or to ask the project's owner. Also returned by GET .../share, so an owner is never handed a live-looking URL for a link the public read refuses. Addressed to the owner, who has a remedy — unlike the cause-neutral share_source_project_forbidden a public recipient receives.
pii_twin_unavailable 409 POST /admin/v1/conversations, PATCH /admin/v1/conversations/{id} (a route re-resolve carrying a model or gateway pick): the user's Privacy preference (hint_pii_preference) is on and the model they named (or the project's pinned model) is a cloud model that no gateway of the workspace can run with personal-data masking. Nothing is created. Turn Privacy off to send without masking, or choose another model; the chat shows this as a notice and keeps the draft. See Conversations.
invalid_hint_pii_preference 400 POST /admin/v1/conversations, GET /admin/v1/conversations/route-preview or PATCH /admin/v1/conversations/{id}: hint_pii_preference is present but not one of null, true/false, 1/0, "1"/"0". Refused before any routing; nothing is created or changed. See Conversations.
route_changed 409 POST /admin/v1/conversations with an expected_route: the server's own route resolution picked a different gateway or model than the one the client previewed (GET /admin/v1/conversations/route-preview), or the same gateway now masks differently than the preview's masks said, because something changed on the server in between (a gateway disabled, a model gone, a grant revoked, a gateway's masker switched off or on). Nothing is created. Ask the preview again, show the new route, and send again. See Binding the create to the previewed route.
invalid_expected_route 400 POST /admin/v1/conversations: expected_route is present but not an object with exactly a non-empty string gateway_id (at most 36 bytes) and model (at most 128 bytes) plus an optional boolean masks — null, another type, a missing / empty / oversized field, invalid UTF-8 or a control / invisible character, a masks that is not true or false (null, "true", 1, an object), or an extra key — or it was sent on a share continuation. Refused before any routing; nothing is created. See Conversations.
invalid_route_preview_parameter 400 GET /admin/v1/conversations/route-preview: a query parameter other than project_id and hint_pii_preference (for example hint_model_override or hint_task_slug), or one of them repeated or without a value. The preview covers Auto only. Refused before any routing. See Conversations.
already_shared 409 Minting a public share link with "if_absent": true (POST /admin/v1/conversations/{id}/share) for a conversation that already has one — for example one created meanwhile in another tab or on another device. The existing link is left untouched (it may already have been sent). Not an error to retry: read the existing link with GET …/share. Also returned for a mint without if_absent that lost a race against a concurrent mint.
invalid_if_absent 400 POST /admin/v1/conversations/{id}/share carried an if_absent that is not a JSON boolean (a string, a number, null, an object), or a body that is valid JSON but not an object (null, true, a number, a string, an array). Rejected rather than read as "absent", because absent means replace the existing link. Nothing is written.
invalid_words 400 POST /admin/v1/me/pii-keywords/batch (and POST /admin/v1/me/pii-keywords/upload, which runs the same validation): at least one line of the list is not a bare word. The body carries invalid, an array of { "line", "reason" } naming every refused line, with a reason of space, control_chars, metachar, unicode_forbidden, no_word_char or too_long. The whole list is refused: nothing is stored, including the valid lines. A body that is not valid UTF-8 or is blank is answered earlier (bad_utf8 / empty) and never appears in invalid. See Account — bulk keyword add for what each reason means.
project_release_forbidden 403 Releasing a conversation from a project that restricts data residency — detaching it (PATCH …/conversations/{id} with project_id: null) or moving it to another project — without owner rank on that project. Attaching is membership-gated because the conversation would gain the project's knowledge; releasing is the direction that drops a residency guarantee, so it is gated on the rank that could lower the project's tier or delete the project anyway. Also returned, with no owner exception (platform admins aside), when the current project cannot be confirmed at all — nobody holds owner rank on a project that no longer resolves. Permanent; the committed binding is unchanged.
agent_area_unresolved 403 A saved agent is bound to a knowledge area that no longer exists (it was deleted after the agent was configured). The gateway cannot tell what data-residency policy that area carried, so the run is forced to the most restrictive setting on both axes — local models only, PII masking on — and a cloud-pinned agent therefore cannot dispatch. Permanent, not retried: unlike project_tier_unresolved the area is gone for good, so a scheduled agent fails every run until it is fixed; and unlike model_not_allowed_for_project it does not claim a project that no longer exists or offer a remedy ("pick a local model") the owner of an unattended run cannot perform. Open the agent and save its knowledge areas. See Knowledge areas.
project_tenant_mismatch 403 A conversation was to be bound to a project of another workspace than its owner's, or a project-bound conversation was to route through a gateway of another workspace — on create (POST /admin/v1/conversations, incl. a hint_model_override to a foreign gateway with a project bound), on a move (PATCH …/conversations/{id} changing project_id, gateway_id or the override) and on a fork (POST …/conversations/{id}/fork). Platform administrators included — there is no cross-workspace project chat. Permanent: retrying cannot change which workspace a project lives in; pick a project of your own workspace (or route a project-less conversation). Carries the code in error and in a sibling code. Before this refusal existed such a conversation was created and then failed every message with conversation_project_unresolved. See Project binding stays in one workspace.
conversation_project_unresolved 403 The conversation belongs to a project that no longer exists, so its data-residency tier cannot be read and the turn is restricted to local models. Unlike the retryable project_tier_unresolved (a transient read fault), the binding is gone for good: pick a local model to continue here, or start a new conversation.
department_gateway_not_allowed 403 The caller's (on agent create / update: the agent owner's) department does not allow this gateway (or the department no longer exists / allows nothing — fail closed). Returned by every inference lane (for the user, the agent owner and a bridge driver), by the conversation create / route PATCH, and by token minting. Pick a model on an allowed gateway. On agent create and update (POST /agents, PATCH /agents/{id}) the body also carries subject: "owner" when the refusing department is the agent owner's (an administrator editing another member's agent), "caller" when it is the caller's own. The field is absent on every other lane and on project_gateway_locked; a client treats an absent or unknown value as "caller".
project_gateway_locked 403 The project of this conversation (or a project whose data the request would attach) is locked to a different gateway — see Departments. Also: changing a locked project's gateway (409), deleting it or releasing a conversation from it by someone who is neither department administration nor the project's owner.
department_policy_unavailable 503 The department / project-lock policy could not be read and no answer from the last 5 minutes is available on this server. Retryable.
invalid_identity 403 The request's bound identity is malformed (never read as "no department").
department_pii_twin_not_allowed 409 Conversation create / re-route: the request needs PII masking, but the masking twin of the chosen gateway is outside the caller's department (or the project lock).
department_no_gateway 409 Conversation create / re-route: the caller's department (∧ the project lock) allows no gateway that can answer.
gateway_list_unavailable 503 / 500 Conversation create / re-route: the tenant's gateway list could not be read, so no route can be chosen safely (the PII-twin and department checks need it). 503 with a Retry-After header only when the fault is a transient database fault (retry); otherwise 500 with the same code (retrying does not help). No route is chosen and no conversation is created either way.
gateway_config_unavailable 503 / 500 Conversation create / re-route: a gateway's configuration could not be resolved, so no route is chosen and no conversation is created. An explicit choice is never routed onto such a gateway: a model override, a project pin (with or without a model) or a department default naming it is refused even when a healthy PII twin would serve, and so is a route that lands on it after a PII-twin redirect (also for a personal default model); a non-production gateway (platform administrator) is no exception. 503 with a Retry-After header only when the fault is a transient database fault (retry), otherwise 500 with the same code. Who decides: for an explicit choice, the faulted gateway itself (the named one, else the one the route lands on); for Auto, every unresolved production gateway in scope; when no gateway is pickable at all, every unresolved production gateway in scope, pin or not.
tenant_ctx_unavailable 503 / 500 Conversation create / re-route: the tenant's routing context could not be read. 503 with a Retry-After header only on a transient database fault; otherwise 500 with the same code. No route is chosen and no conversation is created either way.
gateway_in_use_by_department 409 Gateway delete refused while a department allows / defaults to it or a project is locked to it.
department_target_outranks 403 Department administration below the tenant-admin role: the target user (or a member of the department being changed) outranks the caller.
project_governance_forbidden 403 GET/PUT /projects/{id}/governance by a caller who is neither department administration (tenant admin with DEPARTMENTS_MANAGE) nor the project's owner (access below owner, a read-only platform role, or an impersonation session). See Departments.
department_not_yours 403 PUT /projects/{id}/governance by the project's owner naming a department that is neither the project's current department nor the owner's own (also for an unknown department id — no existence oracle).
project_department_changed 409 PUT /projects/{id}/governance: the project's department is no longer the expected_department_id the caller sent (it changed meanwhile). Nothing is written; reload and try again.
expected_department_id_required / invalid_expected_department_id 400 PUT /projects/{id}/governance without expected_department_id (absent or ""), or with a value that is neither a department id nor null.
expected_gateway_locked_required / invalid_expected_gateway_locked 400 PUT /projects/{id}/governance without expected_gateway_locked, or with a value that is not a boolean.
invalid_expires_at / gateway_id_invalid / invalid_body / invalid_locked 400 Group gateway grants and the department lock: PUT /groups/{id}/gateways/{gateway_id} with an expires_at that is not an integer Unix time in the future up to 4102444800 (or null), an empty or over-long gateway id, or a body that is present but not a JSON object; locked on a department create / PATCH that is not a boolean. See Gateway grants.
project_lock_changed 409 PUT /projects/{id}/governance: the project's gateway lock is no longer the expected_gateway_locked the caller sent (it changed meanwhile). Nothing is written; reload and try again. Also the apply_failed reason of a held governance change whose lock state changed while it waited for approval.
gateway_not_allowed_for_project 403 Returned by the conversation-route PATCH (see Route policy validation) when a pin's resulting gateway cannot satisfy the conversation's PII policy — a pii_mandatory project, or a tenant with mandatory PII masking, pinned to a gateway that does not scrub request-phase PII — or when the gateway_id is unknown (any caller), or belongs to another tenant, or names a gateway that does not route (purpose other than production); the last two apply to non-admin callers only (platform admins may route cross-tenant and may pin a non-production gateway deliberately for triage). The routability refusal fires only on a MOVE — a request naming a DIFFERENT gateway than the one the conversation already sits on — so an unrelated edit, or a model switch that re-sends the committed gateway, is never refused and an existing conversation cannot be bricked. Refused at save so a picker click cannot brick the conversation for every subsequent message. On the PATCH, platform admins may route through another tenant's gateway. Also returned by create-from-share (POST /admin/v1/conversations with source_share_token) for a non-production gateway; a gateway outside the caller's workspace there is gateway_outside_owner_tenant.
gateway_outside_owner_tenant 403 The named gateway is not one of the owner's own workspace's gateways (or is unknown, on the share-continue path), or the owner belongs to no workspace. Returned by every user-bound token mint — POST /me/tokens, POST /users/{id}/tokens, POST /me/connect/ox, POST /device/approve (see A token lives in its owner's own workspace) — by creating a scheduled task (POST /scheduled-tasks) — and by continuing a shared conversation (POST /admin/v1/conversations with source_share_token, see Continuing a shared conversation stays in your workspace), platform administrators included. Permanent: pick a gateway of the account's own workspace. Carries the code in error and a sibling code, the prose in message.
gateway_id_required 400 A route that needs a gateway_id got none (absent or JSON null). Nothing was created. GET /admin/v1/chat/voice/availability answers it for a missing query parameter.
gateway_id_invalid 400 A present gateway_id is not a gateway id: not a string, "", longer than 36 bytes, invalid UTF-8, or containing a control, line-break or invisible formatting character (a number, boolean, object …; see refused characters). Rejected before any lookup — never read as absent. GET /admin/v1/chat/voice/availability also refuses an upper-case id and any id that is not a lower-case UUID.
invalid_web_search 400 (formerly web_search_invalid) A present web_search is not an accepted value. POST /admin/v1/conversations / PATCH /admin/v1/conversations/{id}: not 0/1 ("0"/"1"/false/true are accepted); null, other numbers, strings, objects and arrays are refused — nothing is created or changed. See Conversations. POST /admin/v1/tenants/{id}/gateways / PATCH /admin/v1/gateways/{id}: a config.web_search that is not an object (an array, string, number or boolean; JSON null is accepted and clears the block), a web_search.enabled that is present, not null and not a JSON boolean (body carries field: "web_search.enabled"), or a web_search.mode that is present, not null and not exactly "opt-in" or "always" (body carries field: "web_search.mode" and allowed) — nothing is stored.
gateway_id_unknown 400 POST /admin/v1/mcp: the optional gateway_id binding names no gateway of the connector's workspace (unknown, or another workspace's — the same answer).
plan_model_not_allowed 403 The workspace is on a self-serve plan and the requested model is not included in that plan's model list. The request is refused before any upstream call. Pick a model included in your subscription. Fails closed: a misconfigured (empty) plan model list denies every model. On save the same code is returned with 400 when an agent, a project's gateway + model pin, a scheduled task or a gateway's agentic_fetch.model names a model outside the plan (judged on the retired-id successor); a model saved earlier that the plan no longer permits runs on the gateway's Auto choice instead (stored pins only — see Tenant entitlements). Also 400 from POST /admin/v1/gateways/{id}/managed-models when enabling a Myra-provided model the plan does not include (nothing is enabled). See Billing.
eu_gov_model_not_allowed 403 The workspace is on a paid self-serve plan and requested a Myra-hosted (non-commercial, provider-class myra) model without the EU-Gov add-on entitlement (myra_hosted_models). Commercial providers (Claude, OpenAI, …) are always allowed. The request is refused before any upstream call — pick a commercial model, or have the EU-Gov add-on granted. The 7-day free trial (self_serve_trial) is exempt — its two Myra EU models are entitled by plan design, so a trial never sees this code for them. Fails closed: an unresolvable/absent grant, and an unresolved provider, both deny. Grant source: the EU-Gov add-on the workspace's subscription bills (bought with the trial conversion, granted while the subscription serves), or a manual tenant entitlement row for the eu_gov add-on. On save: 400 with the same code for a stored pin or agentic_fetch.model naming a Myra-hosted model without the grant. Platform infrastructure services (OCR, vision, embeddings, guards, speech, image generation, the default fetch inner model) are exempt. See Billing.
subscription_inactive 402 The workspace is on a self-serve plan whose subscription is inactive (payment overdue past its grace period, cancelled, or under dispute). Inference is blocked; the account and billing pages stay reachable so the subscription can be reactivated. During the grace period after a failed payment, inference still works. See Billing.
trial_expired 402 A trial workspace whose trial phase has ended (trial_ends_at is in the past). Inference is blocked; the account/admin pages stay reachable to upgrade (self-serve) or for a platform admin to extend the trial (admin-provisioned demo). For a self-serve free trial, a companion trial_budget_exhausted (402) covers the other end condition; for an admin-provisioned demo the spend cap surfaces as quota_exceeded (429). See Billing / Tenants.
invalid_convert_to_managed 400 convert_to_managed on a tenant PATCH was not boolean true. See Tenants.
convert_to_managed_conflicts 400 convert_to_managed was combined with a plan change (including a trial-to-plan conversion or plan: null).
trial_ends_at_conflicts_with_conversion 400 A conversion (plan change or convert_to_managed) carried a non-null trial_ends_at; the conversion ends the trial.
convert_to_managed_self_serve 400 convert_to_managed on a self_serve_* tenant; its trial is owned by the subscription.
convert_to_managed_test_tenant 400 convert_to_managed on a tenant in the analytics account group test (not a customer; no paid milestone is recorded for it).
trial_budget_exhausted 402 A self-serve free-trial workspace whose prepaid wallet balance (seeded by the trial) cannot pay the request before the 7 days elapse — the wallet refuses the call's reservation (on /v1, a tool-loop or sub-agent call, or the summarize/compaction call). Distinct from trial_expired (time) so the SPA shows a "credit used up" upgrade screen; inference is blocked while the account/billing pages stay reachable to upgrade. Not the generic quota_exceeded (429) — a trial has no subscription to renew against. See Billing.
trial_gateway_locked 403 A free-trial workspace tried to change a gateway setting the trial fixes (budget, budget period, provider allowlist): PATCH /admin/v1/gateways/{id}, or to create or delete a gateway (POST /admin/v1/tenants/{id}/gateways, DELETE /admin/v1/gateways/{id} — the trial topology is server-fixed), a guardrail-config import that changes the allowlist, or a governance template apply of a locked control. Sent as a sibling code next to the error prose; the web app answers with an upgrade hint. Not retryable on the trial; upgrade to a paid plan. The one exception is budget_usd after a voucher has been redeemed, which is editable as long as the gateway budgets together stay within the wallet balance (see trial_gateway_budget_over_balance). See Tenants & gateways.
data_required 400 POST /admin/v1/projects/{id}/knowledge/upload: data is absent, null or "". Sibling code next to the error prose. Not retryable. See Projects.
invalid_data 400 (formerly data_invalid_base64) The knowledge upload's data is present but not a base64 string, or does not decode. Not retryable.
invalid_mime_type 400 The knowledge upload's mime_type is not a string, is malformed UTF-8 or is over 128 characters. Not retryable.
file_too_large 413 The uploaded file is over the size limit for its type. Not retryable.
text_too_large 413 The uploaded plain-text file is over 7.5 MB. Not retryable.
unsupported_file_type 422 The uploaded bytes match no supported document type and are not text (for example an archive). Not retryable.
pdf_unreadable 422 The uploaded PDF is corrupt or password-protected. Not retryable.
pdf_check_unavailable 503 The uploaded PDF could not be checked right now. Retryable: the response carries Retry-After: 10.
trial_gateway_budget_over_balance 400 A free-trial workspace that has redeemed a voucher set a gateway budget_usd above the ceiling (the larger of the gateway's stored cap and the wallet's spendable balance minus the caps of the workspace's other gateways, so all gateway budgets sum to at most the balance). The body carries max_usd, the ceiling (rounded down to the cent). Lower the value. See Tenants & gateways.
wallet_insufficient 402 A self-serve workspace past its allowance whose prepaid wallet balance cannot pay even a minimal answer of the requested model (about 500 output tokens, or a reasoning model's visible-answer reserve, plus the request's input). Refused before the model call is sent — nothing is charged and the balance is untouched. Not retryable as is: top up the wallet (or wait for the allowance to reset). A free trial gets trial_budget_exhausted instead. Also returned mid-request when a later model call of the same request (a tool-use round, a continuation) can no longer be paid. See Budgets — Wallet.
workflows_disabled 403 The workflows feature is not enabled for the workspace. The workflow builder and workflow runs are unavailable until an admin enables the feature for the tenant. See Workflows.
agents_disabled 403 The Agents feature is not enabled for the workspace. A human agent invoke (interactive /agents/{slug}/invoke, the run-as-self preview, the in-chat agent bridge) is refused until an admin enables Agents for the tenant (agents_enabled). The admin /agents routes return the plain feature_disabled form of this block. See Agents.
feature_disabled 403 An admin route for a per-tenant feature (Workflows, Agents, Playground, or Scheduled tasks) was called while that feature is disabled for the workspace. The response names the feature: { "error": "feature_disabled", "feature": "<name>" } where <name> is one of playground, agents, workflows, or scheduled_tasks (so the cause is actionable without checking each flag by hand). The user-facing inference and invoke paths return the feature-specific code instead (workflows_disabled, agents_disabled); the plain feature_disabled (now feature-tagged) form is what the feature's /admin/v1/... routes return. The internal email-ingest path (/internal/workflow/ingest-email) likewise tags its { ok: false, error: "feature_disabled" } result with "feature": "workflows". Enable the feature for the tenant. The web app answers it on the Agents list with "Agents is not enabled for this organisation. An admin can turn it on." instead of a generic load error.
tenant_not_found 404 The tenant or gateway slug in the URL does not exist.
invalid_async_id 400 GET /v1/{tenant}/{gateway}/async/{id}: the id is not exactly 32 lowercase hexadecimal characters. See Fetching an asynchronous result.
invalid_prefer_header 400 A Prefer header on a non-streamed POST to the chat-completions, Messages or agent invoke route that cannot be parsed (for example respond-async=1, respond_async, an unterminated quoted string, or over 1 KiB). The request is not run. See Running a non-streamed request in the background.
async_auth_required 403 The same route on a gateway that does not require an API key. Results belong to an API key, so there is nothing to look up without one.
async_result_not_found 404 The same route: no result with this id exists for the calling API key. An unknown id, an expired result and a result owned by another key all answer identically.
async_result_lost 500 The same route: the request was accepted but never produced a result and its processing window has passed. Submit it again.
endpoint_not_found 404 The URL names a real provider but a path that is not a servable endpoint on it. Only a fixed allowlist of whole paths is accepted — /chat/completions, /completions, /embeddings, /v1/messages, /v1/messages/count_tokens, and /v1/models (an optional /v1 prefix allowed). The entire path is matched, not a trailing suffix, so a hostile prefix (/internal-admin/embeddings) is refused too. For an explicit provider the check runs in the request's access phase before the token is read, so an invalid token on an unknown endpoint still returns this 404 rather than 401; for the /compat surface the same allowlist is re-checked after the provider is resolved from the model. This is an authorization boundary: each provider forwards the path verbatim into its upstream URL, so an unvalidated path would let a caller aim a request (carrying the gateway's or the platform's upstream credential) at an arbitrary upstream path. A missing/bare path (a bare …/{provider} URL, an empty suffix, or a bare /v1) is refused too — append an explicit endpoint such as /chat/completions; an absent path fails closed exactly like a present, unrecognised one (they share the reject outcome, never a permissive dial). See Only servable endpoints are accepted.
project_not_found 404 A project_id (knowledge area) that does not exist, belongs to another tenant, or that the caller cannot see. One answer for all three, so a caller cannot probe whether a foreign id exists. Returned by the sales-knowledge search and by an agent run or preview that names project_ids (see Agents).
model_not_allowed 400 Copilot direct document AI: the request names a model that is not offered for this workspace, or model is not a string. A wrong value is refused, never replaced by the default model.
conversation_not_found 404 An admin conversation route (GET /admin/v1/conversations/{id}, POST/PATCH/DELETE …/messages…, GET …/messages/by-client-id/{cid}) was called for a conversation the caller cannot see at all: unknown id, deleted (in another tab, on another device, or by retention), or never shared with them. One answer for all three — no existence oracle. Never returned for a conversation the caller can still read (those get 403 live_not_driver / forbidden on a write), so the app treats it as "this conversation no longer exists": it clears the thread, drops it from the list, shows a non-error notice and returns to the start page, keeping any draft. The error prose differs per route ("not_found" on the GET, "conversation not found" on the message writes); clients key on the code. See Getting a conversation and Messages.
conversation_not_empty 409 DELETE /admin/v1/conversations/{id}?if_empty=1 refused: the caller's conversation has (or ever had) a message, so it is not deleted and nothing of it is touched. The app's discard of the empty conversation a stopped first send leaves uses this flag, so a message another tab or device wrote meanwhile is never lost — the app keeps the conversation and reports nothing. Only the owner can receive it; a foreign / unknown / already-deleted id still gets the idempotent 200. See Deleting a conversation.
invalid_if_empty 400 DELETE /admin/v1/conversations/{id} with an if_empty query parameter that is not exactly 1 (another value, empty, a bare flag, or repeated), or a near-miss key (IF_EMPTY, if_empty[]). Rejected before anything is deleted — a malformed flag is never read as absent (which would be the unconditional delete).
invalid_turn_id 400 POST …/turns/{turn_id}/stop or GET /admin/v1/conversations/{id}/turns/{turn_id} with a turn_id that is not 1-36 characters of A-Z a-z 0-9 . _ - : +. Nothing is read or written — a malformed id is never treated as "no turn running". See Stopping a running turn.
turn_in_progress 409 A turn-owned chat request names a parent message that already has a live turn of the same conversation (a different x-aig-turn-id, claim refreshed within the last 60 seconds, not stopped). Refused before any model call; nothing is billed or saved. Standard error envelope: {"error": {"code": "turn_in_progress", "message": "...", "turn_id": "<running turn>"}} (on an already-open stream, the same code and turn_id as an error frame). Poll GET /admin/v1/conversations/{id}/turns/{turn_id} until it is no longer running.
tool_confirm_pending 409 A chat turn on a conversation where a tool confirmation card waits for its answer (or for its turn to continue): answer or cancel it first. Refused before any model call; {"error": {"code": "tool_confirm_pending", "message": "...", "confirm_id": "<card>"}}. See Chat tool confirmation.
tool_confirm_unavailable 409 A request continuing a tool confirmation card (x-aig-tool-confirm) that is not yours, already continued, expired, or no longer fits the conversation; nothing ran. On an already-open stream, the same code as an error frame.
tool_confirm_not_found 404 POST …/tool-confirm/{confirm_id}: not your card, not this conversation's card, or no such card.
tool_confirm_already_decided 409 POST …/tool-confirm/{confirm_id}: the card was answered already.
tool_confirm_expired 409 POST …/tool-confirm/{confirm_id}: the card waited longer than 24 hours.
allow_for_conversation_unavailable 409 POST …/tool-confirm/{confirm_id} with allow_for_conversation: the conversation now contains untrusted content; nothing was saved.
allow_not_offered 400 POST …/tool-confirm/{confirm_id}: allow_for_conversation names a tool the card did not offer it for.
invalid_decision / invalid_allow_for_conversation / allow_requires_run 400 POST …/tool-confirm/{confirm_id}: decision is not run / cancel; the allow list is not 1–32 strings of 1–200 bytes; an allow list with cancel.
invalid_grant 400 DELETE …/tool-grants without a valid connector_id and tool.
tool_approval_not_found 404 POST …/tool-approvals/{approval_id}/withdraw: not your conversation, not this conversation's request, or no such request. See Approval by someone else.
tool_approval_already_decided 409 POST …/tool-approvals/{approval_id}/withdraw: the request was already approved, rejected, expired or withdrawn.
own_request 403 Approving or rejecting a chat approval you asked for yourself (/admin/v1/me/tool-approvals/{id}/… and /admin/v1/review-items/{id}/…): body {"error": "own_request"}. Also the second step of a four-eyes delivery release (/admin/v1/me/delivery-releases/{id}/release or /reject) by its owner or its first approver.
release_denied / release_expired 403 The loopback /internal/workflow/deliver-clearance for a workflow Deliver step whose delivery release was rejected or expired: body {"error": "release_denied"\|"release_expired", "cleared": false, "release_id", "disposition", "reasons"}. The step is not delivered.
release_changed 403 The same route when the Deliver step's destination is no longer the one that was released (nothing is sent).
attachment_not_released 400 The loopback /internal/workflow/deliver-email for a released external send that names an attachment (handle): a release covers the composed result only (nothing is sent).
invalid_release 403 The loopback /internal/workflow/deliver-email for an external recipient on a masked run whose release_id is not the step's claimed release for exactly that recipient (nothing is sent).
confirm_required 400 POST /admin/v1/me/delivery-releases/{id}/release for a release whose run also carried untrusted content, without "confirm_untrusted": true. Nothing is decided. See Delivery releases.
already_decided 409 POST /admin/v1/me/delivery-releases/{id}/release or /reject: the release was already released, rejected, expired or handed to the delivery, or another decision won the race.
expired 409 POST /admin/v1/me/delivery-releases/{id}/release or /reject: the release's deadline has passed; it is not delivered.
bad_channel 400 POST /internal/scheduler/deliver-clearance with a channel hint that is not mattermost, webhook, email or null.
not_approver 403 Approving or rejecting a chat approval you are not an approver of: body {"error": "not_approver"}.
temporarily_unavailable 503 POST /admin/v1/conversations/{id}/turns/{turn_id}/stop could not reach the database: the Stop was not recorded. Retryable — send the same Stop again (the app repeats it about once a second). Also the admin project-governance checks (a failed gateway or tenant read) and the device-code sign-in storage conflict. See Stopping a running turn.
invalid_client_message_id 400 POST /admin/v1/conversations/{id}/messages with a client_message_id that is not 1–64 characters of A–Z a–z 0–9 _ - (JSON null, a number, an empty string, too long, other characters), or on a message whose role is not user; also the lookup GET …/messages/by-client-id/{id} with such an id. Nothing is written or read — a malformed id is never treated as absent. See The client message id.
client_message_id_conflict 409 POST /admin/v1/conversations/{id}/messages with the client_message_id of a message in that conversation that was deleted, or of a message with a different role or text: nothing is written, and that other message is not reported as saved.
message_not_found 404 GET /admin/v1/conversations/{id}/messages/by-client-id/{cid}: no stored user message in that (visible) conversation carries the id — it was never saved, or it was deleted.
row_too_large 413 A message write (PATCH …/messages/{id} with content or corrected_content, the legacy POST …/messages commit) would make the message row larger than the database can read back in one packet — its large text columns (content, corrected_content, and a web-search turn's sources / search-steps lists) may total ~15.9 MB. The row is unchanged; shorten the text. A deterministic refusal of the caller's input, never a server fault: the app shows a notice and does not report a client error. See Messages.
empty_message 400 A message edit (PATCH …/messages/{id} with content_text or content) whose text is empty or whitespace-only (the JavaScript trim() set). Nothing is written and the message keeps its text; the app disables Save on a blank draft and shows a hint. Clearing a display correction is a different operation (corrected_content: "") and is not affected. See Messages.
attachment_too_large 413 A conversation attachment upload (POST /admin/v1/conversations/{id}/attachments) whose decoded file exceeds the 110 MB chat-upload limit; the body carries max_bytes (110000000). Nothing is persisted. A larger request body is refused earlier by the edge as payload_too_large (below). Files up to the limit are stored in chunks, so the former 16 MB packet ceiling no longer applies. See Attachments.
scan_limit_exceeded 413 Malware scanning (opt-in per gateway) reported that the file exceeds the scanner's size limit; the file is never treated as clean and nothing is stored. No Retry-After (retrying cannot help).
invalid_request 400 Malformed request body, missing required fields, or an unrecognised parameter value. Also returned when the provider answered a 5xx that names a request-content defect (Invalid user message at index N as a 500, Unknown part type: … as a 501) and every leg of the fallback chain ended that way: the request is not retried and does not count against the circuit breaker, and the caller gets this 400 rather than all_providers_failed, with the provider's reason (wrapper stripped, at most 256 bytes) as the message. The recorded provider status stays the real 5xx. See Fallback and retry. Also returned when the request names a provider the gateway has not configured — e.g. a provider/ model prefix that resolves to a keyless provider this gateway did not opt into (no provider key / provider config for it). This is a client error, refused at the routing boundary before any upstream call — distinct from a provider the gateway did configure being down (all_providers_failed, 502). The equivalent rejection at save time (pinning that provider as a default, or summarizing onto it) is reported as provider_not_configured (400). Also returned, before authentication, for an inference path with one or two segments after /v1/ (for example /v1/chat/completions or /v1/models from a client configured with the base URL https://<host>/v1): the message says a tenant, gateway or provider segment is missing and names the base URL to configure, https://<gateway-host>/v1/{tenant}/{gateway}/compat. An unknown provider segment (Unknown provider: chat, from a base URL missing /compat) carries the same base-URL sentence. See Base URL for OpenAI-compatible clients.
method_not_allowed 405 The HTTP method is not accepted by this endpoint (for example a GET on a POST-only route). The Allow response header lists the permitted methods.
rate_limited 429 Three origins share this code. The ingress's connection and request limits (before the request reaches the gateway; see 429 from the ingress): the body is the structured rate_limited error and the response carries Retry-After: 1, but none of the X-RateLimit-* headers. The gateway's own sliding-window limit (per token or per gateway): the response carries X-RateLimit-Limit, X-RateLimit-Remaining and Retry-After; a token-scoped limit says Token rate limit: … in the message. A provider's final 429 relayed by the inference terminal (the last attempt answered 429 — an earlier 429 followed by a 5xx is not this): the response carries the provider's Retry-After when it sent one, the Anthropic-dialect window headers as X-RateLimit-Input-Tokens-Remaining / -Reset and X-RateLimit-Requests-Remaining / -Reset when present, and X-AIG-Rate-Limited: true (the gateway's own X-RateLimit-Limit / X-RateLimit-Remaining are also present when the gateway or token has a limit configured — they were set on the way in and describe that window, not the provider's). On a PII gateway whose stream is already open the terminal 429 arrives as an SSE provider_error frame with error_class: rate_limited and no headers. The chat UI renders one localized message for either — and for a 429 that reaches it without a gateway code at all (a non-JSON edge body, a provider body carrying only the provider's rate_limit_exceeded); when the response carries a positive Retry-After (delta-seconds or an HTTP-date), that message names the seconds to wait — a missing, zero, negative or malformed header is ignored (the plain message, never a "0 s"). The tool-loop / MCP path keeps its own upstream_rate_limited. Wherever the gateway itself reads an upstream service's retry hint to decide when to retry or what to tell the caller (tool and MCP calls, web search, the OCR service), only a whole number of seconds written as plain digits (or a finite number in a JSON body) counts, capped at one hour; a fractional, padded, hexadecimal, negative or infinite value, an HTTP-date, or a repeated header is ignored as if no hint had been sent.
auth_rate_limited 429 Too many rejected authentication attempts (unknown workspace, missing, invalid, expired or revoked token) from one client address on /v1 within the window (default 300 per 60 s; see the preauth_reject_limit and preauth_reject_window_s settings in Settings). While blocked, every request from that address answers this code, including one carrying a valid token, until the window ends; the response carries Retry-After (whole seconds). The address is the first entry of X-Forwarded-For; IPv6 clients are counted per /64 network. Requests that authenticate successfully are never counted. Wait for Retry-After, then retry with a valid token.
spend_unverified 503 The workspace's wallet balance could not be read when the request arrived (a database fault) — the request is refused, never admitted on an unknown balance, and sending again may work (nothing is used up). Also: a Myra-provided (keyless) model request could not verify the workspace's wallet balance (the wallet read failed). The request is refused rather than routed on Myra's managed key with an unverifiable balance. Also returned for a self-serve free trial whose per-user credit or tenant spend could not be read (on /v1 and on the conversation summarize route) — a trial never runs on an unknown spend (see Budgets) — and for a conversation summary or an agent plan-proposal / instruction-tidy call whose department (team) binding could not be read, and for a paid self-serve workspace's delegated sub-agent run on a Myra-hosted model whose workspace spend could not be read. Also returned to a partner-billed tenant whose spend could not be read: at /v1 admission, on the per-call ledger claim (also on a fallback or agent attempt), on the managed pool or fleet leg, or on a summarize or plan-proposal side call. Its message names the workspace's spending, not a balance (see Partner-billed tenants). Also returned on any self-serve plan when a request the prepaid wallet carried past the allowance cannot place its per-call reservation (the wallet ledger is unreachable) — such a request never runs unreserved on the prepaid balance (see Budgets — Wallet). Retryable — the balance is unknown, not known-exceeded. Each occurrence is recorded in the model-error triage queue (class spend_unverified). See Myra-provided models.
spend_read_failed 429 The tenant has opted into fail closed on spend-read failure (spend_fail_closed, off by default) and a spend read needed to check a token, tenant, gateway, user or department cap could not be completed, so the request is refused rather than admitted uncapped. Nothing was charged. Carries a Retry-After header; retrying shortly is correct once the database recovers. It is not a wallet refusal and not a cap refusal: the cap was not exceeded, it could not be verified. A partner-billed tenant never gets this code: the same fault answers 503 spend_unverified (see Partner-billed tenants). Decided on 2026-11-12: an earlier pre-release build answered a partner-billed tenant's /v1 spend read fault with 429 spend_read_failed; no released version did. See Budgets — Spend-read failure.
scan_unavailable 503 An upload that must be virus-scanned could not be: the antivirus service was unreachable, timed out or errored — or whether scanning applies could not be determined (the tenant's gateway list was unreadable or a gateway config would not decode). The gateway fails closed rather than store an unscanned file. Carries Retry-After; retryable once the scanner / the config read recovers. See Upload malware scanning.
quota_exceeded 429 The configured spend budget has been exhausted (token-level, tenant-level, or gateway-level), or — with a short Retry-After: 5 and the message "fully committed by requests that are still running" — the cap is not used up but the model call about to be sent (sized at its maximum cost) does not fit beside the other running requests; retry in a moment. The response includes a Retry-After header (whole seconds) set to the time until the budget's period resets — e.g. seconds to the start of the next monthly/daily period. It is derived from the budget's calendar period; it is not the workspace's monthly-allowance renewal date (allowance_renewal_date, see the two clocks in Billing). The header is omitted rather than set to 0 (which a client would read as "retry immediately") for a lifetime (total) cap, which never resets (a retry can never clear it — the error message says so). Since the wallet money-model rework this is a hard stop — it fires when the tenant wallet is empty or frozen, or when a tenant/gateway/token spend cap is reached (a member's user or department cap that is only held by running requests also answers quota_exceeded, see below); there is no over-cap soft-degrade or efficient-model fallback. A cap refusal carries the additive body field budget_scope (the code stays quota_exceeded): "gateway" for the per-gateway cap, "api_key" for the API key's own spend limit, "workspace" for the workspace spend cap (including the cap-0 freeze). Wallet and user refusals omit it. A refusal caused by the prepaid wallet instead carries the additive body field wallet_state: "empty" (no spendable balance), "frozen" (the wallet is frozen) or "disputed" (frozen by a payment dispute). It is sent only when the wallet was read successfully; an unreadable wallet answers spend_unverified without it, and an unknown value must be treated as absent. The sites that emit it are the inference wallet gate, the managed spend guard, and the summarize, compaction and agent plan-proposal calls. A disputed wallet has its own sentence and wallet_state: "disputed" (it used to get the empty-wallet text). A client that must tell the caps apart (e.g. the chat UI, which sends a gateway-cap refusal to the gateway settings, a workspace-cap refusal to the organisation settings, and an API-key refusal to "ask your administrator" instead of a wallet top-up, which cures none of them; on a free trial the gateway budget is raised by a workspace administrator in the gateway settings, as long as the gateway budgets together stay within the wallet balance, once a voucher has been redeemed) keys on budget_scope, never on the code alone. A cap refusal of the model call that follows a tool call keeps the same budget_scope: the scope rides the provider_error event of a first-party stream (top-level budget_scope), the error frame's error.budget_scope for plain streaming clients, and the error body of a buffered (Privacy mode) or non-streaming response, under the message "The model call after tool execution failed: Budget quota exceeded". Absent means unscoped; the scope is not stored on the conversation's failure record. A refusal can also mean the cap is fully committed by requests that are still running: the recorded spend is below the cap but the holds of running requests cover the rest. This applies to the API key, gateway, workspace, user and department caps. That answer is retryable, carries Retry-After: 5 instead of the period reset, and fires no budget_exceeded webhook. See Budgets.
user_budget_exceeded 429 A member's optional personal budget for the current period is used up (the workspace budget may still have room). Only a workspace admin can raise or remove it — a wallet top-up does not lift it. Retry-After is the time to the next period start (omitted for a lifetime total period, and on a self-serve workspace whose subscription has no allowance renewal scheduled — in grace, inactive, or cancelling). On a self-serve workspace the period start is the allowance renewal, the same instant as allowance_renewal_date in Billing — one renewal rule for the reaper, the display and this header, and x-should-retry: false tells automation not to retry before then. The error body also carries resets_at (integer unix seconds of that next period start, the same instant as Retry-After); the key is omitted when there is no next start (lifetime total period, or no allowance renewal scheduled). When the cap is only fully committed by running requests (spend still below it), the answer is quota_exceeded with Retry-After: 5 instead, and it is retryable. A stored personal budget that cannot be read refuses the request with 500 configuration_error instead of running uncapped.
team_budget_exceeded 429 A member's department (team) budget for the current period is used up, or is set to 0 (the team is frozen); the workspace budget and the personal budget may still have room. Only a workspace admin can raise or remove it — a wallet top-up does not lift it. Retry-After is the number of seconds to the next period start (omitted for a lifetime total period), and x-should-retry: false tells automation not to retry before then. The error body also carries resets_at (integer unix seconds of that next period start, the same instant as Retry-After), omitted for a lifetime total period. The cap also applies to conversation summaries, agent plan proposals, agent instruction tidying and the Copilot lane. A stored team cap that is malformed or unusable, or a department row that cannot be found, refuses the request with 500 configuration_error instead of running uncapped; a database fault while reading the cap or the team spend lets the request run, still metered. When the cap is only fully committed by running requests (spend still below it), the answer is quota_exceeded with Retry-After: 5 instead. The web chat and the playground show a team-budget message for this code — never the rate-limit countdown and no "Add budget" action.
ingest_cap 429 Too many of the workspace's knowledge documents are still being processed (POST …/projects/<ID>/knowledge/upload). Sent before the body is read, with Retry-After: 5. Retryable — try again once some documents finish. See Projects.
wallet_funds_reserved 429 A self-serve workspace whose prepaid wallet could pay the model call, but whose balance is currently reserved by other requests of the workspace that are still running (each model call reserves its share of the balance before it is sent). Refused before the call is sent; nothing is charged. Retryable — try again in a moment, once a running request has finished and released or settled its reservation. No Retry-After header (the moment depends on other requests). See Budgets — Wallet.
guardrail_blocked 400 A guardrail (regex, keyword, NLP PII Detector, Prompt Guard, PII Protector) matched with a block action. The message names the blocking guardrail and pattern/category. Also answered by POST /admin/v1/chat/files when a block detector matches across the cut of an over-long inline text.
provider_error 502 The upstream provider returned a 5xx error and all retries were exhausted for that provider. Also returned for a mid-stream provider failure of a transient provider class (a refused class is provider_refused instead) on a buffered/PII-forced tool-loop turn (the provider's stream emitted an error event or died before completing) when a transparent retry would be unsafe — server-side tools already executed — so the turn fails loud with this typed code instead of an HTTP 200 carrying an empty message (a non-streaming response — not an already-open SSE stream, whose headers are sent — then carries x-should-retry: false, so the OpenAI / Anthropic SDKs do not auto-retry it and re-run the tools; the native /v1/messages 502 for a failed leg after a tool round carries it too). (When the retry IS safe and every attempt then fails, the terminal code is all_providers_failed, as for any exhausted routing chain.) On an already-open SSE stream the code arrives as an error frame plus an aig_status: "provider_error" event. For a transient class the following applies as written; a refused class uses the same shapes with provider_refused. A salvaged partial answer on a streamed or app chat turn is delivered together with the explicit error surface of its failure kind — for a provider error event (an Anthropic error event or an OpenAI-shaped {"error":{…}} frame) that same frame + banner pair; for a read error or a truncated stream the single terminator error frame (provider_error "connection failed" / stream_truncated) and the persisted interrupted note at the end of the visible answer, exactly as on the live streaming path (see Inference › Visible truncation note). On a live (unbuffered) chat stream — the default, and since inline PII masking streams also masked chats — a provider error before any visible answer arrives as the same frame + aig_status: "provider_error" event, and the turn is persisted as a provider_error failure row (the web chat shows the provider-error bubble live and after a reload) instead of being dropped. The same failure row is written when a failed buffered turn delivered nothing to the user because the client had already disconnected. After a tool result: when the gateway's server-side tool loop calls the model again with a tool result and that call fails (a dropped connection, an HTTP error — a 429 included — or an unrecoverable context overflow; a first-byte timeout is request_timeout instead, a gateway policy refusal its own policy code), a transient failure is first re-dialled once with the same tool results (see After a tool result); when that does not recover, the turn ends with this code — never as an empty answer: on a live stream the error frame + aig_status: "provider_error" event (error_class: "provider_error") and, when nothing had been shown, a persisted failure row; on a stream: false request this 502 with x-should-retry: false (tools already ran, so the gateway does not retry it and tells the OpenAI / Anthropic SDKs not to either; a client that retries anyway re-runs the tools); on the native /v1/messages route a 502 Anthropic error object. When the turn had already shown text or a file, that partial is kept with interrupted_class: "provider_error" (a stream: false API request never gets the partial: it receives this 502 instead). A user's Stop never produces it. On the web-search Mistral Agents leg the provider's own error text is relayed as message, with invalid UTF-8 replaced by U+FFFD and cut to at most 500 bytes on a character boundary; when the provider's answer is a server-side fault reported as a 4xx (e.g. an upstream "no healthy deployments" 400), no provider text is relayed and message is the code's default. Mid-stream provider error with a provider-native class: the live aig_status: "provider_error" event also carries error_code, the gateway code the failure is persisted and reported under — provider_error for a transient provider fault (the chat shows Try again, live and after a reload alike) or provider_refused when the provider declined the request itself. error_class keeps the provider's own class for the message. error_code is present only when error_class is a provider's own class (an unmapped native class falls back to provider_error); an event whose error_class is already a gateway code (a budget or wallet refusal, a post-tool dial code, request_timeout, a policy code) carries no error_code. An absent or malformed error_code is ignored by the web chat.
provider_refused 502 The provider refused a turn mid-stream with a class a plain retry cannot cure (context window, content policy, capability, model not found, authentication, bad request). It is delivered on exactly the paths and in the same shapes as provider_error (an error frame + aig_status: "provider_error" event on an open stream, a persisted failure row, a kept partial with interrupted_class, the 502 on a non-streaming response or the native route) with this code instead, with two differences: the web chat offers no Try again (it suggests rephrasing or another model and unlocks the model picker), and a non-streaming response (not an already-open SSE stream, whose headers are sent) carries x-should-retry: false even without a tool round. A first-leg failure with nothing shown is retried and falls back like any failure and ends as all_providers_failed when the chain is exhausted. The live aig_status event carries error_code: "provider_refused" while error_class keeps the provider's own class: the live bubble uses that class's copy, a reload the generic refusal copy (retryability is the same). The persisted row and the X-AIG-Error header use this code. An unmapped provider-native class falls back to provider_error.
duplicate_key 400, 502 400: an object in a JSON request body repeats a key at any depth (every /admin/v1/… and /admin/auth/… route that takes a body, the partner portal routes, and the SCIM endpoint, where it is 400 with scimType: "invalidSyntax"), so the value would be ambiguous; nothing is written (the message names the key when it is short printable ASCII); send each key once. The same applies to the loopback ingest, scheduler and workflow runner APIs (secret-gated, not for customer use) and to the public JSON routes POST /docs/v1/chat, POST /docs/v1/feedback, POST /public/billing/cancel and the sales-knowledge search route, and to the request body of the inference routes (/chat/completions, /v1/messages, /responses, /embeddings; the number errors and invalid_request for malformed JSON win over duplicate_key; see Inference), and to the body of a workflow webhook trigger (POST /hooks/{token}, answered as { "error": …, "code": "duplicate_key" }; agent triggers do not parse their body) (the cancel route answers in its own { "ok": false, "error": "duplicate_key" } shape; nothing is sent or recorded). 502: an MCP server's reply repeats a key (see MCP); an MCP reply nested more than 1000 levels answers 502 with kind: "malformed" instead. The MCP proxy answers a repeated key in its request body with JSON-RPC -32600 (HTTP 400, see MCP proxy), and dynamic client registration with 400 invalid_client_metadata (see MCP proxy OAuth) The chat-bridge events endpoint and the Mattermost slash endpoint answer a repeated key (or repeated form field) in an authenticated request with 400 (see Chat bridge). The Stripe webhook receiver answers a repeated key in a validly signed event with 400 and the plain text duplicate key in event body (see Webhooks)
body_too_complex 413 A JSON request body has too many values: more than 262,144 structural elements (each {, [, , and each string, counted outside string contents) on every /admin/v1/… and /admin/auth/… route that takes a body, or more than 32,768 on the upload routes that accept very large base64 bodies (POST /admin/v1/chat/files, the conversation attachment upload, the project knowledge upload, POST /admin/v1/app-feedback). The public JSON routes (POST /docs/v1/chat, POST /docs/v1/feedback, POST /public/billing/cancel, the sales-knowledge search route) allow up to 2,048; the cancel route answers { "ok": false, "error": "body_too_complex" }. A workflow webhook trigger (POST /hooks/{token}) allows up to 16,384. The inference routes (/chat/completions, /v1/messages, /responses, /embeddings) allow up to 1,048,576. The secret-gated loopback ingest, scheduler and workflow runner APIs (not for customer use) allow up to 2,097,152, because the ingest worker legitimately sends one large body per document. Checked before the body is parsed, so it is answered even when the body is also malformed JSON (except a raw NUL byte, or invalid UTF-8 where strict, which answer 400 malformed_body first on the admin and public routes, and a raw NUL 400 invalid_request on the inference routes); nothing is written. SCIM answers the same 413 as an Error document without a scimType. Not retryable as sent: split the payload. One long string (a base64 file) counts as one element, so ordinary uploads are unaffected. The MCP proxy answers an over-complex body with JSON-RPC -32600 at HTTP 413 (see MCP proxy), and dynamic client registration with 400 invalid_client_metadata (see MCP proxy OAuth) The chat-bridge events endpoint answers an over-complex authenticated body (16,384 elements) with 413 (see Chat bridge). The Stripe webhook receiver answers an over-complex validly signed event (262,144 elements) with 413 and the plain text event body too complex (see Webhooks)
number_not_exact 400 A number in the request body cannot be forwarded exactly: an integer literal (digits only, no fraction or exponent) that a 64-bit double cannot hold exactly (9007199254740993) or that lies beyond +/-2^63 (write it with an exponent or as a string), or a decimal or exponent-form number with more than 17 significant digits or one that does not read back as the same digits from the 64-bit double it parses to (for example 1.00000000000000000001, 0.100000000000000001, 1e400). Refused before any cache or provider call; send the value as a string. See Numbers in the request body. The same code is answered on the admin MCP plane (/admin/v1/mcp and /admin/v1/mcp/*, flat {error, code} shape), on the agent admin routes (/admin/v1/gateways/{id}/agents…; the answer also carries field, the top-level body member that holds the number, for example response_schema) and by a workflow webhook (POST /hooks/{token}; an integer of more than 4300 digits answers it too). "Refused before any cache or provider call" is specific to inference. On the admin MCP plane and the agent admin routes a number that is not finite (NaN, Infinity, 1e400) is answered malformed_body instead: that check runs first, so number_not_exact there covers only finite numbers a double cannot hold exactly.
number_invalid 400 A number-shaped token in the request body is not valid JSON (NaN, Infinity, 0x10, a leading zero, a trailing dot); also answered by a workflow webhook (POST /hooks/{token}) and on the agent admin routes (with field naming the body member). Use plain decimal numbers. On the admin MCP plane (/admin/v1/mcp and /admin/v1/mcp/*) and on the agent admin routes the code covers hex, leading-zero, + and trailing-dot numbers; NaN, Infinity and 1e400 answer malformed_body there, because the non-finite check runs before the exact-number check.
all_providers_failed 502 All providers in the routing chain (primary + all fallbacks) returned errors or timed out. This is a genuine upstream fault for configured providers (it pages on-call). A request that merely names a provider the gateway never configured is instead an invalid_request (400, no page), classified before dispatch.

The message depends on who owns the failing provider. For a provider you configured, it carries the raw upstream cause, which is the actionable detail for a key or endpoint you control. For a Myra-hosted model the cause is ours, so the message says the model is temporarily unavailable and suggests retrying or choosing another — the underlying cause is recorded on our side (request log, trace) rather than returned to you. Retry either case: this code is transient by definition.

The gateway absorbs the transient class on the Myra-hosted leg before it reaches you: a pre-first-byte connection blip (the bursty upstream wobble) is retried on the same model with a small, bounded, jittered back-off — even on a gateway whose general retry budget is zero and on a Myra fallback leg — so an isolated blip that then succeeds is never surfaced. To keep the shared Myra circuit breaker from tripping on a wobble it recovers from, an intermediate transient attempt that will be retried does not count against the breaker; only the final, exhausted attempt does — so a genuinely sustained outage still opens it. This applies only to the transient pre-first-byte connection class: a provider 4xx/5xx, a read timeout, and any failure after streaming has begun are never retried this way (and never past the first byte), and a persistent transient failure still surfaces this code with the honest "temporarily unavailable" Myra message above.

A 4xx that reports an upstream outage also ends here: when the Myra-hosted model proxy answers HTTP 400 with "There are no healthy deployments for this model" (it has benched every deployment), the gateway treats it as a server-side fault — retried, then the fallback chain, then this code (never the raw proxy text). Only that phrase in the error message qualifies; every other 4xx body (including an empty or unreadable one) is passed through unchanged, and a 429 keeps its own handling. A keyed provider (or your own endpoint) answering the same "no healthy deployments" phrase gets the same retry/fallback treatment; its final 502 detail is the generic "provider HTTP 4xx upstream unavailable".
upstream_error 502 Three origins share this code; the message differs by origin, so branch on code. (a) Web search: the provider answered 200 with a body the gateway cannot read (an event stream on a non-streaming request, text that is not JSON, an empty body, a JSON array or other non-object, or a 200 carrying an error object) on the Mistral Agents API or on the first leg of the two-leg path (message "The provider returned an unreadable response."). The gateway makes one provider call and ends the turn with this error; it does not call the provider a second time. (b) A tool / upstream-service call whose response could not be decoded or failed in an unclassified way (message "Upstream returned an unexpected response."). Not retried automatically; resending may succeed. In a saved conversation the failed turn keeps this code after a reload. (c) The summary call (POST /chat/summarize) whose provider call failed; the provider's own detail is never echoed.
provider_quota_exhausted 503 The upstream provider's own account reached its usage or billing/credit limit — e.g. a serverless overflow group whose provider account has no balance (Together.ai), or an exhausted provider key. The gateway surfaces this clean, typed degraded error instead of relaying the provider's raw billing message, and triages it provider_fault (never user_fault) so operations sees the account needs attention. Switching to a different model/provider is the user remedy. Distinct from quota_exceeded (429), which is the workspace's own budget running out. Also returned before any upstream call on a self-serve plan when the managed Anthropic key pool is exhausted, its organisation suspended, or the pool key is not populated (the stored credential row is present but blank — e.g. after a sanitised environment re-seed) and the tier names no usable cross-vendor fallback: the provider account really is the thing that is unavailable, the condition is transient, and the remedy is the same (retry shortly, or pick another model).
response_number_not_exact 502 The PII response mask found a number in the model's answer that it cannot keep value-exact, so the answer is refused by name instead of delivered with a rounded number. The same answer fails the same way, so the app offers no retry.
response_number_invalid 502 Like response_number_not_exact, for a number in the model's answer that is not a valid number at all. Raised where the gateway rebuilds a native Messages response (see Inference API) or re-encodes a masked answer. Not retryable.
tool_input_number_not_exact 502 A number in a client tool_use input of a native Messages answer cannot be carried value-exact (see Inference API). The model's output is deterministic, so the response carries x-should-retry: false.
tool_input_number_invalid 502 Like tool_input_number_not_exact, for a token in a tool_use input that is not a valid JSON number at all (NaN, 0x10). Not retryable.
ask_docs_unconfigured 503 The public documentation assistant (Ask the docs) is unavailable because its backing gateway is not configured. The widget shows a try-again message rather than an error. See Ask the docs.
assistant_unavailable 503 The public documentation assistant (Ask the docs) cannot answer right now. Every billing-side refusal on that anonymous endpoint is answered with this one code and the fixed message "The assistant is currently unavailable. Please try again later." — no budget, balance or plan detail and no Retry-After; a failure mid-stream arrives as the same code in an SSE error frame. 429 stays reserved for real rate limits. Retry later.
request_timeout 504 The model did not answer in time. Please try again in a moment; if it keeps happening, shorten the request or its attachments, or turn off web search. Also the code of a server-side tool loop whose model call after a tool result did not start answering in time (a first-byte timeout on that follow-up call) — delivered as described for provider_error above (live: error frame + aig_status: "provider_error" event with error_class: "request_timeout" and a persisted failure row; stream: false: this 504) — after the one automatic re-dial of that call has also failed or was skipped (see After a tool result).
request_too_large 413 The request is too large to process. Remove large attachments or shorten the input. Raised by a gateway-side size gate (for example the Copilot action input gate); it is never inferred from the size of a request that failed upstream. A request that fails on every provider ends as all_providers_failed (502) whatever its size, and a provider that itself answers 413 has that answer passed through (see payload_too_large).
payload_too_large 413 The request body is larger than the endpoint accepts. Two sources share this code: the gateway's own per-endpoint body limit (refused before the request is processed — nothing is billed or logged as a turn; the body carries max_body, the limit in bytes — see Request body size limits), and a provider that rejected the request as too large. Shrink the request — remove or shorten attachments, or start a new chat. A chat message write (POST …/conversations/{id}/messages) is limited to 16 MiB; see Conversations.
image_too_large 413 An upload route (POST /admin/v1/chat/files, POST /admin/v1/conversations/{id}/attachments) got an image over the image upload limit (10 MB; the body carries max_bytes). A declared image/* type or PNG / JPEG / GIF / WebP bytes count. /chat/files also answers it, without max_bytes, when the text recognition model refuses an image as too large even after the gateway re-encoded it. The web app shrinks large photos before sending, so this reaches API callers, old tabs and modified clients. Send a smaller image. POST /admin/v1/chat/files also answers 413 image_too_large with reason: "pixels" and max_pixels (100000000) for an image over 100 megapixels, before any decode; the body has no max_bytes. Send a smaller image. It also answers 413 image_too_large with reason: "decoded_size" (no max_bytes, no max_pixels) when the decoded image cannot be held as a recognition source of at most 16 MiB, before any model call. See Conversations → Attachments.
context_overflow 413 The estimated input exceeds the selected model's context window. The gateway's pre-flight gate now auto-compacts an over-window turn (summarizes older history, keeps recent + current, proceeds) instead of refusing, so this 413 fires only for a single message that alone exceeds the window even after clipping (or re-emitted after a provider rejects a model whose window the catalog does not know). On a self-serve workspace past its allowance whose prepaid wallet refuses the summary call (it is reserved all or nothing), nothing is compacted and the request answers the wallet's typed refusal instead (see Budgets — Wallet). The body carries estimated, limit, first_turn (exactly one user turn — the message then says the input is too large rather than suggesting a new chat), can_compact_now (its negation), and a suggested_model that is only ever a model the caller can route to, so acting on it never produces a model_not_found. Distinct from request_too_large (a gateway-side size gate) and context_length_exceeded (a provider-side 400). See context_overflow — the pre-flight context gate.
context_length_exceeded 400 The prompt exceeds the context limit of the model. Shorten the prompt or remove attachments. Also returned by the gateway itself, for requests made with a gateway API token, when the gateway has a compaction gate (compact_error_threshold) and the session's previous turn went over that token budget. In that case the message asks the client to compact its conversation history and retry. A compacted retry passes, and an unchanged retry after the 400 is let through.
structured_output_failed 422 An agent with a response_schema produced an answer that could not be extracted, parsed, or validated against its schema. The gateway fails closed rather than deliver non-conformant output as success. This includes an answer containing a number that has no 64-bit double value: a token that is not valid JSON (NaN, Infinity, 0x10, +1, .5) or a number too large for a double (1e400) is refused. Any other number in the model's answer is read as the nearest 64-bit double and delivered as the shortest text that reads back as the same double (3.14159265358979323846 is delivered as 3.141592653589793, 9007199254740993 as 9007199254740992, a number too small for a double such as 1e-400 as 0); the refusal is for a number that has no value, not for one that has more digits than a double holds. This differs on purpose from request input, where a number that a double cannot hold exactly is refused. See Structured output.
agent_not_found 404 The agent id in the URL does not exist, is not visible to the caller, or has been deleted. The agent admin routes (/admin/v1/gateways/{gw}/agents/{agent}…) answer it as { "error": "agent not found", "code": "agent_not_found" }; agent invocation carries the same code in the standard error envelope at the top of this page. The agent-schedule and webhook-trigger routes that take a schedule / trigger id answer schedule_not_found / trigger_not_found instead when that item's parent agent is not the caller's (see below). An agent that disappears between the ownership check and the write of an agent PATCH or version restore is also agent_not_found.
agent_external 409 / 400 The agent is hosted outside the gateway (external agent) and cannot be run here: slug invoke and version restore answer 409, schedule or webhook-trigger create answer 400. Use the MCP endpoint instead.
agent_not_external 409 POST .../agents/{id}/mcp-tokens on an agent that is not external.
mcp_oauth_client_not_registered 409 POST /admin/v1/mcp-oauth/requests/{request}/approve: the MCP client is not mapped to an external agent on this gateway (or the mapping changed since the request started). Set oauth_client_id on the agent. See MCP proxy OAuth.
mcp_oauth_dcr_disabled 409 Consent approve: the workspace has switched off unverified (registered) MCP clients (mcp_dcr_enabled). See Unverified clients.
mcp_oauth_slug_exhausted 409 Consent approve for an unverified client: the slugs unverified-mcp-clients, -1 and -2 are all taken by other agents of the gateway; rename or delete one. Nothing is created or decided.
mcp_oauth_no_tenant_admin 409 Consent approve for an unverified client: the workspace has no active tenant admin to own the unverified-clients agent.
system_role_not_allowed 400 Agent create or update: system_role is server-stamped and cannot be set through the API.
unknown_oauth_client 400 Agent create or update: oauth_client_id is a dcr_ id that is not a registered client.
invalid_oauth_client_id 400 Agent create or update: oauth_client_id is neither an https Client ID Metadata Document URL nor a dcr_ client id (or is null on create).
oauth_client_id_not_allowed 400 Agent create or update: oauth_client_id was sent for an internal agent (only an external agent may carry one).
oauth_client_already_mapped 409 Agent create or update: another agent on this gateway already carries that oauth_client_id.
mcp_proxy_agent_not_external 403 The MCP proxy token is bound to an agent that is not external.
mcp_proxy_scope_required 403 The token used on the MCP proxy does not carry the mcp_proxy scope, or it is not bound to an agent.
mcp_proxy_auth_required 403 The MCP proxy was called on a gateway that does not enforce authentication (auth_required: false). The proxy only serves gateways that require a token.
mcp_proxy_user_binding_required 403 The agent token is not bound to a user, so the MCP proxy cannot act for a person. Also returned when an agent run needs a bound user and the token has none.
external_agent_field_not_allowed 400 An external agent was created or updated with a run-only field (model, instructions, provider, response_schema, max_tokens, or a tool_config key other than mcp / mcp_allow / approval, or an approval key other than ttl_seconds, such as approval.tools).
external_agent_token_scope 400 A token for an external agent must have exactly the scope mcp_proxy and the owner's user_id.
token_lifetime_exceeded 400 A token was minted without an expiry, or with one beyond the tenant's token_max_lifetime_days, or a PATCH moved expires_at past it. Body carries max_lifetime_days. See Token lifetime policy.
self_mint_disabled 403 The tenant switched off self_mint_tokens; POST /me/tokens, POST /me/connect/ox and POST /admin/v1/device/approve are refused. Admin mint routes and MCP OAuth consent still work.
invalid_approval_ttl 400 tool_config.approval.ttl_seconds is not a whole number of seconds from 300 (5 min) to 604800 (7 d); see Approval window.
invalid_hosting 400 ?hosting= is neither internal nor external.
schedule_not_found 404 An agent-schedule route that takes a schedule id (GET, PATCH, DELETE /admin/v1/gateways/{gw}/agents/{agent}/schedules/{id} and POST …/{id}/run-now) was called for a schedule the caller cannot reach: it does not exist on this gateway (never created, or deleted — also while a PATCH was in flight), or its parent agent is not the caller's to manage (another member's agent, or the agent is gone). One answer for all of these, so the response never reveals whether another member's schedule exists. Body { "error": "schedule not found", "code": "schedule_not_found" }. A database fault on the lookup is 503 { "error": "temporarily unavailable; retry later" }, never this code. The web app shows "this schedule no longer exists" and reloads the list on this code only.
trigger_not_found 404 PATCH / DELETE /admin/v1/gateways/{gw}/agents/{agent}/webhook-triggers/{id} was called for a webhook trigger the caller cannot reach: it does not exist on this gateway, or its parent agent is not the caller's to manage. One answer for both (no existence leak). Body { "error": "trigger not found", "code": "trigger_not_found" }. See Webhook triggers.
invalid_webhooks 400 (formerly webhook_config_invalid) Saving a gateway (POST /admin/v1/tenants/{id}/gateways, PATCH /admin/v1/gateways/{id}) whose config.webhooks is not an object, or whose url / secret is not a string or events not an array. Body { "error": "<which field>", "code": "invalid_webhooks" }; nothing is saved. See Webhook destination policy.
webhook_url_rejected 400 The gateway's webhooks.url breaks the destination shape: not https://, carries a user name, uses an IP address (any spelling) or localhost as host, a port below 1024 other than 443, or #, \, whitespace or control characters. The error text names the rule; nothing is saved. See Webhook destination policy.
webhook_url_not_public 400 The webhooks.url host does not resolve to a public address — one of its addresses is internal (loopback, private, CGNAT, link-local / cloud metadata, unique-local, …) or the name does not exist. One fixed message for both. Nothing is saved.
webhook_url_unverifiable 503 The webhooks.url host could not be looked up right now (DNS timeout / server failure) or the platform's egress settings could not be read. Nothing is saved — retry.
invalid_siem 400 (formerly siem_invalid) A SIEM target (tenant siem, gateway config.siem, or a submitted test configuration) was refused: bad schema, unknown field, or an address the egress policy denies. Body { "error": "invalid siem: …", "code": "invalid_siem" }; nothing is saved or dialled. On POST /admin/v1/tenants/{id}/siem/test a present siem of the wrong JSON type (null, a scalar or an array) is also invalid_siem, with the sentence siem must be a non-empty object.
siem_credential_required 400 A tenant siem write changed the url while a stored token / password was left out. Body { "error": "changing the SIEM url requires re-entering token (or send an empty string to store none)", "code": "siem_credential_required", "field": "siem.token" }; nothing is saved. Re-send the credential, or send "" to store none. On the portal settings write the same refusal is 422 unprocessable with detail_reason credential_required. The same code is used for a gateway config.siem write (PATCH /gateways/{id}, and POST /tenants/{id}/siem/test with a gateway_id) that changes the target while omitting a stored secret.
config_credential_required 400 A gateway config write (PATCH /gateways/{id}) changed the target of a stored secret (web_search.provider, semantic_cache.embedding_url, webhooks.url, tracing.otlp_endpoint) while leaving the secret out, or a POST sent <leaf>_set: true without the leaf. Body { "error": "…", "code": "config_credential_required", "field": "<section>.<leaf>" }. Re-enter the secret or send "" to store none. See write-only gateway secrets.
invalid_tracing_headers 400 The gateway config tracing.headers value is not an object of valid headers, names a header the gateway controls, or is larger than 8192 bytes once serialized as JSON. Body { "error": "…", "code": "invalid_tracing_headers" }. See write-only gateway secrets.
siem_target_unverifiable 503 Saving a SIEM syslog target (tenant siem or gateway config.siem) whose host could not be looked up right now, or while the egress denylist could not be read or is malformed. Body { "error": "invalid siem: …", "code": "siem_target_unverifiable" }; nothing is saved — retry. A refused target is a 400 with code invalid_siem.
dev_only_setting 409 PUT /admin/v1/settings/webhook_allow_loopback_receiver with true on a deployment that is not a development deployment. Nothing is stored; false is always accepted.
agent_protection_paused 409 The agent was paused by automatic protection (a detector found suspicious behaviour) and runs nothing until it is resumed. Returned by invoke, sub-agent delegation and schedule run-now; schedules and webhook triggers are skipped/refused. See Agent paused by automatic protection.
agent_spend_cap_reached 403 The agent has reached the monthly spending limit its owner set (spend_cap_micros). Refused before any model call; not a billing refusal, so there is no top-up wording. The scheduler skips the run without a strike. See Monthly spending limit.
agent_spend_unverified 503 The agent has a spending limit but its month-to-date spend could not be verified (read failure, unusable stored limit, or request logging disabled or retained under 31 days). Fails closed; retry shortly.
agent_spend_cap_unenforceable 409 PUT .../agents/{id}/spend-cap while request logging is disabled or its retention is shorter than 31 days, so the limit could not be enforced.
agent_api_disabled 403 The agent's API channel is switched off (PUT .../agents/{id}/api-access) and the call used a personal (user-bound) API token. Refused before any run; an admin can turn the channel on. Try it, schedules, webhooks, workflows, the chat bridge, delegated agents, the MCP proxy and tenant service tokens are not affected. See The API channel switch.
invalid_spend_cap 400 spend_cap_micros is not a whole number from 1 to 1000000000000 or null, or the body lacks the key.
spend_cap_not_patchable 400 PATCH on an agent with a spend_cap_micros key. Use PUT .../spend-cap.
agent_not_protection_paused 409 A resume was requested for an agent that is not paused by automatic protection (already resumed, or never paused). See Inspect and resume a protection-paused agent.
review_reason_required 400 disable was sent without a reason (absent, null or blank). See Review decisions.
review_reason_too_long 400 The reason of a disable is longer than 1000 characters.
invalid_review_reason 400 The reason of a disable is not plain text: invalid UTF-8, control or invisible formatting characters. Formerly review_reason_invalid.
review_note_too_long 400 The note of a flag is longer than 1000 characters.
invalid_review_note 400 The note of a flag is blank, not valid UTF-8, or contains control or invisible formatting characters. Formerly review_note_invalid.
agent_review_blocked 409 The agent is flagged or disabled by its governance review and its runs are refused until it is approved again. Returned by schedule run-now with 409. The scheduler skips its schedules, a webhook fire for it is refused with 403 (no run is created), and its approved holds and releases are withheld (they stay approved and are delivered after the agent is approved again).
agent_handover_pending 409 The agent was handed over after its owner left and is paused until the new owner confirms it (POST …/agents/{id}/handover/confirm). Returned by invoke and sub-agent delegation; schedules and webhook triggers are skipped/refused. See Confirming a hand-over.
handover_owner_only 403 Only the agent's new owner may confirm a hand-over; administrators cannot confirm on their behalf.
handover_not_pending 409 The agent has no hand-over awaiting confirmation (never handed over, or already confirmed).
invalid_connector_id 400 A connector id in a consent route (DELETE …/agents/{id}/consents/{cid}, GET /admin/v1/mcp/{cid}/agents) is not 1-64 characters of letters, digits, _ or -. A workflow graph step can also carry invalid_connector_id inside the errors array of a 422 invalid_graph; the workflow rule is stricter (1-36 letters, digits or -), see Workflows API.
invalid_config 422 A step of a workflow graph has a config that is present but not a JSON object (a string, number, true or array) on a node type with required fields. Carried per step inside the errors array of a 422 invalid_graph; one entry per node. The other node configuration codes follow <field>_required (missing, null or empty) and invalid_<field> (present but wrong), listed under Node configuration codes in Workflows.
connector_not_usable 422 A step of a workflow graph names an MCP connector the workflow's owner cannot use (for example another member's private connector). Carried per step inside the errors array of a 422 invalid_graph on publish and rollback, and reported by copilot validation. See Workflows API.
consent_revoke_forbidden 403 Only the agent's owner or a workspace administrator may revoke its connector consent; another user who can merely see the agent gets this. An agent the caller cannot see is 404.
consent_not_found 404 The agent has not consented to that connector (never did, or already revoked). No new version is written.
consent_malformed 422 The agent's stored consent is malformed; it already grants nothing, so there is nothing to revoke.
concurrent_update 409 The agent changed concurrently and three revoke attempts lost the version check. Reload and retry.
tool_config_required 400 POST …/agents/contract/search without a tool_config. Absent is not an empty consent.
invalid_tool_config 400 POST …/agents/contract/search with a malformed tool_config (wrong types, too many connectors).
unknown_connector 400 tool_config.mcp names a connector that does not exist or is not available to the agent's owner.
successor_agent_unknown 400 A successors entry on a user erase names an agent that is not one of the user's shared agents.
invalid_successor 400 The named successor is not an active (enabled, not deleted) user of the same tenant, or may not author agents. Formerly successor_invalid.
successor_conflict 409 An explicit successor (per-agent or successor_default) was no longer eligible when the erasure ran; nothing was erased.
agent_misconfigured 422 The agent's configuration is incomplete (for example no resolvable model) and it cannot run. Fix the agent configuration and retry.
malware_detected 422 An uploaded file (a chat file or conversation attachment, a project knowledge file, a personal My-PII keyword list, or an app-feedback evidence image) was rejected because the antivirus scanner flagged it as malware. The file is not stored; the signature is logged operator-side only. (The anonymous workflow-form upload reports the same token in its flat error field rather than as a code.) See Upload malware scanning.
invalid_body 400 The request body's required text field is not a non-empty string (absent, null, an object, a boolean, a number, or ""): data on the conversation-attachment upload (POST /admin/v1/conversations/{id}/attachments) and the My-PII keyword-list upload (POST /admin/v1/me/pii-keywords/upload), text on the My-PII paste (POST /admin/v1/me/pii-keywords/batch); also a message_id that is present but not a string on the conversation-attachment upload (its filename answers invalid_filename / filename_too_long, max 255 characters), and a data, filename or gateway_id that is present but not a string on the chat file staging upload (POST /admin/v1/chat/files). Answered before anything is read or stored. See Attachments. On the org admin routes it means the body is not a JSON object; see Typed codes on the org admin routes. On the nine export routes (POST /admin/v1/chat/export-*) it means markdown, filename or reference_attachment_id is not a string; an absent, null or whitespace-only markdown answers markdown_required instead. See Conversation export.
markdown_required 400 markdown is absent, null or whitespace-only on an export route (POST /admin/v1/chat/export-*); a body that is a scalar (42, true, "x", null) reads as empty and answers this too.
markdown_too_large 413 markdown on an export route exceeds 8 MiB.
keyword_required 400 POST /admin/v1/me/pii-keywords without a keyword field (or without a body). Nothing is stored. See Account — Adding a personal PII keyword.
keyword_not_string 400 POST /admin/v1/me/pii-keywords with a keyword that is present but not a string (null, a number, a boolean, an array or an object). Nothing is stored.
control_chars 400 POST /admin/v1/me/pii-keywords with a keyword that contains a control character (U+0000–U+001F, including tab and line breaks, or U+007F). Nothing is stored. The same endpoint answers empty (empty or whitespace-only), too_long (over 200 bytes), unicode_forbidden (an invisible or format codepoint) and cap (429, the 200-keyword limit).
invalid_flag 400 A personal My-PII keyword write (POST /admin/v1/me/pii-keywords, …/batch, …/upload) with a case_sensitive or whole_word value other than true/false, 1/0 or "1"/"0" (missing or null means false). Answered before the keyword list is read, an uploaded file is decoded or scanned, or anything is stored.
type_malformed_declared 400 A client-declared file type (mime_type) is present but is not a media type: a non-string (a number, object, array, boolean, or null), a value with a control character or surrounding whitespace, a non-ASCII character, no / or an empty side, a second /, or a malformed parameter. Returned by the conversation-attachment upload and the chat file staging upload (POST /admin/v1/chat/files, where an absent or empty mime_type is still fine — the type is then derived from the file name). A malformed type is never treated as absent. The form file upload uses the same code for its own (trimming) media-type rule. On the conversation-attachment upload a type of 129–1024 bytes that is otherwise well-formed answers mime_type_too_long (the stored column holds 128 bytes); longer is type_malformed_declared.
mime_type_too_long 400 The conversation-attachment upload's mime_type is a well-formed media type of 129–1024 bytes — longer than the stored attachment type allows (128 bytes). Longer still is type_malformed_declared.
invalid_filename / filename_too_long 400 The conversation-attachment upload's filename is not a string, is not valid UTF-8, or is longer than 255 characters. Answered before the conversation lookup.
invalid_progress_id 400 POST /admin/v1/chat/files progress_id, or GET /admin/v1/chat/files/progress id, is present but is not a canonical lowercase UUID (or id was given more than once). Nothing is extracted. Omit progress_id to upload without progress tracking.
progress_id_required 400 GET /admin/v1/chat/files/progress was called without an id.
bad_base64 400 An upload body's data string does not decode as base64 (standard alphabet, no line breaks — an embedded newline is enough). Returned by the conversation-attachment upload, the chat file staging upload (POST /admin/v1/chat/files) and the My-PII keyword-list upload. Nothing is stored; the body is never passed through unscanned as opaque text.
pdf_password_protected 422 A chat PDF attachment is password-protected (encrypted with a user password) and cannot be read without the password. Remove the password, or attach an unlocked copy. Only a real user-password PDF is rejected — an owner-password-only PDF (which opens without a password) is accepted and read normally. The same password cause is surfaced on the project-upload path (a 422 "corrupt or password-protected") and, for a connector-synced PDF, in the document's ingest trace (the async worker terminal-fails it with a password-protected reason rather than a generic extraction failure).
docx_password_protected 422 A chat .docx attachment is password-protected (an encrypted Office container, not a ZIP package) and cannot be read without the password. Remove the password, or attach an unlocked copy. Detected structurally from the container's directory (the EncryptedPackage and EncryptionInfo streams), not from the file name. A damaged .docx is still the generic extract_failed.
pdf_malformed 422 A chat PDF attachment's structure is damaged and could not be read even after the gateway's automatic repair pass (the extractor rebuilds a broken page tree — a wrong page count, a missing or dangling page list — and re-reads a file it cannot open through a second parser before giving up). Re-export the document from the application that made it, or use "Print to PDF", and attach it again. A PDF that a normal viewer opens is repaired and read rather than rejected.
pdf_no_text 422 A chat PDF attachment was read, but no readable text was found on any page — typically a scan of empty sheets (a page with no visible marks is not sent to text recognition at all) or one on which text recognition found nothing. Attach a clearer scan, or a PDF with selectable text.
extract_failed cause 422 An extract_failed answer for a PDF may carry cause: page_rejected (text recognition refused one page's image on its content; page and total_pages name it) or time_limit (the extraction ran past its time limit). Sending the same file again will not help. Unknown or inconsistent values are dropped.
pptx_no_text 422 A chat PowerPoint (.pptx) attachment was read, but no slide contains text — typically a deck whose slides are only pictures — and text recognition found no text in its pictures either. (When the text-recognition service is unavailable instead, the answer is extract_transient.) The file is not damaged (that would be extract_failed). Attach a version with text on the slides, or describe in the message what you need. The web chat shows "No readable text was found in …". (A project-knowledge upload or a synced document with the same property fails ingestion with a no readable text reason in its ingest trace.)
extract_transient 503 Text recognition for a chat attachment — a PDF or an image (the on-prem OCR fleet) — stayed busy or unavailable past the gateway's own bounded retry, or the platform's OCR credential is not configured (that case is not retried and is logged for the operator). Transient — the file itself is fine; the response carries Retry-After; send the same attachment again shortly. The web chat shows a "couldn't be processed right now — try again" banner (also when the request outran its deadline or the edge answered 502/504) and keeps the attachment in the composer. For a PDF the body may also carry cause (ocr_unavailable or ocr_too_slow) and, when known, page and total_pages, so the web chat can name the page and whose problem it is; an absent or unrecognised cause changes nothing. A PDF whose extraction ran past the extraction time limit is not this code — it stays extract_failed, because re-sending the same document would time out again. (An image whose text-recognition call timed out is this code: the image is small and a timeout there means the OCR service was overloaded.)
ingest_busy 503 The shared upload-processing pool (chat attachments and project knowledge uploads draw on one bounded slot budget) is momentarily saturated. Transient — the response carries Retry-After; retry the same upload shortly. The web chat shows a "busy — try sending again" banner and keeps the attachment in the composer (in a multi-attachment send the other files' finished extractions are kept and only the failed file is re-submitted on the next Send); the project knowledge upload retries a bounded number of times. An upload that ends without finishing — the client disconnects while the file is still being sent, or the transfer times out — gives its place in the pool back as the request ends; it used to keep it until the next restart, so a few abandoned uploads could make every later one answer ingest_busy.
length_required 411 A chat file staging upload (POST /admin/v1/chat/files) or a project knowledge upload (POST /admin/v1/projects/{id}/knowledge/upload) reached the gateway without a Content-Length (a chunked body, or HTTP/2 without the header). The public hosts buffer the body and add the length, so this is seen only by a client that talks to the gateway directly. These uploads take a place in the shared processing pool before the body is read, so the length must be known up front; send the body with its length (browsers and standard HTTP clients do this for a JSON body).
approval_undeliverable_payload_logging 400 / 409 An agent schedule that requires approval before delivery (enabled, require_approval: true, a webhook / Mattermost / email destination) was created, run, or updated in a way that touches the hold (enabling it, turning approval on, setting or changing its destination) on a gateway whose Log request/response payloads setting is off — other edits of an already-flagged schedule (name, prompt, cadence) save normally. An approved result is re-read from the stored payload at delivery, so it could never be sent; the schedule is refused (400 on save, 409 on run-now) instead of producing undeliverable holds. A tenant administrator can switch the setting on (Organisation › AI setup › Gateways); until then disable the schedule, turn off approval or remove its destination. See Agents › Refused up front.
schedule_conflict 409 PATCH /admin/v1/gateways/{gw}/agents/{agent}/schedules/{id} lost a race: between the request reading the schedule and writing it, another save changed its enabled, require_approval or output_action (compared exactly as stored). Nothing is written. The update was re-checked against the schedule as it is now and would be allowed, but it was decided on a state the caller never saw — reload the schedule and send the change again. When the re-check refuses the combined result, the refusal's own code (approval_undeliverable_*, 400) is returned instead; a schedule deleted in between is 404. Only updates that write one of those three fields, without by themselves ruling out an approval hold (disabling, approval off, destination none), can receive it. See Agents › Concurrent saves.
reason_required 400 The meaning depends on the route (see also the content-report reason_required in the app-feedback row of the per-field table near the end of this page). Here: reading request content (GET /logs without metadata_only=1, GET /logs/{id}, trace detail) without a non-empty X-Read-Reason header (or, on POST /logs/{id}/read and POST /traces/{id}/read, a missing or blank reason in the JSON body; a non-string reason is bad_param). See Logs › Reading content.
approval_undeliverable_tenant_content_logging 400 / 409 As approval_undeliverable_payload_logging, but because the workspace's privacy mode (content_logging_disabled) stores no content, so an approved result could never be re-read. Switch privacy mode off, or disable the schedule / turn off approval / remove its destination.
named_reports_disabled 403 The workspace forbids named-person reports (policy), so GET /admin/v1/stats/analytics?anonymize=0 is refused; the anonymized view stays available. Also returned when the policy cannot be established (fail closed).
answer_corrections_disabled 403 The workspace forbids correcting AI answers (policy), so PATCH /admin/v1/conversations/{id}/messages/{mid} with a non-empty corrected_content is refused and nothing is written. Clearing a correction stays allowed. Also returned when the stored policy is malformed or the workspace row is missing (fail closed); an unreadable policy is 503.
approval_undeliverable_request_logging 400 / 409 As approval_undeliverable_payload_logging, but because request logging is disabled for the organisation (managed by Myra support on the tenant administrator's request).
owner_processing_restricted 403 deliver-email refused: the agent's owner or the user who created the schedule is under a GDPR Art. 18 processing restriction (see processing_restricted). No mail is sent. A missing or unrecognised stored restriction value counts as restricted. The scheduler records the delivery as owner_restricted. Lift the restriction and re-run the schedule to deliver.
agent_owner_inactive 403 The agent's owner account is deactivated or removed. An agent runs as its owner, so it can no longer execute — this includes scheduled and webhook-triggered runs. deliver-email also answers it when the schedule creator (stored-recipient delivery) or the agent owner is absent, deactivated or erased; the run is then recorded as failed.
web_search_not_supported 400 The selected model rejected web search. Disable web search for the chat or pick a different model. Returned only when the model cannot use the web-search tool: a provider without reliable chat web search (Cohere, Groq), or a web-search probe (the first, tool-carrying call of the gateway's two-step web search) that the provider refuses because the selected model does not support tools (for example "does not support tools", "No endpoints found that support tool use"). A refusal by a fallback model (the selected one being unavailable) says nothing about the selected model and continues on the normal path. Any other failure of that probe — a rate limit, an outage, a rejected provider key, a context overflow, a model the provider no longer serves, a content-policy refusal, an unreadable error body, or no answer at all — is not about web search: the turn continues on the normal path and is answered exactly as the same failure is answered without web search (with its retries and fallbacks; for example rate_limited with the provider's Retry-After, or all_providers_failed). In the web chat this code offers switching to another model.
invalid_max_steps 400 The agent's max_steps is not one of 5, 10, 20 or null. Returned on agent create, edit and the draft preview. See Agents.
invalid_period 400 The period of the per-agent stats call is not one of 1d, 7d, 30d (empty, repeated and wrong-case values included). See Agents.
starters_required 400 The starters key is absent from the body of the starters PUT ({}).
invalid_starters 400 The agent's starters is not an array of strings, an item is not a string, carries a control, invisible or default-ignorable character (a ZWJ emoji sequence included), is invalid UTF-8 or spans more than one line, or repeats an earlier item. See Agents. Formerly starters_invalid.
too_many_starters 400 More than 12 starters. Formerly starters_too_many.
starter_too_long 400 A starter is longer than 120 characters.
starter_required 400 A starter is empty, blank or invisible-only. Formerly starter_empty.
starters_not_patchable 400 PATCH …/agents/{id} carried starters. Use PUT …/agents/{id}/starters.
invalid_constraints 400 The agent's constraints is not a list of at most 8 {trigger, action} objects, an entry has an unknown field, trigger or action, an action not allowed for its trigger, or repeats a trigger. See Agents.
constraint_looser_than_org_rule 400 A well-formed constraints value loosens an organisation rule (for example egress always_ask on a local-only agent). Returned on create, update and restore.
agent_constraint 403 (Gate reason, in the tool result and the activity log.) A tool call refused by the agent's own safety constraint, or a constraint hold that cannot be held in this context.
agent_constraint_malformed 403 (Gate reason.) The agent's stored constraints are unreadable; the call is refused.
invalid_protection 400 The agent's protection is not one of "protected", "masked", "public" or null. Returned on agent create, edit and the draft preview. See Agents.
protection_looser_than_gateway 400 A well-formed protection value is looser than the access tier of the agent's gateway (for example public on a gateway that masks personal data). Returned on create, update and restore.
protection_needs_masking_gateway 400 protection masked on a gateway that does not mask personal data in requests (no enabled PII masker, or only a response-side one): no external model could run masked there. Choose protected, or enable a PII masker on the request. Returned on create, update and restore. See Agents.
protection_blocks_pinned_model 400 The agent's effective protection does not allow the provider of its pinned model (for example protected with an external model). Pin an internal model, use Auto (no model), or loosen protection within the gateway's floor. Returned on create, on an update that sets protection or changes model / provider, and on restore. See Agents.
agent_protection_blocks_model 403 The agent's protection does not allow the model the request resolved to (and no permitted fallback was left): an external model for a protected agent, or an external model on a gateway that does not mask personal data for a masked agent. Nothing was sent to that model. A deterministic policy refusal: no retry, no model-error triage row. Choose an internal model, or move the agent to a gateway that masks personal data. In the activity log every refused model call is a record with reason agent_protection. After a tool result: the turn ends with this code (non-retryable) — see After a tool result.
invalid_voice_lang 400 The gateway-internal request header x-aig-voice-lang is present but not exactly one supported reply language: the accepted values are de, en, fr, nl and da (at most 8 bytes); empty, repeated, wrong case, unknown or over-long values are refused. An absent header is an ordinary turn; a malformed one is never treated as absent. See Voice conversation.
voice_model_not_local 403 A spoken (voice) turn could not be routed to a local Myra model. Three causes: (1) the gateway has no enabled local Myra model: ask your administrator to enable one for the workspace; (2) the request carries x-aig-voice-lang but no valid conversation binding (x-aig-conv-id), so nothing is swapped and its model is a cloud model (the swap is also skipped for a stored-config request, an agent or copilot stored model, where the stored-pin path applies, and for a request whose provider is not resolved yet): the header is gateway-internal, see the x-aig-voice-lang row and Voice conversation; (3) a transient routing fault while the local model was looked up: the turn is refused rather than sent to a cloud model, and sending it again usually succeeds. A cloud conversation model alone does not cause this on the voice session's own call, because a conversation-bound spoken turn is answered by the local model instead (Which model answers). Returned only outside a Local only project: there the project's own refusal answers instead (model_not_allowed_for_project, or conversation_project_unresolved / project_tier_unresolved when the project's tier is unknown; agent_area_unresolved applies to agent runs only). In the voice session it arrives as answer_end code model_not_local (Voice conversation); the project refusals end as answer_failed.
model_capability_mismatch 400 The selected model cannot run this request. Returned when the model rejects a gateway-injected capability (tools / web search / URL fetch / vision), or when a native document/PDF block is sent to a model that cannot read documents (only Anthropic, and Bedrock for anthropic-family models, accept native document blocks). The gateway returns this typed error instead of relaying the raw provider status. Pick a different model, or disable web search / URL fetch and remove attachments. The admin API returns the same code (400) when an agent create or edit would leave a tool affordance (web search, URL fetch, connectors, knowledge areas) enabled on a model curated as tool-incapable — see Agents. Note: for a model the gateway KNOWS cannot do function calling (e.g. a Perplexity Sonar model served through OpenRouter), the gateway now PROACTIVELY auto-disables the injected tools and the run PROCEEDS without them (a tools_skipped notice is surfaced — see below) instead of failing. (A model on a provider with no gateway tool loop — including the direct perplexity provider — is never offered gateway tools in the first place; only MCP connector references there are rejected, as described below.) This typed error is now only the residual safety net for a tool-incapable model the gateway did not recognize up front — and it is the last resort rather than the first: when the backend refuses the tools the gateway injected (web search, URL fetch, file access, and connectors the gateway attached itself — e.g. an agent's configured connectors), the gateway strips its own injected set and re-sends the turn once as a plain answer, so the user gets a served reply plus a tools_skipped notice instead of a dead end. (The gateway's two-step web search is the exception: when the provider refuses the web-search tool on its first, tool-carrying call, the turn ends with web_search_not_supported — see that row.) model_capability_mismatch is returned only when that stripped retry also fails, or when the refusal is about a capability stripping cannot fix (an image, a document). A turn that carries caller-supplied MCP connector references (tools:[{"type":"mcp"}] — the web chat attaches every connected connector) is never stripped: the caller asked for those connectors, so the refusal is returned as model_capability_mismatch ("remove the mcp tool references or pick a tool-capable model"). No gateway tool loop: connector references on a chat request whose model's provider has no gateway tool loop at all (currently Gemini, Vertex, Bedrock and Perplexity) are rejected with this code before the turn is dispatched when the request comes from the API (the web chat, which sends x-aig-mcp-best-effort: 1, instead answers the turn without the connectors and shows a tools_skipped notice with the category connectors_model — see MCP connectors API) (the check applies to the provider the turn resolved to, after routing rules and fallback substitution; a configured fallback is not tried) (detail: "…provider 'gemini' … has no gateway tool loop. Pick a model from another provider, or remove the mcp tool references") — previously invalid_request. It is logged and recorded in the model-error triage queue (pattern no_gateway_tool_loop). The same references on a request shape that cannot carry the loop on any provider (a non-chat endpoint, count_tokens, client-supplied tools, native /v1/messages on a relaying provider) stay invalid_request. On a gateway whose PII scan has already opened the response stream, the error arrives inside the already-open 200 event stream instead: a provider_error event with error_class: model_capability_mismatch for a client that opted into the aig_* side channel (the web chat), or an OpenAI-style {"error":{"code":"model_capability_mismatch",…}} chunk followed by [DONE] for a plain OpenAI-compatible client. In the web chat, when this code ends a turn before any answer text was shown, it renders as an error bubble that asks to pick a different model and re-enables the model picker for that conversation (also after a reload). A caller that supplied its own tools array is never touched — its provider's error is passed through verbatim. Also the code of a server-side tool loop whose model call after a tool result is refused because the tool result carries a document the selected model cannot read — delivered as described for provider_error (live error frame + aig_status: "provider_error" event with this error_class and a persisted failure row; stream: false: this 400); switching model is the remedy.
model_not_entitled 403 The provider account this gateway uses is not entitled to the requested model (today: Mistral answering 403 with tier_not_allowed for a model outside the account's subscription tier, or answering 403 that a model is a Labs model an admin must enable in the organization settings). The Labs refusal is recognised only when the status is exactly 403 and the body is JSON whose top-level message or error.message is a string containing the Labs sentence (is a Labs model. To use Labs models, an admin must enable them); the same sentence in a non-JSON body, in another field, or at another status is not recognised, and a rejected own key keeps its provider_key_rejected 424. The Labs envelope shape is inferred from the provider's wording, not captured from a live response. Previously this surfaced as the generic provider_error. A retry can never help, so the gateway does not retry it, does not fall back to another model, and the web chat shows a no-retry message (no Try again) that asks to pick a different model, also after a reload. Remedy: pick another model, or have the provider account upgraded. The code is gateway-reserved: a provider 4xx error response whose own body claims model_not_entitled is rewritten to provider_error; every other field of that body, including numbers with more than 14 significant digits, is passed on exactly, and a body that cannot be re-encoded exactly is replaced by the plain provider_error envelope. It is raised on the first model call of a turn, including a web-search turn on Mistral's Agents API; a server-side tool loop whose later model call (after a tool result) hits the same refusal ends as provider_error.
byok_alias_invalid 400 The x-aig-byok-alias header is not 1 to 64 letters, digits, ., _, - starting with a letter or digit (the same rule as the alias on a stored key). Checked before the response cache and before any key is read; it is never treated like an absent header. Omit the header or send it empty to use the default key.
invalid_ghost_files 400 The top-level x-aig-ghost-files field of a private (ghost) chat turn (x-aig-conv-id: ghost-…) is not a list of {name, data} objects: a name that is empty, a path, or has control characters, data that is not canonical standard base64, or a file that does not match its type (for example an .xlsx that is not a zip). Checked before the response cache; nothing is stored.
too_many_ghost_files 400 x-aig-ghost-files carries more than 8 files. Send at most 8. The error carries max_files.
ghost_files_not_ghost 400 x-aig-ghost-files was sent on a request that is not a private (ghost) turn, or not on POST /v1/chat/completions (the only route that accepts it). The field exists only for private chats; use stored attachments otherwise.
ghost_files_unsupported_type 400 A file in x-aig-ghost-files has an extension the code interpreter does not accept as input.
ghost_files_too_large 413 The decoded files in x-aig-ghost-files add up to more than the limit (5,000,000 bytes in total). The error carries max_bytes. The current limit is also in GET /me as limits.ghost_input_files_max_bytes.
ghost_files_spooled 500 The gateway received the request body but it had been spooled to disk, so the files could not be kept in memory only; the request is refused rather than leave private data on disk. Retry; contact support if it persists.
provider_key_missing 424 The selected model routes to a provider that requires an API key, but no key is stored for this gateway (and alias). This is a configuration gap, not a gateway fault — an admin must add a provider key in the gateway's provider settings. Returned before any upstream call. Also returned — with a message naming the cause — for an enabled Myra-provided model on a gateway that sends that provider to a custom base URL (provider_base_urls): Myra's managed key is never sent to a custom endpoint, so either store an own key or remove the override.
provider_key_rejected 424 The provider rejected the customer's own provider key (HTTP 401, or a 403 authentication refusal, not a model-entitlement refusal). The response carries error.provider (the provider id) and the header X-AIG-Error: provider_key_rejected; the message reads Your <provider> key was rejected by the provider (HTTP 401|403). Update it in the gateway's provider settings. The gateway makes exactly one call with the own key: it does not retry, does not fall back to another model or provider, and never switches to Myra's key, even when the model is also an enabled Myra-provided model. Nothing is charged to the wallet; the attempt is logged as a single own-key leg with zero tokens and zero cost. It is a 424 outside the 5xx error budget, and the web chat shows it without Try again, naming the provider live and after a reload (the failure row persists it as error_provider, see Conversations). Remedy: replace the key under the gateway's provider settings. A key from the Myra pool or a managed grant that the provider rejects is not this code (that is the platform's fault, see provider_error). The code is gateway-reserved: a provider response body whose own error.code claims provider_key_rejected (or model_not_entitled) is rewritten to provider_error. After a tool result: a server-side tool loop's later model call (round 2 or later) answers the same way when the customer's own key is rejected there: on a live stream the error frame plus the aig_status event carry error_class: "provider_key_rejected" and provider, and a conversation turn persists a failure row with error_class provider_key_rejected and error_provider; a stream: false request and the native /anthropic/v1/messages route answer 424. On a native /anthropic/v1/messages request with stream: true the server-side tool loop only runs when the gateway buffers the answer, and nothing is sent before it ends, so the same rejection answers 424 with error.provider. The rejected key is not re-dialled and not retried, and tool legs that already ran stay billed. A 403 follows the same rule as on the first call (an authentication refusal, not an entitlement or content-policy refusal). A platform key rejected on that leg stays provider_error. When that leg first failed with a transient error and the one automatic re-dial then answers 401/403, the re-dial's own response decides: an authentication refusal is provider_key_rejected, any other refusal (for example a content-policy 403) is provider_error. This outcome is never resumable. See After a tool result.
provider_key_invalid 424 The API key stored for this provider on this gateway is malformed: it contains control characters (for example a line break pasted with the key) and was not used; nothing was sent upstream and the Myra-provided fallback is not applied. A configuration fault an admin can fix, so it is a 424 outside the 5xx error budget. Store the key again in the gateway's provider settings; new keys with such characters are refused with 400 at POST /gateways/{id}/keys. A malformed key of the shared platform pool is reported as configuration_error (500) instead. Distinct from provider_key_missing, where no key is stored.
managed_model_not_enabled 424 The selected model is a Myra-provided (Platform Key) model this gateway has not enabled (no managed grant), and no own provider key covers it on the default alias either. Distinct from provider_key_missing so the actionable hint is the right one: enable the model under Add Model → Use Platform Key (usage is charged to the workspace wallet), or add your own provider key. Returned before any upstream call. (A request that names an alias other than default, in any letter case, keeps provider_key_missing — that alias signals an own-key intent.)
managed_model_unavailable 409 Admin API only — POST /admin/v1/gateways/{id}/managed-models refused to enable a Myra-provided (Platform Key) model because it cannot be offered on this deployment at all: the platform model pool is not configured, or the model has no billable price. Nothing is enabled, and it is permanent until Myra operations acts — retrying changes nothing. See Gateways › Myra-provided models.
managed_model_gateway_restricted 409 Admin API only — POST /admin/v1/gateways/{id}/managed-models refused to enable a Myra-provided model because this gateway's own settings exclude its provider (approved-provider list, EU data residency, a sub-processor objection, or a custom provider endpoint). Nothing is enabled; enable it on a gateway that allows the provider.
connector_not_found 404 A tools:[{type:"mcp"}] connector reference names a connector that does not exist or is not accessible with this token (another tenant's, or another member's private connector). Fail-closed: the request is aborted before any model call. See MCP connectors from the API.
tenant_gone 404 A conversation attachment found no live workspace behind the conversation's gateway: the workspace was deleted since (also a soft delete) or the gateway no longer exists. On the chat file upload (POST /chat/files) a gateway or workspace that is already gone when the request starts is 404 from the gateway access check; tenant_gone there covers only a delete that lands while the request runs. A 404, not a 5xx: a missing workspace is not a server fault, so the 5xx SLO and the 5xx alert never count it. Not retryable: a retry finds the same absence, so it is sent with x-should-retry: false and never with Retry-After; the web app shows it without a retry. A read that failed is service_unavailable (retryable) instead, so a missing workspace and an unreadable one never get the same answer. Masked as assistant_unavailable on the anonymous docs lane. Only with the tenancy switch on, see Suspended tenants.
connector_credential_required 424 The referenced MCP connector requires a per-user credential that the API token's user has not connected (or it expired — the detail names which). Connect or reconnect the connector in the UI, and call with an API token created by that user. The admin API's body also carries reason: credential_required, credential_expired, tool_blocked, upstream_auth (a tenant-scoped connector whose stored credential the server rejected) or credential_unreadable (the stored credential could not be decrypted; re-enter it with PATCH /admin/v1/mcp/{id}); any other or absent value means an unknown failure (see the 424 body). Also returned by PUT /admin/v1/mcp/{id}/credential when the pasted token is rejected by the provider at save time, and it is the code a per-user token's runtime provider rejection (a 401/403 on the connector handshake) now maps to — previously a misfiled 502. The rejection also flips the connector to "Reconnect needed".
connector_upstream 502 The referenced MCP connector's server did not answer tool discovery (unreachable, protocol error, or the ~20s discovery deadline was exceeded). A caller-side connector fault — check the connector's server_url and server health. Also returned by PUT /admin/v1/mcp/{id}/credential when the connector could not be reached to verify a pasted credential — a connectivity problem, not a bad credential; nothing is stored and the caller may retry. A user-scope pre-call credential fault (the tools listing, or PUT /credential) is likewise 502 connector_upstream, no longer 424.
connector_input_duplicate_key 422 A workflow Connector node's input repeats a key at any depth ({"a":1,"a":2}), so the value the tool receives would differ from the reviewed text (a JSON parser keeps only the last one). Refused by the gateway before any call is made; nothing reaches the connector. Send each key once. See Workflows.
invalid_handoff 400 Admin API only — the connector app redeem (POST /admin/v1/mcp/oauth/app-redeem) refused the handoff code: it is unknown, expired, already redeemed or of another kind (error invalid or expired code), or the stored handoff is unusable (error bad handoff, the code is burned). Start the connector authorization again. Replaces the older name handoff_invalid, which the gateway no longer sends (a rolling deploy may briefly show either). See MCP connectors.
verifier_mismatch 400 Admin API only — the connector app redeem (POST /admin/v1/mcp/oauth/app-redeem): the verifier does not match the challenge the flow was started with (error invalid verifier). The code is burned and nothing is stored; start the authorization again. A malformed verifier answers invalid_field instead. See MCP connectors.
configuration_error 500 The gateway configuration could not be loaded or parsed (malformed config, or a route that resolves to a disallowed/unsafe upstream), or a platform setting a gate depends on is unusable (for example a per-token budget check that the gateway refused as an internal fault — the request is refused rather than run without the token's cap; or a stored ip_allowlist that is not a list — the request is refused rather than run without the IP restriction). A Bedrock model id containing a character outside A-Z a-z 0-9 . _ : - is also refused with this code before the request is signed (on a gateway without EU enforcement; under enforcement such ids are refused earlier as data_residency_blocked). Distinct from provider_key_missing, which is a missing credential (424). Check the gateway configuration and error log. Also returned by POST /admin/v1/gateways/{id}/managed-models when the gateway's stored configuration cannot be resolved (nothing is enabled). After a tool result: when the gateway refuses the server-side tool loop's model call after a tool result for this reason, the turn ends with this code (non-retryable, no model-error triage row) — see After a tool result.
internal_error 500 An unexpected error occurred inside the gateway. Check the gateway error log for details.
service_unavailable 503 A transient backing-store or dependency read failed (for example the document-AI Copilot action or the Entra sign-in exchange, or, on the API, the token lookup, the provider-key lookup or the gateway lookup of an inference request (also on the MCP proxy and the async-result poll), or the model catalog of the Office add-in, or the authentication, visibility and load checks of the agent run lane (including the agent, knowledge-area, provider-pin, task and trigger reads and the scheduled-task delivery lookups, and the run-start, result-conversation and resume-claim writes that wrote nothing; on an open stream it arrives as an error event without Retry-After), the MCP proxy and the document-AI Entra lane, that found no free database connection or hit a self-clearing database state), so the request was refused rather than served from an unknown state. The API's answer carries Retry-After: 1. Admin transient-storage 503s ("temporarily unavailable; retry later") also carry Retry-After: 1, readable cross-origin. Retryable. Admin provider-key reads (the chat attachments Anthropic key, summarize) answer 503 only for a transient fault; a permanent one is 500. A permanent database error stays internal_error (500). See Database connections and capacity.
service_starting 503 A transient, retryable state during a deploy/restart window: the worker has started but its schema migrations have not finished applying yet, so it refuses DB traffic until the schema matches the code (rather than returning an inconsistent per-column error). The JSON body carries the code both as a top-level "code": "service_starting" and inside the nested error object, on every route and in the Anthropic-native shape too. The response includes a Retry-After header (seconds) — retry after that delay and the request succeeds once migrations complete. /healthz (liveness) stays 200 throughout. If it persists well beyond a normal restart, a boot migration has failed (fail-closed) — check the gateway error log. A separate /readyz endpoint (JSON) reports true readiness: it returns 200 only when the schema is ready and no enabled host-runtime dependency is broken, and 503 + Retry-After otherwise, with a body naming each capability's status (e.g. the code-interpreter sandbox's mTLS/HMAC and the blob store's writability, and the crypto.kdf_v2 row — always present, ok: true only when the vendored key-derivation library loads and derives a key, so a worker that cannot encrypt or decrypt secrets and memories shows up as a named 503 row instead of a 500 on first use). A boot-time preflight validates those host deps once per (re)start and logs CRIT naming any broken one, so a provisioning miss (a bad cert file mode, a non-writable bind-mount, an empty session secret) is loud and visible at /readyz instead of silently failing closed per request. Repoint a load balancer at /readyz to gate routing on the deps actually being usable. While the schema is not ready the Retry-After is the same value service_starting carries; while the preflight has not published yet (the first moments after boot) or its published status is unreadable, /readyz also answers 503 (preflight_published: false); a 503 caused only by a broken capability carries Retry-After: 5 and persists until the host dependency is fixed and the backend is restarted (the preflight runs once per boot). A third probe, /readyz/schema (JSON, API host), answers readiness of the schema only: 200 {ready: true, schema_ready: true, scope: "schema"} once the boot migrations have finished and the serving gate is open, 503 + the service_starting Retry-After until then — and indefinitely if a boot migration failed. Schema migrations are serialised across backend containers (and against scripts/db.sh migrate) by a database advisory lock: when several containers start at once, one applies the migrations while the others wait for it, so /readyz/schema can stay 503 for the length of the slowest migration on every container, not just the one doing the work. Each waiting container logs migration lock: waiting for another instance (…, holder connection <id>), naming the database connection that holds the lock. It is the backend container healthcheck in the shipped Docker Compose files (the container reports starting/unhealthy instead of a green /healthz over a gateway that refuses every request); a broken host capability deliberately does not mark the container unhealthy. All three probes take no input (any method answers the same; a query string or body is ignored), and read only in-memory boot state — they never touch the database, so they answer during the very window they report on.

The field of unknown_field, read_only_field and invalid_field is the offending key, capped at 64 bytes (a longer key ends in …; ASCII control characters (U+0000–U+001F, U+007F) and invalid UTF-8 bytes are replaced by ?).

Rule for new codes: existing specific invalid_<name> codes stay unchanged; new validation sites use invalid_field plus field instead of minting another code. The tenant and gateway refusals above are listed per status in Tenants & gateways.


Notes on specific codes

After a tool result

When the gateway's server-side tool loop calls the model again after a tool ran and that call fails, four rules apply (full detail: Inference › The model call after a tool result fails):

  • One automatic re-dial. A transient failure before any byte of the answer — a dropped or reset connection, a read / first-byte timeout, a connect error, HTTP 500 / 502 / 503 / 504 / 529, or a 429 whose Retry-After / retry-after-ms hint is at most 10 s (Retry-After must be whole delta-seconds — digits only; retry-after-ms / x-ratelimit-reset-after-ms a non-negative decimal, and an ms header takes precedence; a repeated header, an HTTP-date or any other form is ignored as no hint, which also applies to the gateway's ordinary retry backoff) — is re-sent once per request with the same tool results (no tool runs again), after a short backoff or the hint, regardless of the gateway's retry_count. Never for any other 4xx, a context overflow or a policy refusal; skipped when the model's circuit breaker is open, the user stopped, or the remaining tool-loop time budget (900 s for a streamed turn, 360 s when the client receives nothing until the end (a chat bridge turn: 900 s), 900 s unattended) cannot fit the wait plus a 20 s first-byte window. A recovered re-dial is invisible to the client; when it also fails, the turn ends with provider_error / request_timeout as before.
  • A rejected own key is typed. When the provider rejects the customer's own key on that call (401, or a 403 authentication refusal), the turn ends with provider_key_rejected (424) naming the provider, exactly as on the first call: no re-dial, no retry, no Try again, no model-error triage row. A platform key's 401 there stays provider_error.
  • Policy refusals are typed. When the gateway itself refuses the call for a policy reason, the turn ends with that policy's code — data_residency_blocked, provider_not_allowed, provider_objected, agent_protection_blocks_model, inherent_search_blocked, inherent_search_egress_blocked, local_only_egress_blocked, configuration_error, model_not_found (a deprecated or unpriced model), model_disabled_on_gateway, model_disabled_for_tenant, gateway_disabled, role_model_not_allowed — non-retryable (no Try again), no model-error triage row. Live stream: the error frame plus an aig_status: "provider_error" event with error_class = that code; a conversation turn persists a failure row with that error_class; stream: false: that code's HTTP status with x-should-retry: false; native /anthropic/v1/messages: that status with an Anthropic permission_error (403) / invalid_request_error (400) / api_error (500) body. An observed-egress overflow of the residency or provider allowlist (a saturated Myra fleet routed the answer off the allowed set — the same condition the first model call retries) is not a policy refusal here: it stays a retryable provider_error, re-dialled once, with no triage row.
  • A partial answer is marked interrupted. When the turn had already shown text or a file, the partial is kept as the answer with the message field interrupted_class = the code. A stream: false API request does not get the partial: it receives the typed error status (x-should-retry: false only when tools ran).

context_overflow — the pre-flight context gate

Before calling the upstream provider the gateway estimates the request's input token count (including the server-composed system prompt the client never sees) and, when it exceeds the selected model's advertised context window, it now automatically recovers rather than refusing: the gateway summarizes the older conversation history into a compact preamble (reusing the same bounded summarizer the /summarize compaction route uses — each message is head+tail-clipped and the summary input itself can never re-overflow), keeps the most recent turns and the current message, re-measures, and proceeds with the turn. The user gets a real answer, not a wall; a subtle aig_status: "compacted" status line is surfaced. The original transcript is untouched — only the model-visible context is compacted. One exception: on a self-serve workspace past its allowance, the summary call reserves its full cost from the prepaid wallet first; when the wallet refuses it (or already refused an earlier call of the same request), nothing is compacted, no compacted status is sent, and the request answers the wallet's typed refusal (wallet_insufficient, trial_budget_exhausted, quota_exceeded, wallet_funds_reserved or spend_unverified — see Budgets — Wallet). This is always-on for every tenant and gateway: it is a reliability floor, independent of the context_compaction setting (which governs only Anthropic's native long-context compaction, a separate sub-window mechanism). A single oversized message is first head+tail-clipped to fit; an inline data-file preview (a user text block of the gateway's [File: <name>] format carrying a spreadsheet extract — see the inference API reference) is likewise shrunk server-side to fit the window (with a visible truncation notice inside the block).

The pre-flight HTTP 413 with the body below therefore fires only in the one case automatic recovery cannot save — a single message that alone exceeds the window even after clipping (architecturally impossible for any real routable model, whose window far exceeds one ~14 KB clip), or the post-provider backstop for a model whose window the catalog does not know (no window is known there, so nothing can be fitted). When it does fire, estimated reflects the ORIGINAL, un-shrunk request. The message follows the conversation language (German or English; the English text is shown below).

{
  "error": { "code": "context_overflow", "message": "This message is too long for the selected model. Switch to a model with a larger context window, remove an attachment, or start a new chat." },
  "estimated": 142000,
  "limit": 32000,
  "suggested_model": { "provider": "anthropic", "model": "claude-sonnet-4-6", "max_input_tokens": 800000 },
  "can_compact_now": true,
  "first_turn": false
}
  • estimated — the gateway's conservative estimate of the request's input tokens.
  • limit — the selected model's advertised max_input_tokens. null when the model advertises no window (in that case the code is emitted as a backstop, after the provider itself rejects the request for context length, so the client still gets this graceful shape instead of the raw upstream error).
  • suggested_model — the smallest catalog chat model with at least 50% headroom over the reported estimated (on the provider-rejection path, when the model's window is known — limit present — that value is never below limit + 1, so the suggestion's window always exceeds the window that just overflowed) that the caller can actually route to. It is filtered by exactly the checks the dispatch path enforces: data-residency region, the gateway's provider allowlist, and a routable credential (a configured provider key, the keyless EU fleet — for self-serve workspaces, the platform Anthropic pool — or a tenant's Myra-provided managed grant) at model granularity: a grant-only gateway's granted claude-sonnet-5/claude-haiku-4-5 can be suggested, but never the rest of the anthropic catalog it isn't granted — the same offer==route fold the model pickers use, so the suggestion never names a model that would then 424 for a missing key. In a Local only project (or while the project binding cannot be confirmed) only local Myra models are suggested — the project would refuse any other. This fold also withholds a managed grant when the deployment's platform model pool is not wired (its leg could not route), so an unconfigured pool never surfaces a Platform-Key model that would fail (enabling one there is refused 409 managed_model_unavailable); and, for a self-serve plan, the model must also be inside that plan's model list. It is null when no routable model has enough headroom. Because of this filter, switching to the suggested model never produces a model_not_found, a residency/allowlist block, or a plan_model_not_allowed.
  • first_turn — true when the request carries exactly one user turn (the prompt is the conversation): the message then says "Your input is too large for this model's context window. Shorten it, remove attachments, or pick a model with a longer context." instead of suggesting a new chat. A user turn is a role: user message with text or media content; an Anthropic-wire tool_result-only user message is not one.
  • can_compact_now — kept for compatibility; always the negation of first_turn (a first turn has no earlier history to summarise).

If the SSE stream has already opened (for example a PII/guardrail check flushed an early progress event on a masking gateway), a raw 413 body would corrupt the event stream — so the same overflow is delivered over the open stream as a terminal event on an HTTP 200 response, followed by data: [DONE]. A client that opted into the gateway's aig_* side channel (x-aig-turn-id, or x-aig-extensions: 1) receives the provider_error shape below; a plain OpenAI-compatible client receives the same failure as {"error":{"message":"…","type":"gateway_error","code":"context_overflow","estimated":…,"limit":…,"suggested_model":…,"first_turn":…}} — the recovery fields ride along either way; the envelope differs, and the plain shape carries the actionable sentence in error.message rather than user_message.body (see Inference — what a plain client receives):

data: {"aig_status":"provider_error","error_class":"context_overflow","message":"…","user_message":{"body":"…"},"estimated":148000,"limit":200000,"suggested_model":{"provider":"anthropic","model":"claude-sonnet-4-6","max_input_tokens":1000000},"first_turn":false}

data: [DONE]

The event carries the SAME estimated, limit (may be null), suggested_model (may be null) and first_turn recovery fields as the HTTP 413 body (can_compact_now is not forwarded on the stream — it is the negation of first_turn), so a client renders the identical shorten / switch-model / new-chat recovery banner on either delivery path. Clients MUST treat these fields as untrusted (validate types; a non-numeric estimated or malformed suggested_model degrades gracefully rather than being trusted verbatim).

On an Anthropic-native route (/v1/messages) the open-stream frame is an Anthropic event: error whose error.type is request_too_large and error.code is context_overflow; the recovery fields (estimated, limit, suggested_model, first_turn, can_compact_now) sit at the top level of the frame next to error, exactly as in the HTTP 413 body.

A turn whose egress is buffered (a code-interpreter / tool-loop leg) takes the same contract: when its final leg overflows, the gateway delivers the honest context_overflow message and the recovery fields exactly as above (over the open stream if one is already open, else as the 413 body), and persists the honest sentence as the turn's stored content — never the opaque "The request could not be completed." A reloaded thread therefore shows the same honest text, and the stored content returned by the conversations API / exports carries it too.

The stored content follows a strict at-rest policy: the gateway persists only its OWN gateway-authored overflow sentence for a context_overflow turn — never a provider's raw error prose. A context_overflow code on the wire is not sufficient to store the body's message: an upstream (e.g. a BYO / proxied endpoint) that returns {"error":{"code":"context_overflow",…}} with arbitrary prose is treated as an ordinary provider error at rest (the generic sentence is stored), because a wire code the gateway did not author is untrusted input. The honest message is stored only when the gateway itself produced the overflow body.

Tenant block notice

When a tenant has set block_message and/or ai_policy_url (Tenants & Gateways), a content-policy block (guardrail_blocked, including the classified-markings arm) shows them to the end user:

  • /v1 plain-text refusal (request phase): the text is extended with <block_message> and then Policy: <ai_policy_url>. A field that is unset is left out silently. The refusal of the response phase is not extended.
  • Web app (turn-owned streams): the stream keeps its sanitized refusal text and costs no tenant lookup. The policy-block bubble reads tenant_block_message and tenant_ai_policy_url from GET /admin/auth/me instead, rendering the message as plain text and the URL as an https:// link that opens in a new tab.
  • Other block classes (PII, media, role-model, unavailable) never carry the notice.
  • Both stored values are re-validated with the same rules as PATCH; an invalid stored value is left out (the gateway logs a warning naming only the tenant) and the refusal still goes out unchanged.

guardrail_blocked — streaming vs. non-streaming

In non-streaming mode, a guardrail block returns HTTP 400 with the guardrail_blocked error JSON.

In streaming mode ("stream": true), the guardrail check runs before the provider call. When a block occurs the gateway returns HTTP 200 with a synthetic SSE (Server-Sent Events) stream containing an error message chunk followed by data: [DONE]. This is necessary because some streaming clients do not gracefully handle a non-200 HTTP status on a streaming response.

data: {"id":"...","choices":[{"delta":{"content":"[Blocked: S1]"},"finish_reason":"stop"}]}

data: [DONE]

💡 Note: Your client should inspect the chunk content for the block message if it processes streaming responses. The log entry for the request will have blocked: true and blocked_by: "guardrail" regardless of the HTTP status returned.

💡 Note (first-party turn-owned streams): In addition to the content chunk above, a turn-owned stream (the web app) receives a gateway-extension event {"aig_status":"guardrail_blocked","error_class":"<class>"} so the app can render a distinct policy-block notice. error_class is a stable slug — guardrail_blocked (content policy), guardrail_pii_mandatory, guardrail_pii_media, guardrail_classified_media (an attachment on a classified-markings gateway could not be scanned as text), guardrail_role_model (the selected model is not in the user role's allowlist), guardrail_unavailable, or guardrail_unconfigured (a guardrail that is not set up) — and never carries request content. When a built-in data-protection rule (credit card, bank account, ID number, tax ID, health insurance number) caused a guardrail_blocked block, the event also carries an optional "category" (credit_card, bank_account, id_number, tax_id, health_insurance, or classified_marking for a classified-markings keyword rule) so the app can name the kind of data; it is omitted for every other rule. A guardrail_unconfigured event may carry a "detail" object: check (prompt_injection or prompt_guard, the check that is not set up) for every user, and, only for an organisation admin or platform admin, reason (missing, credential_unreadable or invalid_endpoint, why the prompt-injection classifier is unusable) and scope (baseline or gateway) with tenant_id (and gateway_id for gateway), so the app can link the page that carries the rule. The server decides this by role; a member's event never contains reason, scope or the ids, and no event contains the classifier endpoint or credential. The detail is stored with the turn and returned on a reload as guardrail_block_detail, split by role for whoever views the conversation (see Conversations — refusal detail). A guardrail_blocked block by a keyword or regex guardrail on the request may carry "where": where the match was (system:instructions, user, tool_result:<tool> or fetched:<host>, a closed format; never the matched term; omitted when unknown; not stored with the turn), see Keyword guardrail — match location. A stream that is not turn-owned but opted into the aig_* side channel (x-aig-extensions: 1, e.g. an agent's Try it) receives the same event after the refusal content and nothing is persisted for it. On a turn-owned stream the refusal delta.content is a generic, sub-category-free message; external API clients that did not opt in see the unchanged detailed prose and never receive this event (except a classified_marking block, whose refusal text is fixed for every client; see Guardrails — classified markings). See Inference — streaming.

💡 Note (response-phase blocks): A guardrail configured with target: "response" runs on the model's buffered answer (after the provider call) rather than on the request. For a first-party turn-owned stream, a response-phase block is delivered exactly like the request-phase block above — the same {"aig_status":"guardrail_blocked","error_class":"<class>"} event followed by data: [DONE] (the gateway opens the stream if it was not already open) — so the app renders the same policy-block bubble whether the block happened before or after generation. The blocked model output is discarded and never reaches the client. The turn is persisted as a durable assistant row stamped with the block class, so on reload the web app reconstructs the identical policy-block bubble instead of showing a lone user message. External API clients receive the typed guardrail_blocked error (HTTP 400, or — if a stream was already open — a terminal SSE event: provider_error when the client opted into the aig_* side channel, otherwise the OpenAI-shaped {"error":{…}} frame) unchanged, and nothing is persisted for them.

💡 Note (native Messages route, held streams): On the native Anthropic Messages route (/v1/messages with stream: true) a response is sometimes held back while a guardrail or a check runs, and the gateway sends : hb comment lines to keep the connection open. If a refusal or block follows, a client that already received a heartbeat has HTTP 200, so the error arrives as one Anthropic event: error frame and the stream ends without a message_stop. Without a heartbeat the same refusal is a normal HTTP error response (a block is 400). For a first-party turn-owned native stream, a block is a 400 JSON error before the response head is sent and an event: error frame after it; no aig_status frame is sent on the native route, and the failed turn is still saved so it shows after a reload. For an external native client, a block after a heartbeat is an event: error frame with invalid_request_error. A provider error that arrives after a heartbeat is an event: error frame whose type follows the HTTP status of the failure (429 rate_limit_error, 503 and 529 overloaded_error, 504 timeout_error, any other server error api_error), never the provider's own type string; a provider answer the gateway cannot read is an api_error.

💡 Note: The Retry-After header contains a number of seconds (e.g. 12), not an absolute timestamp: the time, rounded up to whole seconds, until enough earlier requests have left the trailing window for one more to be admitted. Retrying one request after Retry-After seconds succeeds if no other request used the freed capacity in between.

rate_limited — response headers

When the gateway's own sliding-window limit returns rate_limited, the response includes three headers:

Header Description
X-RateLimit-Limit The configured request limit for the window.
X-RateLimit-Remaining Requests still admissible right now in the trailing window (0 when blocked).
Retry-After Whole seconds (rounded up) until a request would be admitted again.

A provider-origin rate_limited (the inference terminal relaying the provider's final 429) carries a different set: X-AIG-Rate-Limited: true always, the provider's Retry-After when it sent one, and — for providers on the Anthropic dialect — X-RateLimit-Input-Tokens-Remaining / X-RateLimit-Input-Tokens-Reset / X-RateLimit-Requests-Remaining / X-RateLimit-Requests-Reset. The gateway's own X-RateLimit-Limit / X-RateLimit-Remaining may ALSO be present on such a response (they are set on the way in whenever the gateway or token has a limit configured and describe that window — Remaining can even read 0 on the window's last admitted request); branch on X-AIG-Rate-Limited to tell the two origins apart, never on the presence of X-RateLimit-Limit.

429 from the ingress (connection and request limits)

Before a request reaches the gateway, the ingress limits how many connections and how many requests per second one client address may use. A client over a limit receives:

HTTP/2 429
Content-Type: application/json
Retry-After: 1

{"error":{"message":"Too many requests.","code":"rate_limited"}}
  • Retry: wait the Retry-After seconds (always 1) and retry with back-off. The limits are shared by every request from one client address, so a burst from a single machine is refused while other clients are unaffected.
  • Limits: at most 1,024 concurrent requests per client (each HTTP/2 stream counts) and a sustained 100 requests per second per client address, with a burst allowance of 5,000 requests that are served without delay. The limits count per client as seen through the forwarding hop. A request from a client behind a shared outbound address (an office proxy, a NAT) counts against that one address.
  • Browser apps: the response carries the CORS headers of the app origin, so a browser script can read the 429 and the Retry-After header. The app origin is fixed; a different Origin is never echoed back. A browser page on any other origin (including an OPTIONS preflight that is over the limit) sees a CORS failure, not the readable 429.
  • Slow clients: a client that has not finished sending its request headers within 15 seconds, or that sends nothing for 30 seconds while the request body is being uploaded, is disconnected. Streaming responses are not affected by these timeouts.
  • Not limited: the health endpoint.

This 429 is distinct from the gateway's own limit (per token or per gateway), which carries X-RateLimit-Limit, X-RateLimit-Remaining and a computed Retry-After.

all_providers_failed — when to expect it

This error is returned only when all of the following are true:

  1. The primary provider returned 5xx errors on every attempt (up to retry_count).
  2. Every fallback provider in the fallbacks array of the routing rule also failed.

4xx responses from a provider are not retried against a different model and are returned to the caller immediately (the error of the provider is forwarded, not wrapped in all_providers_failed). A 4xx whose error message reports an upstream outage (the Myra model proxy's "There are no healthy deployments for this model") is the exception: it is handled like a 5xx, retried and then failed over, and ends as all_providers_failed. The other exception is a small set of transparent, gateway-side 4xx self-recoveries that fix the request body (ours or, for the unsupported-parameter strip, the caller's) and re-send the same model before giving up: a deprecated request parameter is stripped, a forced tool_choice the backend cannot guided-decode is dropped, the gateway's own injected tools are removed when the backend refuses them (see model_capability_mismatch), and an unsupported request parameter is stripped. Each strip fires at most once, and a call re-sends at most twice (3 dials in total) when a deprecated-parameter and an unsupported-parameter strip chain (see chained recoveries); none fires after streaming has begun; if the last resend also fails, that resend's error is surfaced (when no resend happens, the original error is).

⚠️ Caution: A provider_error on a single provider with no fallbacks configured behaves identically to all_providers_failed — both return 502. Configure fallbacks in your routing rules to avoid single-provider outages surfacing as errors to your end users.

invalid_request — common causes

The following conditions commonly cause this error:

  • Missing required fields in a POST body (e.g. no slug when creating a tenant)
  • Unknown bucket value in GET /stats/timeseries
  • n outside the range 1–168

(A body that is not valid JSON is not an invalid_request: it is refused at the body read, with its own code — see the next section.)

Request body shape

Every route under /admin/v1/… and /admin/auth/… that takes a JSON body (POST / PUT / PATCH, and the two DELETE routes that read a body: /me/device-token and the agent connector-consent revoke DELETE …/agents/{id}/consents/{cid}) reads it through one parser, so the rules below hold uniformly and are not re-implemented per route. (The SAML assertion consumer POST /admin/auth/saml/{tenant}/acs takes a form-encoded body and is outside these rules; its form rules (exactly one SAMLResponse, no repeated or value-less SAMLResponse/RelayState, at most 16 fields) are under accepted inputs. The SCIM endpoint reads through the same parser in its stricter object-only mode and renders the two rejections below as SCIM Error documents.)

Accepted shape: a JSON object. One other case is read as "no fields present" and left to the route: an absent or empty body, or one containing only JSON whitespace (space, tab, CR, LF — e.g. a trailing newline from a shell) — legitimately "nothing sent".

A well-formed non-object JSON value (a JSON array, string, number, boolean or null) is not "nothing sent". On the default object-body admin, auth and partner routes it is 400 {"error": "request body must be a JSON object", "code": "malformed_body"} and nothing is written. The strict routes answer their own code instead, for the same inputs (for example 400 invalid_body, which some of them also answer for an absent body): plan change, user move, roadmap, model-task eval, the strict-object groups / roles / users routes, partner static-OTP and SCIM. See each route's section.

What the route then does with "no fields present" is the route's own contract: a POST missing a required field returns that route's 400 (e.g. slug on tenant create); a PATCH with no field gets the empty-body answer documented for that route (PATCH /gateways/{id}: a 200 no-op that stores nothing; PATCH /tenants/{id}: a 200 that changes no field while row_version still advances; PATCH /gateways/{id}/tokens/{token_id}: 400 no_fields). Routes that declare their accepted top-level keys — PATCH /tenants/{id}, PATCH /users/{id}, PUT /users/{id}/static-otp, PUT /partners/{id}/static-otp, PATCH /gateways/{id}, POST /tenants/{id}/gateways and PATCH /gateways/{id}/tokens/{token_id} — refuse an unknown top-level key (a misspelt key, a field from another route, or a config sub-key sent at the top level) with 400 unknown_field and store nothing; keys inside config are checked by the config rules, not by this key check. Other routes ignore an unrecognised top-level field unless their own section says otherwise.

Rejected — fail closed, at the body read (before any field is consumed). Absent and malformed are different answers: a body that was sent and could not be understood is refused rather than degraded to "nothing sent", so a save can never be reported as succeeded when the request itself was not understood. These come back in the flat admin shape with a sibling machine code:

Code HTTP status When
malformed_body 400 The body is not valid JSON ({, a truncated payload, a trailing token, binary garbage, a raw NUL byte anywhere in the body, a UTF-8 byte-order mark before the object, a vertical-tab/form-feed "whitespace" that JSON does not allow). No field is read from it and nothing is written; the parser's error position is logged server-side, the body content itself is never logged. {"error": "request body is not valid JSON", "code": "malformed_body"}. The same 400 malformed_body answers a body that holds a number which is not finite anywhere in it — the non-JSON literals NaN / Infinity or an out-of-range number such as 1e999 ({"error": "request body contains a number that is not finite (NaN / Infinity / out of range)", "code": "malformed_body"}): such a value could not be stored or re-encoded (an agent's tool_config used to be saved as {}), so no route receives it. On POST /admin/v1/me/pii-keywords a body that is valid JSON but not an object (an array, a string, a number, null) or not valid UTF-8 answers malformed_body too; see Account — Adding a personal PII keyword.
duplicate_key 400 An object in the body repeats a key at any depth ({"a":1,"a":2}, also inside an array or a nested object, and also when one spelling uses escapes such as "\u0061"). A JSON parser would keep only the last value, so the repeated value would silently replace the first one (an allow-list, a flag, a limit); the gateway refuses the body instead and writes nothing. The message names the key when it is short printable ASCII. Send each key once. {"error": "request body repeats the key \"a\" in one object; each key may appear only once per object", "code": "duplicate_key"}.
body_too_complex 413 The body holds more JSON values than the route allows (262,144 structural elements; 32,768 on the upload routes; 2,097,152 on the internal loopback APIs). A workflow webhook trigger allows 16,384. Checked before parsing, ahead of malformed_body for malformed JSON (a raw NUL byte, or invalid UTF-8 where strict, answers malformed_body first). The byte size is bounded separately by payload_too_large.
body_unreadable 503 A body was sent but the gateway could not read it (a large body spooled to a temp file that then failed to read). Not a client error — nothing about the request was wrong — so it carries Retry-After: 10. It only ever occurs on large bodies, so a client must not auto-retry in a tight loop; wait out the header. Distinct from an absent body, which is legal here (on the SCIM plane an absent body is itself a 400 invalidSyntax). The internal loopback workflow, scheduler and ingest APIs (secret-gated, not for customer use) answer the same condition as a plain 500 body_unreadable with no Retry-After; their callers treat it as transient and retry on their next tick.

These rejections are raised only when a handler is about to read the body, i.e. after the readiness gate and — on /admin/v1/… and PATCH /admin/auth/me — after the session check and the demo-user write block (the other /admin/auth/… routes are anonymous by design, or — impersonation start, the CI session grant — run their own credential check before the body read): a demo user still receives 403, an unauthenticated caller 401, and a mid-deploy request the readiness 503. (Routes whose own permission check runs after the body read answer 400 before 403 for a malformed body; this leaks nothing a well-formed body would not also reveal.) A malformed body never yields a 500.

Unsupported-parameter strip-on-400

Some Myra-hosted OpenAI-compatible backends hard-400 a request that carries a reasoning-control parameter their model does not accept — most often reasoning_effort on a non-reasoning model (litellm.UnsupportedParamsError: openai does not support parameters: ['reasoning_effort'], for model=…). Either the gateway attached the parameter itself, or the caller sent it — claude-cli, for example, sends an OpenAI-style top-level reasoning_effort on the native /anthropic/v1/messages route, which Anthropic answers with 400 invalid_request_error "reasoning_effort: Extra inputs are not permitted". The turn used to die outright. The gateway now strips the offending parameter and re-sends the same model once; the error of the resend is surfaced only if the resend also fails.

This is a fail-closed control, because the 400 body is untrusted (a provider, or a per-gateway provider_base_urls endpoint, controls its text):

  • Accepted (stripped + retried): a 400 whose body is a litellm UnsupportedParamsError (or carries the exact phrase "does not support parameters:"), or the Anthropic envelope {"type":"error","error":{"type":"invalid_request_error","message":"<name>: Extra inputs are not permitted"}} where <name> is a single top-level identifier (a dotted or nested path, extra text or a different phrase is rejected), and whose named parameter list contains only parameters on a fixed, hand-audited allow-list of pure reasoning/verbosity controls whose removal can never change the response contract — currently reasoning_effort, reasoning, and thinking. Only the named parameters actually present on the request body are removed, and the retry is bounded to one per turn.
  • Rejected (no strip, original 400 surfaced): any body that is not that error; a body that names the error but from which no parameter list can be located or that lists no quoted identifier (absent and malformed both surface the original error — a garbled body can never trigger a blind retry); and — the load-bearing guard — a list that names any parameter not on the allow-list (e.g. tools, response_format, stream, temperature). One off-list name blocks the entire strip: the gateway never silently drops a parameter that carries safety or response-shape meaning; also a provider error message longer than 256 bytes (measured before trimming).

The retry never fires after the first response byte has reached the client (streaming safety). On the native Anthropic route the resend is built from the stripped body, so the dropped parameter is not re-sent.

A recovered strip writes no model_error row (the turn succeeded). Its evidence is request_log.meta.unsupported_params_strip (named, stripped, suppressed).

Deprecated sampling parameters, and chained recoveries

Newer Anthropic models refuse a sampling parameter outright: 400 invalid_request_error "temperature is deprecated for this model." (claude-sonnet-5-5 does this for temperature). The gateway recognises that envelope — {"type":"error","error":{"type":"invalid_request_error","message":"…"}} whose message is either the backticked form `<name>` is deprecated for this model. or the unquoted form <name> is deprecated for this model. (trailing period optional), with a single identifier <name> — and only for the fixed allow-list temperature, top_p, top_k. Anything else (another phrase, a dotted path, a message longer than 256 bytes measured before trimming, a body that is not that envelope, a name off the list) surfaces the original 400 unchanged (absent and malformed both fail closed). The named parameter is removed from the bytes actually forwarded (native and compat routes) and the same model is re-sent.

Recoveries chain within a turn: a native request carrying both reasoning_effort and a deprecated temperature gets two successive 400s, and each resend's response is examined again. The deprecated-parameter recovery fires at most once per call (each failover target gets its own) and the unsupported-parameter strip at most once per turn, so a call re-sends at most twice and dials the provider at most three times in total; if the last resend also fails, its error is surfaced. A recovered turn writes no model_error row; the evidence is request_log.meta.deprecated_param_strip (param, provider and model of the recovering target, and via: recovered when this turn learned it from the 400, learned when a previous turn's 400 on the platform's own provider endpoint (not a gateway's provider_base_urls override) already taught the gateway to omit it up front). A 400 from a gateway's own provider_base_urls endpoint only affects that turn; it is never remembered for other tenants.

An unrecovered anthropic 400 whose message is … is deprecated for this model is classified BadRequest by message match (pattern is deprecated for this model, triage category user_fault), and is recorded under its own stable triage fingerprint instead of the generic 400 body-hash signature.

Triage signature of unmatched provider errors

When a first-party provider answers 4xx and the gateway has no specific handling for it, the error is recorded for triage under a signature <status>~<12hex> instead of the bare status, so different provider failures are no longer merged into one issue.

  • Accepted input: in a JSON body only the provider message fields error, message, msg, detail, type, code, param and loc are read. Elements of a top-level array are walked only when they are objects; bare strings or numbers there are skipped. A plain-text or HTML body is hashed as text (first 1024 bytes).
  • Ignored or stripped: every other JSON field, and volatile parts of the text (numbers and identifiers are normalised, quoted spans are replaced unless the span is a single identifier-like token of at most 40 characters) are dropped before hashing. Quoted identifiers such as a parameter or model name (up to 40 characters, letters, digits, _, ., -) are kept, because they tell errors apart; 'my secret' is replaced.
  • Truncated or unparseable JSON: the first occurrence of message, msg and detail is read, only when its value is a string, and after the first "error":{ when one is present.
  • Bounds: at most 1024 bytes of text, 32 strings, depth 5 and 512 nodes are examined; a missing or malformed body still yields a valid signature (none~... when the status is not a number).
  • Nothing is stored: only the 12-character hash is kept; the provider text itself is not stored or shown.

chat PDF/image OCR — extraction failures

When a chat upload needs OCR (a scanned/text-less PDF page, or an image), the gateway runs an on-prem extractor that calls the OCR vision model. When the OCR service itself is busy or unavailable the upload returns 503 extract_transient (below); when the call fails for the document's own sake it returns 422 with a detail such as OCR could not extract text from PDF: <reason>. The <reason> is actionable rather than a bare HTTP status:

  • (type=bad_request_error) / (type=validation_error) — the OCR model rejected the document (unsupported or unreadable page content). These two content-reject classes are the only provider error types surfaced to the caller. This is a terminal reject — a re-upload of the same page will not succeed.
  • A dense page is read in continuation requests. A page the OCR model cannot finish in one short request is continued in further requests (up to 8). A continuation that fails because the service is busy or unreachable behaves like any other transient failure (extract_transient, below); a continuation that is rejected with a non-retryable 4xx answer, comes back malformed (not valid JSON or the wrong shape), comes back empty, or repeats the start of the page does not fail the upload: the text already read is kept and marked truncated (for project documents: stored partial). Any other failure of a continuation fails the upload as before.
  • No type suffix — an unrecognised error. (A transient fleet condition the extractor bounded-retried and gave up on is no longer a 422 — it is extract_transient, below.)
  • pdf_password_protected (a distinct 422 code) — the PDF is encrypted with a user password. The extractor detects this up front (before any page read) and rejects it with a stable, machine-readable reason, so the chat upload returns the specific code above (and the worker/connector path records a password-protected reason) instead of a generic extraction failure. An owner-password-only PDF (readable without a password) is not rejected.
  • pdf_malformed (a distinct 422 code) — the PDF's structure could not be read even after the extractor's one automatic repair pass. Before giving up, the extractor rebuilds a damaged page tree from the document's page objects (so a PDF whose page count is wrong, or whose page list is missing or points nowhere — files consumer viewers open — is served) and, for bytes its primary PDF library cannot open at all, re-reads them through a second parser (qpdf). Only when nothing is recoverable does it emit the stable malformed reason (the worker/connector path records a malformed: reason). The repair runs inside the same sandboxed, memory- and time-limited subprocess as the extraction; running out of memory is never reported as malformed.
  • pdf_no_text (a distinct 422 code) — every page was read but none yielded text (a scan the OCR found nothing on). The async knowledge path stores such a document with a "no readable text" marker instead.
  • extract_transient (a 503 with Retry-After) — the OCR fleet stayed busy past the bounded retry (Retry-After = the fleet's own hint when it sent one, else 10 s), or the platform's OCR credential is not configured (not retried, operator-logged, Retry-After: 60). PDFs and images alike. The file is fine; retry later. The body may add cause (ocr_unavailable | ocr_too_slow) and page / total_pages; only a value consistent with the exit status is accepted, anything else is dropped and the plain code is returned.

Accepted vs. rejected shape (the provider response is untrusted — principle 11): the OCR model's error body is parsed defensively (size-capped, JSON-only, fail-closed). Only a known, bounded content-reject type token is placed on the user-facing message; the model's free-text message and any internal-infrastructure type (DB/auth/quota/model-access classes) are operator-log only (the operator-facing server log), never the user response — so a malformed, oversized, or hostile error body can never leak backend internals or forge a control line into the reply. A control-plane failure is classified transient (retried) — except an OCR credential that is not configured, which no retry can fix and which answers extract_transient at once; a genuine content reject stays terminal. The OCR service's Retry-After hint is untrusted too: only a whole number of seconds written as plain digits is honoured (capped at one hour, and at 60 s on the response); anything else — a date, inf, a hexadecimal or negative value, a repeated header — is ignored and the default applies. Separately, each OCR page/image strip is downscaled to the OCR model's pixel budget before the call, so an abnormally large rendered page cannot itself provoke the reject.


Request body size limits (413 payload_too_large)

Every endpoint has a maximum request-body size. A body larger than its route's limit is rejected by the gateway edge with HTTP 413 before the handler processes it — nothing is parsed, billed or recorded as a turn. This bounds the pre-authentication surface (login, one-time codes, SAML sign-in, anonymous crash reports, public webhooks are all a few kilobytes) and the authenticated one. On every gateway host — the web app, the inference API, the admin API — and on the ingress in front of them, a 413 is one of the bodies documented below: it never names the server software or its version, and it is never the web server's generic error page.

  • A body whose size is declared (Content-Length) over the limit is refused on the request headers, before any of it is read.
  • A body sent without a declared size (Transfer-Encoding: chunked, or HTTP/2 without a content-length) can only be refused while it is read: it is read up to the limit — after authentication, the IP allowlist and rate limiting on the inference lanes, so it counts against the rate limit — and then refused with the same 413. A client outside the gateway's IP allowlist is answered 403 instead, before the gateway reads, buffers or parses any of its body.
  • So the size limit and the IP allowlist answer in this order: a declared size over the limit is 413 on the headers, before the allowlist (over 11 MB by the ingress, which knows no allowlist); a body that reaches the gateway without a declared size from outside the allowlist is 403. A proxy in front of the gateway that collects the whole body first and then forwards it with its size declared turns the second case into the first. Either answer refuses the request.

Inference API host (/v1, /copilot/v1, /direct/v1, /docs/v1/…)

The inference lanes answer in the inference error format, as JSON for every Accept:

{"error": {"message": "Request body too large for this endpoint.", "code": "payload_too_large", "max_body": 10485760}}

On an Anthropic-native route (/v1/{tenant}/{gateway}/{provider}/v1/messages and /v1/{tenant}/{gateway}/{provider}/v1/messages/count_tokens) the same refusal is written in the Anthropic error shape, so an Anthropic SDK parses it; error.code and max_body stay available:

{"type": "error", "error": {"type": "request_too_large", "code": "payload_too_large", "message": "Request body too large for this endpoint.", "max_body": 10485760}}

Every /v1 413 carries X-AIG-Error: payload_too_large and an X-Request-Id (the request's server-minted UUID — the same one the gateway logged for the request, when it had already started processing it; quote it to support), like every other gateway answer.

max_body is that endpoint's limit in bytes. The 413 carries the same CORS headers as the endpoint's normal answers (the configured app origin with credentials on /v1; the app origin without credentials on /direct/v1; * on /docs/v1/…; none on the server-to-server /copilot/v1), so a browser client can read it instead of seeing an opaque network error.

Route Limit (max_body)
/v1/… (inference; inline attachments travel base64-encoded in this body) 10 MB (10485760)
/copilot/v1/{action}, /direct/v1/{action} (document AI) 1 MB (1048576)
POST /docs/v1/chat, POST /docs/v1/feedback (public docs assistant) 64 KB (65536)

A body whose declared size is over 11 MB is refused one hop earlier, by the ingress in front of the inference host (or, for the web app's own same-origin /v1 calls, by the app host). That 413 has the same shape without max_body (the ingress does not know which endpoint the request was for) and without CORS headers — read max_body as optional. (A body larger still — over the content delivery network's own request limit in front of the public hosts — is refused by that network before it reaches the gateway; that answer is not part of this contract.) The ingress body:

{"error": {"message": "Request body too large.", "code": "payload_too_large"}}

The other routes of the inference host — inbound webhooks (/hooks/…), workflow forms (/forms/…, including file uploads), chat-bridge receivers and the public cancellation button — answer the same flat body as the admin API below ({"error": "payload_too_large"}, or the small HTML page for a browser form submission).

The web app's own host answers the same flat body for a body over its limits: the public cancellation button (POST /public/billing/cancel, 16 KB — see Billing) and every other route of the app host except its same-origin /v1/… (which answers the ingress body above). Where the app host is served through the ingress, this body is JSON for every Accept.

Distinct from request_too_large (a gateway-side size gate) and context_overflow (the tokens exceed the model's context window): payload_too_large is about the bytes of the request body.

Another tenant's gateway id answers 404 not found

On /admin/v1/gateways/{id} and every route below it, a gateway id that belongs to another tenant is answered exactly like an id that does not exist: 404 { "error": "not found" }, byte-identical (there is no 403 that would confirm the id exists). A missing permission inside your own tenant remains 403 forbidden. Platform admins are not affected. Both cases (an unknown id and another tenant's id) are recorded alike in the security log as access.denied (status 404, no entity; the requested id is visible in the logged request path when it came from the URL; stored decoded, see audit path), so the two requests also do the same work and cannot be told apart by response time; probing ids is therefore visible to your administrators. A well-formed gateway id in the path is 1 to 36 bytes of valid UTF-8 with no control or invisible formatting character and no literal % (the refused set: control characters (C0 incl. tab/newline/CR, DEL, C1 U+0080–U+009F), the line/paragraph separators U+2028/U+2029, the interlinear annotation controls U+FFF9–U+FFFB, the braille blank U+2800, and every Unicode default-ignorable code point (zero-width and bidi controls, soft hyphen, byte-order mark, word joiner / invisible operators, Hangul fillers, Unicode tag characters …) except a variation selector (U+180B–U+180D, U+180F, U+FE00–U+FE0F, U+E0100–U+E01EF) that directly follows a base character of its own kind (a symbol or emoji, a CJK ideograph, a Mongolian letter), at most one per base; any other variation selector is refused, so emoji (❤️), CJK variants and Mongolian text stay accepted; see refused characters); anything else (longer, invalid UTF-8, a control character such as a newline) can never name a gateway, gets the same 404 { "error": "not found" } and is audited the same way. The same holds for a user id: on /admin/v1/users/{id}…, on impersonation start (POST /admin/auth/impersonation/start) (where a user_id that is not 1 to 36 printable non-space ASCII bytes answers 400 invalid_user_id instead, see Admin impersonation) and on the device-families ?user_id= query (where a repeated, bare or empty ?user_id answers 400 invalid_user_id instead), another tenant's user answers 404 { "error": "not found" } exactly like an unknown id. /admin/v1/users/{id}… and the device-families ?user_id= are audited as access.denied (status 404, no entity); impersonation start is audited as impersonation.denied (status 404, the requested id as the entity). The audited path is the request path without the query string, so a ?user_id= value is not logged. A user of your own tenant whom you do not out-rank stays 403, and a storage fault stays 503. The gateway token mint (POST /admin/v1/gateways/{id}/tokens) follows the same rule for its body user_id only: an unknown id and another tenant's user answer the byte-identical audited 404 { "error": "not found" } (also when the user is hard-deleted mid-mint), while a platform administrator naming a user outside the gateway's workspace gets 403 gateway_outside_owner_tenant; a malformed user_id stays 400. Other body ids on that route (for example agent_id) are not covered. The device routes are covered too: an unknown user_code and a user_code whose gateway you cannot reach (GET /admin/v1/device/pending, POST /admin/v1/device/approve, POST /admin/v1/device/deny; a missing or mistyped code on the preview included) answer the same 404 { "error": "not found" }, as does DELETE /admin/v1/device/families/{id} for an unknown family, a family you cannot reach, a missing USERS_MANAGE permission or an owner you do not out-rank (an exception to the 403 above, so the route is no family-existence oracle). Each is recorded as one access.denied event (status 404, no entity); a request that loses a status race afterwards is a plain 404 not recorded as access.denied.

Another tenant's tenant id answers 404 not found

On /admin/v1/tenants/{id} and every route below it, a tenant id that is not your own tenant is answered exactly like an id that does not exist: 404 { "error": "not found" }, byte-identical (no 403 that would confirm the tenant exists). The decision is made before any tenant data is read, so the two requests also do the same work and cannot be told apart by response time. Each such request is recorded as one access.denied security event (status 404, no entity; the requested id is visible in the logged request path, stored decoded; see audit path). Platform admins reach every tenant and are not affected (an unknown id is still 404 for them). A missing permission inside your own tenant, and platform-only routes, remain 403 forbidden: that refusal does not depend on the id. A storage fault stays 503.

Another tenant's log, content-report, compliance snapshot, connector, source and trace ids answer 404 not found

A request-log id (GET /admin/v1/logs/{id}, GET /admin/v1/request-logs/{id}/legs), a content-report id (PATCH /admin/v1/reports/{id}), a compliance snapshot id (GET /admin/v1/compliance/reports/{id}), a connector_id in a connector-sync create, a connector-sync source id (run, schedule, share, DELETE), a chat-bridge connection id (GET, PATCH, DELETE of /admin/v1/chat-bridge/connections/{id}) and a trace id (GET /admin/v1/traces/{id}, /admin/v1/playground/trace/{id}) that belongs to another tenant is answered exactly like an id that does not exist: 404 { "error": "not found" }, same body and content type, no 403 that would confirm the row exists. Each such answer is recorded as one access.denied security event (status 404, no entity). A row without a tenant is treated as not yours. A database fault stays 503, and a missing permission inside your own tenant stays 403. Platform admins reach every tenant's logs, reports and traces as before (a platform admin's miss on a snapshot id in the targeted tenant is the same audited 404); a connector can still only be bound into a project of its own tenant. For traces, every not-visible case (an unknown id, a trace whose gateway no longer exists, a gateway of a soft-deleted tenant, another tenant's gateway) is decided by the same single storage read, with no additional gateway lookup, so all of them fall in the same timing class; status, body and audit row are identical. Timing is not claimed to be byte-for-byte identical. Group and role ids follow the same rule, see A group or role you cannot see (a malformed body is validated first and answers 400 for any id, with no audited row). A department id (/admin/v1/departments/{id}…) that is unknown, another tenant's or malformed is answered and audited the same way; a caller without a tenant gets 403 caller_has_no_tenant instead (audited like any other 403), and a storage fault answers 503 with no audited row.

A group or role you cannot see answers 404 not found

A group id (/admin/v1/groups/{id}…, a group_id on GET /admin/v1/stats/analytics and GET /admin/v1/stats/usage-series, a group_id on POST /admin/v1/users/bulk with group_add / group_remove) or a role id (/admin/v1/roles/{id}…, PUT / DELETE /admin/v1/users/{user_id}/roles/{role_id}) that is unknown, belongs to another tenant, is only a spelling variant of a real group id (other letter case, trailing space, invisible or full-width character: group ids are matched byte-exact), is malformed, or names a system role (on PATCH /admin/v1/roles/{id}, PUT /admin/v1/roles/{id}/permissions and DELETE /admin/v1/roles/{id}; on assign / unassign a system role stays 400) is answered exactly like any other such id: 404 { "error": "not found" }, same body and content type, no 403 that would confirm the row exists. Each answer is recorded as one access.denied security event (status 404, no entity). The row stores the route path; an id sent in a query string or body is not stored. A database fault while looking the group or role up stays 503 and is not recorded, and a missing permission stays 403. On PATCH /admin/v1/roles/{id} and PUT /admin/v1/roles/{id}/permissions the body is validated first: a malformed body answers 400 (and on PUT a permission you do not hold answers 403) for any id, known or not, and records no audited 404 row, so it reveals nothing about the id. The one exception to the plain body is the agent sharing route (PUT /admin/v1/gateways/{gw}/agents/{id}/sharing): a group_ids or user_ids entry that is unknown, belongs to another tenant, is only a spelling variant of a stored id (letter case, trailing space, invisible or full-width character) or (for user_ids) is a deleted user keeps its coded body, 404 { "error": "group not found", "code": "group_not_found" } / 404 { "error": "user not found", "code": "user_not_found" }, and is recorded as one access.denied event like the rest (no entity, route path only, the body ids are not stored); a malformed entry stays 400 and a storage fault 503, both unrecorded. The same coded 404 user_not_found is answered, and recorded the same way (no entity, route path only), for the user_id of POST /admin/v1/projects/{id}/members when it is unknown, another tenant's or a deleted user. The user_id of POST /admin/v1/groups/{id}/members that is unknown, another tenant's or a deleted user is answered with the plain 404 { "error": "not found" } and recorded the same way, for every caller including platform admins (no entity, route path only; a malformed user_id stays 400 and a storage fault 503, neither recorded). Races on an object you could already see (a role deleted between the lookup and the delete, an assignment that does not exist) stay a plain, unrecorded 404.

A project you cannot see answers 404 not found

On /admin/v1/projects/{id} itself and the routes behind the project access check (members, knowledge, metadata, conversations, feed), plus the connector-sync routes keyed on a caller-supplied project_id (POST and GET /admin/v1/connector-sync), the knowledge areas (project_ids) named in an agent create or PATCH (POST /admin/v1/gateways/{id}/agents, PATCH /admin/v1/gateways/{id}/agents/{agent_id}; the 404 is decided by what the caller can see, so a tenant admin cannot probe another tenant's project ids even on an agent owned by someone else; an area the caller can see but the agent's owner cannot access stays 400 project not found and is not recorded as access.denied; restoring an agent keeps its 400 project not found; the /v1 run-as-self draft preview POST /v1/{tenant}/{gateway}/agents/preview answers a project_ids entry the caller cannot see with 404 project_not_found instead, one byte-identical body for every such id, not recorded as access.denied), and DELETE /admin/v1/conversations/{id}/share-project (a conversation the caller cannot see), a project the caller cannot see is answered exactly like an id that does not exist: 404 { "error": "not found" }, byte-identical. "Cannot see" covers another tenant's project and a same-tenant project that is not shared with the caller (no membership, group grant, organisation share or department access). A project member row never grants visibility across tenants: a user who now belongs to a different tenant than the project (for example after a move between tenants, or a legacy cross-tenant add) is treated as a non-member, exactly like the group, organisation and department paths, and a deleted user's member row grants nothing. Only a platform admin is exempt, by design: the exemption is decided by the role stored for the user, never by the role carried in the session, and only while the account is active: a deleted or disabled account has no project access at all, platform admins included, wherever the server re-checks access for a stored user (for example a sync source's creator or a replayed approval); re-enabling the account restores it. The project owner still sees such stale rows in the member list and can remove them, and they do not count toward the last-owner guard. No data migration is needed; the rows are simply ignored. Any id that names no project the caller can see, including a malformed one, answers the same audited 404. Each such request is recorded as one access.denied security event (status 404, no entity; the requested id is visible in the logged request path, stored decoded; see audit path), so probing project ids is visible to your administrators. For DELETE /admin/v1/conversations/{id}/share-project the answer (status, body, headers, audit row) is identical for every such request, but the server work is not claimed identical (a conversation of someone else's that exists, is on the feed and sits in a project needs one extra project-access lookup). Timing is not claimed to be byte-for-byte identical. A project member whose role is below what the route needs (for example a viewer on an editor route) still gets 403 forbidden. Platform admins see every project; only an id that names no project answers this audited 404. A tenant_admin (and any other administrative role that is not a platform admin) sees only the projects of its own tenant, on every route above and on the group-grant and organisation-share routes: another tenant's project answers the same audited 404, byte-identical to an unknown id, and an administrative caller whose own tenant cannot be determined is answered with a sanitised 500 (never a pass-through, never a misleading 404). On the /v1 surface no role reads across tenants: an administrator addressing a project of another tenant (via x-project-id, a conversation, or an agent area) is treated exactly like any other caller: the project is not found and nothing of it is attached (the agent draft preview POST /v1/{tenant}/{gateway}/agents/preview refuses such an area with 400 project is not in the gateway's tenant for a platform admin, and with 404 project_not_found for every other caller). A storage fault stays 503. The project governance routes (GET/PUT /admin/v1/projects/{id}/governance), the organisation-share routes (POST/DELETE /admin/v1/projects/{id}/org-share) and the group-grant routes (POST /admin/v1/groups/{id}/grants with the project in resource_id, DELETE /admin/v1/groups/{id}/grants/project/{resource_id}) answer the same audited 404 for a project the caller cannot see, including a malformed id. The memories routes (GET/POST /admin/v1/memories, POST /admin/v1/memories/reorder, POST /admin/v1/memories/feedback) answer the same audited 404 for a project_id the caller cannot see, platform admins included when the id names no project; a visible project the caller is not a direct member of stays 403, and a non-string project_id is 400. The project_id in the body of POST /admin/v1/conversations and PATCH /admin/v1/conversations/{id} answers the same audited 404 for a project the caller cannot see (the conversation is not created or moved); a project the caller can see but may not bind to stays 403 (project_tenant_mismatch for a platform admin, or not a member of destination project for a group grant, organisation share or department access without direct membership; on PATCH /admin/v1/conversations/{id} that 403 also carries code: "not_project_member"). Project ids the server derives itself, never taken from the caller, are not existence oracles and keep their own answer: continuing a conversation from a share link, the release gate on PATCH /admin/v1/conversations/{id}, 403 not a project member on POST /admin/v1/conversations/{id}/share-project (the caller's own conversation) and 403 project not accessible when forking a conversation whose own project is gone. A project you can see but may not use stays 403 (an editor or viewer sharing it, a governance caller below owner, org_share_disabled). Two cases keep a plain 404 that is not recorded as access.denied, because the caller can see the project: a caller who can see the project (a platform admin) naming a project outside the group's tenant on a grant, and an organisation share (POST) of a project whose tenant no longer exists (a caller who can see the project, e.g. a platform admin).

Admin API (/admin/…)

Typed codes on the admin gates

The authentication, permission and demo gates of the admin API, the dispatcher's own 404 / 500 and the shared request helpers answer with a sibling top-level code next to the unchanged error sentence and status. Key off code, not the prose.

code Status error Meaning
unauthenticated 401 unauthenticated An admin gate found no signed-in user. (The session check in front of the router answers its own 401 unauthenticated without a code.)
permission_required 403 forbidden The caller lacks the permission the route requires.
platform_admin_only 403 forbidden The route is for platform administrators.
tenant_admin_only 403 forbidden The route is for administrators of the workspace.
target_outranks_caller 403 forbidden The user the write acts on out-ranks the caller.
no_tenant 403 no tenant The caller is an identity that belongs to no tenant. Sent by the connector catalog (GET /admin/v1/mcp and GET /admin/v1/mcp/mine, body { "error": "no tenant", "code": "no_tenant" }) and by other tenant-scoped admin routes (MCP, conversations, billing catalog). The billing catalog spells the error value no_tenant (see the billing section). Permanent until the account is assigned to a tenant. In the chat app, GET /admin/v1/mcp gives an empty connector catalog and GET /admin/v1/mcp/mine gives a no-tenant notice on the connectors page. Neither is reported as a client error; other failures on these two routes follow normal handling.
caller_has_no_tenant 403 forbidden A tenant-scoped route was called by an identity that belongs to no tenant. On the chat-bridge connection routes this includes a platform administrator without a tenant (those routes take no tenant_id). Also answered on every /admin/v1/groups/{id}… and /admin/v1/departments/{id}… route for a non-platform caller without a tenant. Also answered by POST /admin/v1/conversations (fresh and ghost create) and by a PATCH /admin/v1/conversations/{id} that changes routing hints, for a caller without a tenant, platform administrators included. Permanent: retrying does not help until the account is assigned to a tenant. A storage fault while reading the tenant's routing context is a different answer (tenant_ctx_unavailable: 503 with Retry-After on a transient database fault, otherwise 500).
project_role_insufficient 403 forbidden The caller does not hold the required role on the project.
demo_read_only 403 forbidden The demo identity cannot write.
bad_param 400 tenant_id must be a single value / tenant_id must be a tenant id A repeated, non-string, or non-UUID string tenant_id on a tenant-scoped read. The routes that name a target tenant (the department, bulk-user, group-create and user-move routes, the support-access request and its list filter, and the platform-admin POST /admin/v1/projects) answer invalid_tenant_id instead.
tenant_id_required 400 tenant_id required / tenant_id is required A platform administrator omitted (or sent as "") the tenant_id a tenant-scoped route needs (on POST /admin/v1/projects: omitted and has no own tenant; on the support-access request: always required). Not used by the chat-bridge connection routes, which take no tenant_id.
unsupported_content_type 400 content type must be application/json A body-taking route got a Content-Type other than application/json.
file_not_found 404 file not found The stored file of a knowledge or in-place save does not exist.
extracted_text_required 400 extracted_text is required An in-place save without the text.
invalid_content_type / invalid_extracted_text 400 (the validation message) The in-place save's content failed validation.
route_not_found 404 not found No /admin/v1 route (or, on the partner API, no /partner/* or /partner/auth/* route) matches the method and path. Also returned by a route that is off or not available in this environment (billing plan change with the flag off; the dev-only maintenance sweeps outside dev/int).
admin_handler_failed 500 internal error A handler failed unexpectedly; the body also carries request_id.

The web app treats demo_read_only as an expected refusal (the demo notice, no error report); the other 403 codes are reported like any permission refusal.

Typed codes on gateway and tenant refusals. The gateway and tenant admin routes (/admin/v1/gateways…, /admin/v1/tenants…, the gateway rules and the token PATCH) answer a 4xx with a sibling top-level code next to the unchanged error sentence and status. A refusal about one request field also carries field (the offending key): invalid_field (a missing or wrongly typed value, e.g. a non-string slug), invalid_config (a gateway config value that fails validation), unknown_field (a key the route does not accept; field is the key, capped in length), no_fields (a PATCH with nothing to change) and token_not_found. On the generic invalid_field an absent and a malformed value share the code; the field-specific config codes (invalid_webhooks, invalid_tracing, invalid_tracing_headers, invalid_web_search, invalid_siem) answer only a present value (absent or null is no opinion or clears the block). On the SIEM test a present siem of the wrong type (null, a scalar, an array) answers invalid_siem; an empty siem: {} answers siem_required for every caller; an absent siem answers siem_required for a caller who may not test the stored configuration, and for an editor tests the stored configuration (409 siem_not_configured when nothing is stored, 409 invalid_stored_siem_config when the stored configuration is unreadable or fails validation; a stored syslog host that cannot be verified right now answers 503 siem_target_unverifiable). Key off code, not the error prose. The web app treats trial_gateway_locked and trial_gateway_budget_over_balance as expected refusals (an upgrade hint, no error report); an uncoded 403 is still reported.

Typed codes on workflow, approval and agent refusals. The workflow routes, the approval inbox (/admin/v1/me/approvals…) and the agent routes answer a JSON error with a sibling top-level code next to the unchanged error sentence and status; a refusal about one field also carries field. A missing, null or empty ("") value is field_required (except the codes listed on the route page, for example the agent starters and plan proposal, which use <field>_required and invalid_<field>; routes that keep the stored value for an absent field, such as the email trigger, say so on their page), a present but wrong one is invalid_field. See Workflows and Agents.

The 413 body matches what the client asked for (the Accept header):

  • An API / XHR client (Accept: application/json, */*, or no Accept) receives JSON:

    {"error": "payload_too_large"}
    
  • A real browser navigation (Accept: text/html — e.g. the SAML identity provider's form POST) receives a small static HTML "Request too large" page instead of raw JSON.

The same body answers whichever hop refuses the request: the admin API host itself, the ingress in front of it (over its ~140 MB outer limit), and the web app's same-origin /admin/… proxy (over ~140 MB). The public ingress and the web app's proxy answer the JSON body for every Accept — also to a browser form submission, which only reaches that answer with a body over ~140 MB — and without CORS headers: the web app's own /admin/… calls are same-origin and need none, but a cross-origin caller of the admin API host sees the ingress 413 as a network error (read the body only where the browser lets you; pre-check sizes against the limits below). On every route of the admin API host that has no limit of its own (for example the read-only share and referral links), a body over the host's ~140 MB limit gets this same answer.

The exact byte figure is not repeated in the admin 413 body; the browser SPA reads the per-surface limits from GET /admin/auth/me (the limits object) and pre-checks a file's size before sending, so the user sees a clear "too large" message rather than a failed request.

Per-route limits (the values that matter; everything else rides the general admin cap):

Route Limit Notes
POST /admin/v1/chat/files (file upload) ~140 MB base64 of a 110 MB file
POST /admin/v1/conversations/{id}/attachments ~140 MB base64 of a 110 MB file
POST /admin/v1/projects/{id}/knowledge/upload ~140 MB base64 of a 100 MiB document
POST /admin/v1/app-feedback ~88 MB up to 6 evidence images inline
all other /admin/v1/... (general cap) 16 MB chat export, transcription, messages, config, …
POST /admin/v1/client-errors (anonymous) 64 KB crash reports; truncated further server-side
/admin/auth/... except SAML (login, one-time codes, OIDC callbacks) 16 KB small JSON only
POST /admin/auth/saml/{tenant}/acs (SAML ACS) 1 MB carries the SAMLResponse

Rejected vs accepted. A body up to the route's limit reaches the handler and is validated there (the handler may still reject it for content reasons — e.g. an unsupported file type is a 400, an image over the per-image cap is a handler 413). A body over the route's limit is the edge 413 payload_too_large above and never reaches the handler. The same holds on the inference host: a body under the limit can still be refused by the handler (context_overflow, request_too_large, the document-AI 256 KiB text cap), and those answers keep their own code and body.

The byte limit does not bound how many JSON values a body holds, and the cost of reading a body grows with that count. The admin body reader therefore also refuses, before parsing, a body with more than 262,144 structural elements (413 body_too_complex; 32,768 on the upload routes; 2,097,152 on the internal loopback APIs). Ordinary payloads, including base64 files, are far below it.


Typed codes on billing and voucher routes

The voucher routes (/admin/v1/vouchers…, /admin/v1/voucher-series…), the admin billing routes (/admin/v1/billing/…, the wallet routes included), the plan change and the sign-up checkout answer their refusals with a sibling top-level code. Status, error and every other body key are unchanged. Read code, never the prose.

  • Where error is already a machine string (no_subscription, checkout_unavailable, invalid_body, price_changed, …), code is the same string. The checkout and plan-change codes are listed in Checkout errors.
  • A 403 forbidden keeps "error": "forbidden" and gives the reason in code:
code Status Meaning
caller_has_no_tenant 403 The signed-in user has no workspace (billing and wallet routes). GET /billing/catalog answers the same condition as no_tenant; the two mean the same.
self_serve_plan_required 403 The workspace is billed by an account manager (manual or enterprise plan), or is gone.
billing_owner_only 403 The route is owner-only (portal, reactivation, the overview, forgetting the wallet card) and the caller is not the owner.
billing_purchaser_only 403 The route needs Buy plans and add budget (checkout, wallet top-up, plan change preview, commit and cancel) and the caller neither owns the workspace nor holds it.
billing_member_read_denied 403 A read of the wallet or the billing summary by a member whose role or plan may not see it.
trial_plan_required 403 POST /billing/checkout on a workspace that is neither on the trial plan nor a Custom workspace with a subscription record (Enterprise, Standard, …, or a Custom workspace that never subscribed). A Custom workspace whose subscription has not ended gets 409 subscription_active instead.
trial_plan_use_checkout 409 POST /billing/reactivate on a workspace on the trial plan that kept an ended subscription (a platform admin moved it to the trial, MAP-4702). It buys through the price calculator (POST /billing/checkout) instead.
partner_billed 403 The workspace is partner-billed and the route is a self-serve money route (portal, reactivation, checkout, plan change preview and commit, wallet top-up, enabling the auto top-up, sending a budget request; rejecting one stays allowed). See Partner-billed tenants.
permission_required 403 Defensive: an unknown audience in the server's gate. Not reachable over HTTP.
  • Other codes on these routes: route_not_found (404, a plan change whose rollout flag is off or whose workspace is not allowed; the row in the admin gates table), unauthenticated (401, no signed-in user on the catalog and plan-change routes), no_tenant (403, GET /billing/catalog only), dispute_flagged (also POST /billing/checkout), subscription_active (POST /billing/reactivate, and POST /billing/checkout for a Custom workspace whose stored subscription has not ended), portal_not_configured, portal_unavailable, no_owner_email, catalog_unavailable, rate_limited, and admin_handler_failed (a 500 that is not a storage fault: the plan change and the checkouts; the body keeps its prose error internal error and, unlike the generic handler failure above, carries no request_id). The sign-up checkout's restart_checkout, checkout_pending and checkout_unavailable carry code too.
  • Voucher routes: malformed_body (400, POST/PATCH /vouchers and POST /voucher-series with valid JSON that is not an object), not_found (404, an unknown series or voucher), admin_handler_failed (500, the series list or create failed; the body carries no request_id) and invalid_request (400, POST /voucher-series only: a defensive fallback when the validator refuses without a code of its own). The field codes of the voucher and voucher-series creation and edit follow the rule in Error code naming; the table is in Vouchers.
  • Stays without a code: the storage-fault 503 (the same body on every route), and the sanitised storage 500 (see storage faults above).

Resource-state codes

A code that ends in _empty, _missing or _not_empty can name the state of something the server holds (a record, a key, a binary) rather than a field of your request. It is not part of the field rule below and is never renamed to <field>_required. A client keys off it as published.

Code Where Meaning
agent_owner_missing agent admin The agent's owner no longer exists.
deliver_owner_missing workflow publish The workflow has no valid owner (created_by erased or malformed), so a deliver step that would send is refused; see workflows.
conversation_not_empty conversation delete The conversation has (or had) a message, so DELETE /admin/v1/conversations/{id}?if_empty=1 keeps it; see Deleting a conversation.
department_not_empty department delete The department still has a live member or owned project (409).
series_empty voucher series The series holds no voucher to act on.
files_api_key_missing file upload No provider key is configured for the Files API.
provider_key_missing provider calls No usable provider key is configured for the request.
convert_empty HTML conversion The converted file has no content (422).
converter_missing HTML conversion The converter is not installed on this server.
engine_missing Office editing The document engine is not available on this server.
fetch_empty workflow run A fetched source returned nothing.
output_missing agent / scheduler run A run finished without the output it was expected to store.
skipped_empty workflow run Every item of a step was skipped, so nothing remained.
parent_missing conversation turns The parent message of a turn does not exist.
turn_missing conversation turns The turn does not exist.
wallet_empty wallet alerts The wallet balance is zero.
consent_missing access layer No recorded consent for the action.
task_envelope_missing access layer The agent run carries no task envelope.
tenant_missing wallet / vouchers / billing hooks The workspace record does not exist.
product_missing wallet The billing product is not configured.
stripe_missing wallet No Stripe customer exists for the workspace.
tax_location_missing wallet auto top-up The customer has no tax location, so the charge cannot be made.
subprocessor_register_empty subprocessor register The register has no entry.
web_search_platform_key_missing web search The platform web-search key is not configured.
platform_key_missing platform model sync No Myra platform key is stored for the provider on the pool gateway; see models.
billing_subscription_items_missing billing heal The subscription lacks the expected items.
pii_twin_missing project governance The PII twin of a project does not exist.
erase_target_missing user erase The user to erase does not exist.
disable_target_missing user disable The user to disable does not exist.
enable_target_missing user enable The user to enable does not exist.
run_tenant_missing workflow run The run's workspace does not exist.
webhook_trigger_missing agent run trace The webhook trigger that fired the run is gone or is no longer this agent's. It is the step reason in GET /admin/v1/playground/trace/{id} and the Logs trace panel.
turn_persist_parent_missing conversation turns trace The parent user message of a speculative voice turn was never stored. It is the step name in GET /admin/v1/playground/trace/{id} and the Logs trace panel.
embed_empty knowledge ingest trace The document's text yields no indexable passage: readable, never semantically searchable. A terminal stage of the ingest trace; see Getting the ingest trace.
roadmap_reply_missing feedback reply worklist A feature request is past its roadmap reply SLA and no roadmap reply was sent or held. It is a worklist_reason of the admin feedback list; see Feedback.

Typed codes on feedback, memories, preferences and profile routes

The routes for app and session feedback, per-conversation feedback and summaries, memories, command preferences and shares, and the personal profile (/admin/v1/me/tokens, /me/erase) answer every 4xx with a sibling top-level code (the one exception is the audited 404 not found, which stays uncoded; a storage fault is a 5xx) next to the unchanged error sentence and status. Key off code, not the prose. A refusal about one request field of the personal-token mint also carries field.

The code names follow one rule per field:

The field is code
absent (key not sent) <field>_required
JSON null, or the wrong type invalid_<field>
a required string that is empty ("") or blank — nothing visible <field>_required (on an edit, where the field is present: invalid_<field>)
an array that must not be empty, sent as [] invalid_<field>
over a length or count bound <field>_too_long / too_many_<field>
a number outside its allowed range <field>_range (as max_redemptions_range)

Blank means nothing visible

For a required text field (project name, group name, role name, department name, agent name, MCP connector name, the account name on PATCH /admin/auth/me, tenant-prompt and personal chat-command name and template, feedback summary / description, client-error message, content-report reason, the roadmap reply note and the Contact Support message), "blank" is empty, or only whitespace, Unicode space characters, zero-width / format (default-ignorable) characters, control characters or the braille blank (U+2800), and a few extender / format marks that the database's text comparison ignores (for example the Arabic tatweel U+0640). Combining marks alone are not in this set. Such a value gets the same answer as "". For most of these fields the length bound is checked first: an over-long invisible-only value is <field>_too_long, and a visible value is stored exactly as sent (nothing is trimmed). Some fields differ. The feedback summary / description, the client-error message and the Contact Support message have invalid UTF-8 replaced with U+FFFD and are cut to their byte cap before the blank check, so an invisible-only value of any length answers summary_required / description_required / message_required / contact_message_too_short (they have no _too_long code), and a visible value is stored (Contact Support: sent) scrubbed and cut. The roadmap reply note is scrubbed and trimmed of whitespace, and keeps note_too_long (more than 8000 bytes as sent, or more than 2000 after scrubbing and trimming; the length is checked before the blank check). The content-report reason is a closed set: an invisible-only value answers reason_required and invalid UTF-8 answers invalid_reason. The account name is also different: it is trimmed of ASCII whitespace before it is checked and stored, so an account name made only of ASCII whitespace answers name_required at any length. The agent name answers per verb: an empty or invisible-only value is invalid_request with name is required on create and with name must be a non-empty string (max 255 bytes) on update, invalid UTF-8 is invalid_name, and an over-255-byte value is invalid_request with the update message, checked first (see Agents). The department name is trimmed of ASCII whitespace before it is checked and stored, its length is checked first, and it answers name_required on rename as well as on create (an exception to the invalid_<field> edit rule in the table above, as for roles). A role name that contains an ASCII control character (for example a tab or a newline) answers invalid_name instead, because the role name check rejects control characters before it checks for blank (see Roles). The Contact Support minimum of 15 characters counts visible code points only, so spaces and invisible characters do not count towards it. The web app applies the same rule before it sends: a value with nothing visible keeps the save or send button off, or shows the field's required message, but the server stays the authority and answers the same way if a client skips the check.

A small set of codes predates this rule and keeps its published spelling, because a rename would break integrations: gateway_id_invalid, number_invalid, response_number_invalid, tool_input_number_invalid, model_pin_invalid, byok_alias_invalid and provider_key_invalid. The auto top-up state reason amount_out_of_range (auto_topup.last_error) also keeps its spelling, because it is stored on the wallet and in the audit log. Two access-decision reasons keep their spelling for the same reason, because decision records, SIEM streams and CSV exports already carry them: actor_invalid and agent_token_invalid; so does the error text derive_invalid of the chat-bridge bot_verification_failed refusal. Some admin routes also still answer an older <field>_invalid or <field>_out_of_range spelling while they move to invalid_<field>; a client should accept both during that change. The count form follows the same rule: too_many_<field> (the department too_many_allowed_gateway_ids and too_many_pool_exempt_member_ids were allowed_gateway_ids_too_many and pool_exempt_member_ids_too_many); a client should accept both spellings during that change. The codes of the Resource-state codes table above name server state, not a request field.

An optional field never answers <field>_required. Where the sentence is the same for an absent and a malformed value (for example content is required), the code still tells them apart. Free-text fields that are blank-checked on the stored value (feedback message, summary, description) treat an absent key, "" and an invisible-only value alike and answer <field>_required; JSON null, or a value of any other JSON type (number, boolean, object, array), answers invalid_message / invalid_summary / invalid_description. Command preferences (POST/PATCH /admin/v1/chat/commands): name and template are required on create (absent, "" or blank answers name_required / template_required) and optional on edit (absent or null leaves the field unchanged; "" or blank answers invalid_name / invalid_template); description is optional and never answers _required. A value that is null (on create), not a string or not valid UTF-8 answers invalid_name / invalid_template / invalid_description; an over-long one answers name_too_long / template_too_long / description_too_long. The project name (POST/PATCH /admin/v1/projects) is required on create: absent, "" or blank answers name_required; null, a non-string or invalid UTF-8 answers invalid_name; more than 255 characters answers name_too_long. On PATCH, an absent name leaves it unchanged, while "", a blank value or null answers invalid_name. The optional app-feedback and content-report fields of the wrong JSON type answer invalid_<field> (invalid_url, invalid_description, invalid_conversation_id, invalid_message_id, invalid_message_text, invalid_notes, invalid_request_log_id), with the sentence <field> must be a string. A client_context that is not a JSON object (a string, number, boolean or array, [] included) answers invalid_client_context. The report status edit (PATCH /admin/v1/reports/<ID>): absent or "" answers status_required; null, a non-string or an unknown value answers invalid_status. The content-report reason is a closed set: absent, "" or blank answers reason_required; null, a non-string or an unknown value answers invalid_reason. The app-feedback edit summary is required there, with the same split as on create: absent, "" or blank answers summary_required; null or a non-string answers invalid_summary. A field that already has an API-wide code keeps it: gateway_id answers gateway_id_required (absent or null) or gateway_id_invalid (anything else, so "" is gateway_id_invalid) as in the global rows, and a malformed model answers the API-wide invalid_model_id.

code Status Meaning
unauthenticated 401 No signed-in user on the route.
demo_read_only 403 The demo identity cannot write.
not_found 404 The record does not exist or is not the caller's. The answer is byte-identical for both cases within one route. The session-feedback and summary routes (/chat/feedback, /chat/summaries, /chat/summarize) answer not_found too, not conversation_not_found.
invalid_body 400 DELETE /me/erase was sent a body that is JSON null, an array or a scalar.
invalid_request 400 DELETE /me/erase was sent a JSON object with a key other than step_up_token (only step_up_token is accepted, and only while the sign-in rollout is on). Also a defensive fallback when a validator refuses without a more specific code.
invalid_field 400 Personal-token mint: a missing or wrongly typed label or scopes, or an invalid rate_limit, budget_usd or expires_at; field names the key.
account_not_erasable 403 DELETE /me/erase on an account that cannot be erased (a protected seed or review account; the shared demo identity answers demo_read_only).
token_not_accessible 403 The personal token does not belong to the caller (including one already revoked).
token_not_found 404 The personal token was revoked concurrently.
command_not_found / command_not_accessible 404 / 403 The command is not the caller's, or a share names a command the caller cannot share.
invalid_version / version_not_found 400 / 404 A command / tenant-prompt version path value that is not a canonical version number (digits only, no leading zero, sign, whitespace, exponent, hex or fraction), or names no version.
invalid_user_ids / invalid_group_ids / too_many_user_ids / too_many_group_ids / user_ids_required 400 A user/group id list that is not an array of ids, or is over its route's bound (too_many_user_ids / too_many_group_ids names the list; bound and id shape on the route page, for example the command-share route); user_ids_required: the user list is absent.
credential_requires_user_scope 400 A per-user credential was sent for a connector that is not per-user; see MCP connectors.
content_required / invalid_content / content_too_long 400 Memory text absent or empty / null or wrong type / over the cap.
invalid_ids / ids_required / too_many_ids 400 Memory reorder ids: not a non-empty array of id strings / absent / over the cap.
invalid_project_id / project_member_required 400 / 403 A malformed project id / a visible project the caller is not a member of.
items_required / invalid_items / invalid_item / too_many_items 400 Memory-suggestion feedback batch shape.
decision_required / invalid_decision 400 Absent or empty "" (decision_required) / null, whitespace-only, unknown or non-string (invalid_decision) decision in a feedback item or the roadmap reply.
invalid_body 400 The roadmap reply body is not a JSON object.
proposed_content_required / invalid_proposed_content / proposed_content_too_long 400 The suggestion text of a feedback item.
final_content_required / invalid_final_content / final_content_too_long 400 The edited text of an edited feedback item.
name_required / invalid_name / name_too_long, template_required / invalid_template / template_too_long, invalid_description / description_too_long 400 Chat command name, template and description (see Conversations).
invalid_url / invalid_description / invalid_conversation_id / invalid_message_id / invalid_message_text / invalid_notes / invalid_request_log_id / invalid_client_context 400 An optional app-feedback or content-report field, or the client_context, of the wrong JSON type (the sentence is <field> must be a string; client_context must be a JSON object).
invalid_category / category_too_long 400 A command-preference category (/chat/commands) that is not a string or is over the cap.
invalid_rating / invalid_model_id / model_required / gateway_id_required / gateway_id_invalid 400 Session-feedback and summary request fields. model: absent or "" is model_required, anything else malformed is invalid_model_id. gateway_id follows the API-wide rows.
invalid_comment / comment_too_long / invalid_title / title_too_long / invalid_system_prompt / system_prompt_too_long / invalid_max_tokens / invalid_archived_at / invalid_processed / invalid_project_id / invalid_content / invalid_role / invalid_curator_task / invalid_parent_message_id / invalid_request_id / invalid_window_days 400 Chat-endpoint body and query fields (conversation create/patch, message append, session feedback, app-feedback triage filters). <field>_too_long is an oversize value; invalid_<field> a wrong type or shape. The request writes nothing.
messages_required / invalid_messages / invalid_supersedes_ids / summary_text_required / invalid_summary_text / summary_text_too_long / first_message_id_required / invalid_first_message_id / first_message_id_too_long / last_message_id_required / invalid_last_message_id / last_message_id_too_long 400 Summary request lists and text. Absent (or "") answers *_required, a wrong type or null answers invalid_*, an over-long value answers *_too_long; messages answers messages_required only when absent. first_message_id is checked before last_message_id. supersedes_ids is optional and only answers invalid_supersedes_ids.
conflict_supersedes_stale 409 The summaries a new one would supersede changed meanwhile.
message_required / summary_required / reason_required / project_required / status_required 400 App-feedback and CS-automation fields that are absent or blank (status_required: the report status edit, absent or ""). message and summary (create and edit) of null or any other non-string type answer invalid_message / invalid_summary; invalid_status is a null, non-string or unknown report status. reason_required here is the content report's absent, "" or blank reason (the same code is also used for a missing X-Read-Reason header; see the reason_required row near the top of this page).
invalid_status / invalid_reason / invalid_summary / invalid_project / invalid_token 400 A value outside the accepted set or of the wrong type (the app-feedback summary; the content-report reason; the limit-request decline reason; the YouTrack settings token; the device-token routes answer it in the global row above).
invalid_base_url / base_url_required 400 The YouTrack integration base_url. A body that is not a JSON object has no base_url, so it answers base_url_required.
body_required 400 The least-privilege digest preference (PUT /admin/v1/me/least-privilege-digest) sent with no request body; see Account.
conflicting_operations / nothing_to_update 400 An update that combines exclusive operations or changes nothing.
image_bad_encoding / image_not_an_image 400 The evidence-image upload refusals.
image_unsupported 422 Only POST /admin/v1/app-feedback/image/normalize: the bytes could not be decoded. On the feedback submit route an undecodable image answers 400 image_not_an_image.
too_many_images / image_server_busy 413 / 503 More evidence images than allowed (the error text stays image_too_many) / the image decoder is busy (retry).
invalid_type / invalid_source 400 A memory type or source, or a feedback type, outside the accepted set.
server_key_unavailable 500 The server cannot store the YouTrack token right now.
summary_parse_failed / empty_summary 502 The model's summary answer could not be parsed / was empty. empty_summary is the same code on the streaming terminal frame.
invalid_gateway_config 500 (formerly gateway_config_invalid) Provider resolution for the gateway returned no provider or model for the summary call. An undecodable stored configuration is not this code: it answers the sanitised 500 without a code, or the retryable 503 when the read itself failed.
provider_key_unavailable 422 No API key is configured for the gateway's provider, so the summary cannot be requested.
provider_unsupported 422 The gateway's provider does not support direct (or streaming) summarization calls.
upstream_error 502 The provider call for the summary failed; the provider's own detail is never echoed.
permission_required 403 A command preference shared with a user group the caller may not add (POST/PATCH /admin/v1/chat/commands). The same code answers the permission gates described in the global table above.
invalid_client_context / invalid_schema_version / client_context_too_large 400 A client_context on a feedback submission, a content report (POST /admin/v1/reports) or a client-error report (POST /admin/v1/client-errors) that is not an object (a JSON array, including [], is refused) or cannot be encoded / has an unsupported schema_version / is over the size cap.
note_required / invalid_note / note_too_long 400 The roadmap reply note and the person reply note: absent / not a string / over 2000 bytes. invalid_note is also the limit-request and budget-request note that is not a string or is not valid UTF-8 (over the limit: note_too_long). Blank or invisible-only: note_required; a control character other than newline / CR / tab, or a bidi override / embedding / isolate (U+202A to U+202E, U+2066 to U+2069): invalid_note (the marks U+200E / U+200F / U+061C are allowed).
invalid_target_kind / invalid_target_id / invalid_duration / invalid_budget_request_id 400 A limit-request target_kind (not department_pool or user_cap), target_id (not a UUID), duration (not period or permanent), or a top-up budget_request_id that is not a UUID string (absent or null = an ordinary top-up; "" or any non-UUID value answers invalid_budget_request_id). For the limit-request fields, absent or "" answers the matching target_kind_required / target_id_required / duration_required.
amount_range 400 A top-up, auto top-up or budget-request amount outside the live offer's min_minor … max_minor; the body carries both bounds and currency. Earlier amount_out_of_range; accept both.
invalid_amount / amount_required 400 A limit-request create amount_minor or a top-up amount: absent, null or "" is amount_required, a present but unusable value is invalid_amount (the limit-request answers carry max_minor). Approve's approved_amount_minor is optional: absent or null approves the full amount; "" or any value that is not a positive whole number is 400 invalid_amount (no max_minor); above the asked amount is 400 approved_exceeds_request.
invalid_target / target_range / target_not_allowed 400 The roadmap reply target: not a YYYY-MM string or null / outside the allowed month range / given with not_planned. Earlier target_out_of_range; accept both.
max_per_day_required / invalid_max_per_day / max_per_day_range 400 A sign-up exception max_per_day: absent / not a whole number (null, a string, a boolean, an object, an array, a fraction, NaN) / a whole number below 1 or above 500. Earlier all three answered limit_out_of_range; accept all four.
image_empty / image_type_malformed_declared / image_bad_dimensions 400 Evidence image: empty payload / malformed declared type / unreadable dimensions.
image_too_large / image_too_many_pixels 413 Evidence image over the 10 MiB size cap / the 25-megapixel cap.
not_eligible / not_held 409 The roadmap reply or held automatic reply is not in a state that allows the action.
not_awaiting_person / personal_data_withheld / changed 409 The person reply to a feedback report: the report no longer waits on a person (not_awaiting_person), its author's personal data is withheld (personal_data_withheld), or the report changed (re-attributed, erased or answered) while the reply was being written (changed; nothing is written or sent).
last_admin_blocked 409 DELETE /users/{id}/erase or /me/erase on the sole administrator while other members remain.
erase_target_missing 400 Defensive code, not reachable over HTTP: an unknown user id on DELETE /users/{id}/erase answers 404 before the erasure starts, and /me/erase always has the caller's own account.

Two answers stay without a code on purpose: the audited 404 not found that hides whether a record exists in another tenant, and the 503 for a storage fault (the same body on every route; retry the request). Summary and gateway-configuration refusals keep the codes documented for the summary routes.

Typed codes on the org admin routes

The routes documented on the pages linked below (users-tokens.md, roles.md, departments.md, groups.md) answer every 4xx with a sibling top-level code, except as noted below. The HTTP status and the error text are unchanged; branch on code, not on the sentence.

The code names follow one rule per field:

The field is code
absent (key not sent), or an empty string on a required field <field>_required
JSON null, or the wrong type invalid_<field>
over a length or count bound <field>_too_long / too_many_<field>
a state outcome (a conflict, a protected account, a refused delegation) a name for the outcome

Which input on which route answers which code is stated on the route pages: Users and tokens, Roles, Departments, Groups and Account. Where a route page and the naming rule above differ, the route page is right.

code Status Meaning
unauthenticated 401 There is no signed-in user.
caller_has_no_tenant 403 / 400 The caller belongs to no tenant.
invalid_body 400 The request body is present but not a JSON object (on PUT /admin/v1/partners/{id}/static-otp this includes null, which never clears the code), or, on a route whose page says it requires a body, the body is absent. Nothing is written.
invalid_permissions / too_many_permissions 400 Role permissions that are not an array of strings, name an unknown key (key names it), or exceed the cap.
permissions_required 400 The permissions list is missing. Send "permissions": [] to clear a role on purpose.
permission_not_grantable 400 A permission that may not sit on a tenant role (key names it): a platform-level permission, or SSO_MANAGE / MCP_TENANT_MANAGE (non-delegable, held only by admin and tenant_admin).
permission_not_held 403 The caller tries to grant a permission they do not hold themselves (key names it).
system_role_not_assignable 400 A system role cannot be assigned through the role assignment routes.
role_name_taken 409 A role with that name already exists.
role_assignment_forbidden 403 The requested role ranks above the caller.
self_role_change 403 The change would alter the caller's own role.
name_required / invalid_name / name_too_long 400 The name is absent, empty or with nothing visible / not a string or not valid UTF-8 / over its length limit.
group_not_manageable 403 The caller is neither an administrator nor the group's creator.
tenant_admin_only 403 Only a tenant administrator may change a mapping to the tenant-admin role.
project_role_insufficient 403 Only the project owner may share it to a group or the organisation.
org_share_disabled 403 The tenant has switched organisation-wide sharing off.
resource_type_required / invalid_resource_type 400 The resource_type is missing / not an accepted value.
role_required / invalid_role 400 The role field is missing / not an accepted value.
user_changed_concurrently 409 PATCH /users/{id}: the user was changed by someone else between the request's read and its write. Nothing was written; reload and re-apply.
role_managed_by_idp 409 The role of a user is managed by the identity-provider mapping (a mapped group or a role target) and cannot be changed here.
role_requires_tenant 409 PATCH /users/{id}: tenant_admin, ki_manager and finance need a user with a home tenant; a tenant-less (platform) user cannot get them, and cannot be moved into a tenant: erase the account (DELETE /users/{id}/erase) and invite the address into the organisation instead. Nothing was written.
mode_required / invalid_mode / budget_usd_required / invalid_budget_usd 400 A budget cap field is missing / not an accepted value.
invalid_budget_usd / invalid_budget_period / invalid_member_budget_mode / invalid_member_budget_usd / invalid_cost_centre / cost_centre_too_long 400 A department (or the new-user defaults) budget or cost-centre field is not an accepted value (invalid_budget_usd is the same code with the same meaning as on the budget-cap routes in the row above); cost_centre_too_long is a cost centre over 64 code points. These replace the older budget_usd_invalid, budget_period_invalid, member_budget_mode_invalid, member_budget_usd_invalid and cost_centre_invalid.
user_not_found 404 The named user does not exist (also PATCH /users/{id} when the user was removed while the request was in flight).
tenant_not_found 404 The named tenant no longer exists.
account_not_deletable / account_not_erasable / account_not_movable 403 The account is a protected seed or review account.
platform_admin_only 403 Only a platform administrator may change a user's tenant.
email_required / invalid_email 400 The email is missing / not a valid address.
email_in_use 409 The email belongs to another active account.
seat_limit_reached 403 The tenant's seat limit blocks the action.
user_deleted 409 The account is deleted; restore it first.
user_moved 409 The user now belongs to another tenant; reload and retry.
self_disable 409 The action would disable the caller's own account.
self_delete 409 DELETE /users/{id} on the caller's own account.
self_erase 409 DELETE /users/{id}/erase or its preview on the caller's own account.
self_resend_invite 409 POST /users/{id}/resend-invite on the caller's own account.
last_admin_blocked 409 The action would leave an organisation that still has other members without an administrator. Not overridable; promote another administrator first.
last_admin_confirm_required 409 The action would leave the organisation without any administrator. Re-send with ?confirm_last_admin=1 to confirm.
disable_target_missing / enable_target_missing 400 Defensive codes, not reachable over HTTP.
invalid_processing_restricted / invalid_reactivation_opted_out / invalid_conversation_retention_days 400 A user field of the wrong type or outside its range.
invalid_code / code_too_long 400 The static one-time code is malformed. A newly set code needs at least 12 characters. On the user route PUT /admin/v1/users/{id}/static-otp it must be a JSON string of 12 to 32 ASCII digits after trimming surrounding whitespace; every other value (a number, too short, too long, a non-digit) is invalid_code; there is no code_too_long there. On the partner route PUT /admin/v1/partners/{id}/static-otp it must be a JSON string of 12 to 32 printable ASCII characters (0x20 to 0x7E, a space allowed inside) after trimming: a number, a non-printable or non-ASCII character (an umlaut, a non-breaking space, a control character) or fewer than 12 characters is invalid_code, checked before the length; over 32 characters is code_too_long. Sign-in still accepts a code of 4 to 32 characters, so a code set before this rule (a legacy code) keeps working until the 30-day grace ends and is then refused with 403 static_code_expired (see Users & tokens and Static sign-in codes; partner route: Partner).
kind_required 400 GET /admin/v1/static-otp/legacy without a kind query parameter. See Legacy static codes.
invalid_kind 400 GET /admin/v1/static-otp/legacy with a kind other than user or partner (an empty or repeated kind included).
permission_required (legacy list) 403 GET /admin/v1/static-otp/legacy?kind=user without USERS_GLOBAL_MANAGE, or kind=partner without PARTNERS_MANAGE: { "error": "forbidden", "code": "permission_required" }.
(no code) (legacy list) 503 GET /admin/v1/static-otp/legacy on a storage fault: { "error": "temporarily unavailable; retry later" }. Nothing was changed; retry.
static_code_expired (verify routes) 403 POST /admin/auth/otp/verify and POST /partner/auth/otp/verify with the correct legacy static code after the grace ended; see the static_code_expired row above and Legacy static codes.
invalid_field 400 A wrongly typed field on a personal-token mint; field names the key.
invalid_request the refusal's 4xx Defensive fallback when a validator refuses without a more specific code. Logged as a WARN.

Two kinds of answer stay without a code on purpose: a plain 404 not found for a record looked up inside the caller's tenant (it hides whether the record exists in another tenant), and 5xx answers for a storage fault. A 404 that names the resource (user not found, tenant not found) carries its code. The permission_required family on the permission gates keeps its own codes, listed in the sections above.

Typed codes on the webhook receiver and the chat-bridge endpoints

The public webhook receiver (POST /hooks/{token}) and the chat-bridge endpoints (/chat-bridge/{platform}/events and the Mattermost /chat-bridge/{platform}/slash) answer every JSON error their handlers produce with a top-level code next to the unchanged error sentence and HTTP status. Key off code, not the prose. One exception: a body over the front-end limit (64 KiB on /hooks/, 32 KiB on /chat-bridge/) is refused before the handler with 413 {"error":"payload_too_large"} and no code; for oversize bodies key off status 413 (or the error token). The start-up readiness gate inside both handlers is not an exception: during the start-up window it answers 503 with a top-level "code": "service_starting" (plus Retry-After and X-AIG-Error: service_starting; see the service_starting row in the start-up table above).

code Status Meaning
forbidden 403 The one opaque refusal: an unknown token or workspace, a disabled or unpublished target, a wrong secret or signature, a bad slash token, a malformed slash form, a trigger whose tenant is suspended (with AIG_TENANCY_ENABLED on; an unreadable suspension state answers 503 temporarily_unavailable instead), or a workflow trigger whose tenant differs from its workflow's tenant. Every cause answers the byte-identical body {"error":"forbidden","code":"forbidden"}, so the code is not an enumeration oracle.
webhook_secret_required 401 The X-AIG-Webhook-Secret header is absent or empty.
invalid_webhook_secret 401 The X-AIG-Webhook-Secret header was sent more than once.
not_found 404 A malformed path, or a platform with no adapter.
method_not_allowed 405 Not a POST.
payload_too_large 413 The body is over the 32 KiB handler cap. On /hooks/ a body of 32–64 KiB gets {"error":"payload too large","code":"payload_too_large"}; a larger body, and every oversize chat-bridge body (the front end caps it at the same 32 KiB), gets the uncoded edge answer {"error":"payload_too_large"}.
bad_utf8 400 The body is not valid UTF-8.
invalid_payload 400 A workflow webhook body that is not a JSON object or not valid JSON.
number_not_exact 400 A number in a workflow webhook body cannot be kept exactly: an integer or decimal that does not round-trip exactly, or an integer with too many digits (a too-long integer is reported as number_not_exact, not as a separate code).
number_invalid 400 A number in a workflow webhook body is not valid JSON number syntax.
duplicate_key 400 A workflow webhook body repeats a key in one object at any depth. Nothing is queued. Agent triggers do not parse their body and never answer it.
body_too_complex 413 A workflow webhook body holds more than 16,384 JSON structural elements, even though it is within the byte cap.
invalid_idempotency_key 400 The X-AIG-Idempotency-Key header was sent more than once, or holds characters outside the allowed set.
idempotency_key_too_long 400 The idempotency key is longer than 64 bytes.
event_id_required 400 A chat-bridge event with no event_id, or an empty one.
invalid_event_id 400 A chat-bridge event_id that is present but not a string.
invalid_event 400 A chat-bridge event_id, workspace key or platform the durable dedup claim cannot key safely (event id not printable ASCII or over 191 bytes, workspace key over 191 bytes or invalid UTF-8, platform over 32 bytes). Nothing is claimed or processed; the platform should not retry.
rate_limited 429 The per-client failure budget, or a per-trigger, per-tenant or per-workspace window, is spent.
too_many_pending_runs 429 The trigger already has too many unstarted (agent) or in-flight (workflow) runs. Retry later.
temporarily_unavailable 503 A transient fault (database, busy node, a chat-bridge event whose durable dedup claim could not be taken (nothing was processed), a chat-bridge node that has not yet loaded the workspace list, or a body the server could not read). The same code also covers an agent trigger whose tenant has the Agents feature switched off (retrying helps only once it is re-enabled). It also covers a trigger whose tenant's suspension state could not be read (a suspended tenant itself answers 403 forbidden). Nothing was enqueued; retry.
enqueue_failed 500 The run could not be written.
internal_error 500 An unexpected fault, or the chat-bridge worker could not be started (the claim is released and the event is answered without an ACK; a platform that retries redelivers it, see chat-bridge.md).
response_encode_failed 500 The generic fallback of the shared JSON response encoder on the OpenAI-shaped routes ({"error":"internal error","code":"response_encode_failed"}), used by every such endpoint when a response body cannot be encoded. On an Anthropic-native route (/v1/messages, /v1/messages/count_tokens) the same failure answers the Anthropic error shape with the code kept: 500 {"type":"error","error":{"type":"api_error","message":"response encode failed (response_encode_failed)","code":"response_encode_failed"}} (502 when it is a refused tool-call or number encoding whose own error body cannot be encoded; that message is the same generic encode-failed text, no longer "response refused"). On an already-open Anthropic stream the same envelope is sent as the event: error frame. It is not reachable with the literal bodies of the webhook receiver and chat-bridge endpoints above.

Example error responses

⭐ Example: The following examples show the JSON body returned for common error scenarios.

401 — authentication failures

The first three share "code": "unauthorized"; the message tells them apart. An expired token is reported separately as token_expired, an explicitly revoked one as token_revoked (both below).

No token sent:

{
  "error": {
    "code": "unauthorized",
    "message": "No API token provided. Send your gateway token as 'Authorization: Bearer <token>', or the 'x-aig-token' / 'x-api-key' header."
  }
}

A valid token used on the wrong gateway (it belongs to a different gateway of the same tenant — fix the {gateway} path segment; do not regenerate the token):

{
  "error": {
    "code": "unauthorized",
    "message": "This token is recognized but is scoped to a different gateway in this tenant. Check the {gateway} segment of your URL path /v1/{tenant}/{gateway}/{provider}/... ."
  }
}

An unknown token, or a token from another tenant (generic — the two are indistinguishable by design, so the response never confirms a token's existence in a tenant you have not named):

{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid gateway token for gateway '<gateway-slug>'. Tokens are scoped to a single gateway — verify the {gateway} segment of /v1/{tenant}/{gateway}/{provider}/... matches where the token was created."
  }
}

An expired token (its own code — the credential was real and simply lapsed, so a client may re-mint and retry, which it must not do for unauthorized):

{
  "error": {
    "code": "token_expired",
    "message": "Gateway token expired. Regenerate it under Gateways -> Tokens and update your client/agent."
  }
}

A revoked token (its own code — the credential was real and was withdrawn on purpose; the date is present when the revocation is on record, and the caller needs a new token, not a retry):

{
  "error": {
    "code": "token_revoked",
    "message": "This gateway token was revoked on 2026-09-13T16:22:07Z. Mint a new token and update the caller."
  }
}

429 — rate limited

{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit: 101/100 requests per 60s"
  }
}

429 — quota exceeded

{
  "error": {
    "code": "quota_exceeded",
    "budget_scope": "gateway",
    "message": "This gateway has used its budget of $200.00 (spent $200.01). It resets at the start of the next monthly period. A workspace administrator can raise this gateway's budget in the gateway settings. If you are not an administrator, ask your workspace administrator. See Budgets & quotas in the documentation."
  }
}

A refusal caused by the wallet instead carries wallet_state and no budget_scope:

{
  "error": {
    "code": "quota_exceeded",
    "wallet_state": "frozen",
    "message": "..."
  }
}

wallet_state is empty, frozen or disputed; an unknown value must be treated as absent.

The API-key cap carries "budget_scope": "api_key", the workspace spend cap "budget_scope": "workspace"; the body is otherwise the same shape. A workspace spend cap that is zero, negative or otherwise malformed (a freeze) is refused with this same quota_exceeded + "workspace" body on every path — a direct request, a sub-agent the assistant delegated to, and the summarize call alike. It is never reported as an empty-wallet or exhausted-trial error, since adding funds cannot lift it. When the refusal comes after the response stream has already opened, a client that reads the side channel receives it as an aig_status: "provider_error" event with error_class: "quota_exceeded" carrying the same top-level budget_scope field (an unknown value must be treated as absent); a plain OpenAI client receives the same field inside the error object of the stream error frame.

400 — guardrail blocked

{
  "error": {
    "code": "guardrail_blocked",
    "message": "Request blocked by content policy (block-pci): cc – Credit/Debit Card Number"
  }
}

502 — all providers failed — returned when every provider in the fallback chain has been exhausted. The JSON envelope is identical to the above; only code and message differ.

Search and lookup values travel in the request body

A search term or an e-mail address is personal data, and a query string is not a safe place for it: the web server writes the full request line (including ?email=… / ?q=…) into its error log whenever that request also logs an error. Every search or lookup endpoint therefore takes its one personal-data value from a JSON POST body:

Endpoint (canonical) Body field Still in the query string (not personal data)
POST /admin/auth/sso/lookup email —
POST /admin/v1/users/search email —
POST /admin/v1/users/roster/search query —
POST /admin/v1/conversations/search q limit
POST /admin/v1/chat-commands/search q —
POST /admin/v1/tenant-prompts/search q tenant_id
POST /admin/v1/playground/search (deprecated too — see Playground) q gateway_id
POST /admin/v1/gateways/{gw}/agents/search q shared, usage

Accepted: Content-Type: application/json and a JSON object whose field is a non-empty string, valid UTF-8, at most 1024 characters (Unicode code points). The value must not also appear in the query string.

Rejected — 400, before any lookup, storage access or outbound call (after the route's own authentication, permission and rate-limit checks, so an unauthorised caller still gets its 401 / 403 / 429). Absent and malformed are different answers:

Code When
email_required / q_required (sso/lookup: {"error": "email required"}) The value is absent: no body, an empty object, or an empty string (users/search and sso/lookup also treat a whitespace-only address as absent).
invalid_email / invalid_q The value is present but malformed: not a string (a number, true, null, an object, an array), not valid UTF-8, or longer than 1024 characters (sso/lookup additionally rejects an address that is not a valid sign-in address, see Authentication). On users/search, invalid_email means "no user can have this address" — the SPA shows it as user not found.
malformed_body The body is not a JSON object (42, null, "text", an array), is not valid JSON, is not valid UTF-8, or contains a number that is not finite (NaN, Infinity, 1e999).
pii_in_query A POST that still carries the value in the query string (?email= / ?q=) — a half-migrated client must notice instead of leaking the value. Also any query string on a route that takes none, such as GET /admin/v1/me/security. The value is never echoed.
malformed_query More than 100 query parameters arrived (the value could otherwise hide past the parser's cap); applies to the GET form too, to GET /admin/v1/chat/voice/availability (its gateway_id hidden past the cap is never read as absent), to GET /admin/v1/device/families (a ?user_id hidden past the cap is never read as "your own sessions"), and to GET /admin/v1/me/security.
invalid_limit On conversations/search: limit is not a plain positive integer (0, -1, 0x1E, 1e2, 30, empty, repeated). Absent means 20; values above 100 are capped at 100. The same code (and invalid_offset) answers malformed paging on every paged admin list — see Storage faults.
query_required / invalid_query / query_too_short users/roster/search only (absent / malformed as above), plus a trimmed value shorter than 2 characters (query_too_short). See Searching the roster.
roster_search_forbidden (403) users/roster/search only: the caller is a viewer or the demo identity. Answered before the body is read. Use the exact-email users/search instead.
unsupported_content_type (error: content type must be application/json) The Content-Type is absent or not application/json (a cross-site form or no-cors request cannot trigger the search).

These searches only read: they write no admin audit-trail row, a demo session may use them, and under admin impersonation they behave like the GET form (the personal-data refusal still applies to conversations/search and chat-commands/search).

The GET form is deprecated. GET /admin/auth/sso/lookup?email=, GET /admin/v1/users/search?email=, GET /admin/v1/conversations/search?q= and GET /admin/v1/playground/search?q= — and the ?q= filter on the still-current list routes GET /admin/v1/chat-commands, GET /admin/v1/tenant-prompts and GET /admin/v1/gateways/{gw}/agents — keep returning the same results for valid input until the sunset, apply the same value rules (a repeated or valueless ?q / ?email is invalid_q / invalid_email, no longer the unfiltered list), and answer with:

Deprecation: @1791676800
Sunset: Mon, 11 Jan 2027 00:00:00 GMT

(Deprecation per RFC 9745 — deprecated since 2026-10-11; Sunset per RFC 8594.) After the sunset the GET-only routes are removed (404), and the three list routes answer 410 {"code": "q_moved_to_post"} whenever a q parameter is present — a search term sent the old way is never silently ignored into the full list. Move to the POST form now.

A knowledge file name travels in the body too. A file name is user content — it can name a person — and in a URL path it reaches the web server's access log as well as the error-log request line and the admin audit trail's request path. The project knowledge upsert therefore takes its name from the JSON body of PUT /admin/v1/projects/{id}/knowledge ({"filename", "extracted_text", "content_type"?}), with the same carrier rules as the table above: Content-Type: application/json, the name not also in the query string (pii_in_query), a JSON object body (malformed_body), more than 100 query parameters (malformed_query). Absent and malformed are different answers: filename_required (no body, {}, "filename": "") and invalid_filename (any value the filename rules reject, including null and non-strings). The JSON create POST /admin/v1/projects/{id}/knowledge and the file upload POST /admin/v1/projects/{id}/knowledge/upload answer their filename with the same two codes. The old path form PUT /admin/v1/projects/{id}/knowledge/{encoded filename} keeps working until the sunset with the same Deprecation / Sunset headers on every answer the route itself gives (also its 400 invalid_filename), and is removed (404) afterwards. See Saving a text file by name. A body with id instead of filename is the in-place save of an existing file by its id — see Saving an existing file in place.

Admin audit rows written before this change through the old path form keep the file name in their recorded request path. They are left as they are: each records the user's own action in their own project, and the audit log's retention purges them like every other row.


Sign-in errors

sso_lookup_unavailable (503, Retry-After: 5) answers POST /admin/auth/otp/request, POST /admin/auth/otp/verify, POST /admin/auth/otp/verify-link, POST /admin/auth/signin/password, POST /admin/auth/signin/finish, POST /admin/auth/setup/finish, POST /admin/auth/password/forgot (the single sign-on check before a code, link or session is issued), POST /admin/auth/signup/request, POST /admin/auth/signup/verify, POST /admin/auth/signup/verify-link, POST /admin/auth/signup/checkout, POST /admin/auth/signup/trial, GET /admin/auth/signup/status and /admin/auth/sso/lookup (POST, and the deprecated GET) when the single sign-on configuration could not be read. It is deliberately not treated as "this domain has no single sign-on": no code is sent, and the login page shows "Sign-in is briefly unavailable. Please try again in a moment." A malformed email on /sso/lookup is invalid_email (400), the same code /otp/request uses (see Search and lookup values travel in the request body). See Authentication.

POST /admin/auth/impersonation/stop answers impersonation_stop_failed in two shapes, both without Retry-After and both with the aig_imp cookie cleared. 503 { "error": "temporarily unavailable", "code": "impersonation_stop_failed" } means nothing ended (a lock wait timed out, every attempt conflicted, or there was no database connection). 500 { "error": "internal error", "code": "impersonation_stop_failed" } means the audit row was refused or the outcome is unknown. In both cases the record may stay active until its expiry (at most 30 minutes), no retry can reach it, and the impersonation.stop_failed audit row plus the server error log are the signal; 200 is answered only when the end and its audit row committed. POST /admin/auth/impersonation/start answers 503 { "error": "temporarily unavailable" } when nothing was written (including a lock wait behind a tenant purge) and 500 { "error": "could not start impersonation" } for any other fault; no aig_imp token is issued unless the session and its impersonation.start row committed. See Admin impersonation.

POST /admin/auth/impersonation/start answers invalid_user_id (400, { "error": "invalid user_id", "code": "invalid_user_id" }) when a present user_id is not 1-36 printable, non-space ASCII bytes; the attempt is audited as impersonation.denied without the value. GET /admin/v1/device/families answers the same code only for a repeated, bare or empty ?user_id (not audited). See Admin impersonation.

Password and second factor codes

Codes of the Password and second factor sign-in routes. The shape is flat: { "error": "<fixed text>", "code": "<code>" }.

code HTTP route(s) meaning
signin_expired 400 all pending-token and enrollment-token routes The pending or enrollment token is unknown, expired, used, cancelled, of another purpose, bound to another session, or not at the step the route serves.
wrong_second_factor 401 signin/finish, setup/totp/confirm, setup/webauthn, step-up, factor confirm (POST /admin/v1/me/factors/totp/confirm and POST /admin/v1/me/factors/webauthn included) A well-formed second factor that does not verify. Counted toward the caps.
factor_attempt_cap 429 signin/finish, setup/totp/confirm, setup/webauthn, POST /admin/v1/me/factors/totp/confirm, POST /admin/v1/me/factors/webauthn, POST /admin/v1/me/step-up 5 wrong factors on one token. The token is burned: every later use of it answers this code, whatever factor is sent.
factor_failure_cap 429 signin/finish, setup/totp/confirm, setup/webauthn, POST /admin/v1/me/factors/totp/confirm, POST /admin/v1/me/factors/webauthn, step-up 20 wrong factors for the account within an hour, shared across these routes.
password_too_short 400 setup/password, password/reset/complete, PUT /admin/v1/me/password The new password has fewer than 12 characters.
password_too_weak 400 same The new password has no letter or no digit.
password_leaked 400 same; see password rules The new password is on the list of leaked passwords.
password_reused 400 same; see password rules The new password equals one of the last 4 passwords.
invalid_credentials 401 signin/password, PUT /admin/v1/me/password Wrong password, unknown or disabled address, a person not on password sign-in, or a break_glass request from an address not on the list. One answer for all.
signin_locked 429 signin/password, PUT /admin/v1/me/password 10 wrong passwords in a row. Carries Retry-After. A correct password gets the same answer.
signin_rate_limited 429 signin/password Global ceiling on evaluated wrong passwords reached. Carries Retry-After.
password_signin_required 403 /otp/verify, /otp/verify-link The person signs in with password and second factor (also every fixed-code account in such an organisation). The code is consumed, no cookie.
admin_mfa_required - OAuth callbacks, OIDC and SAML callbacks, app redeem A sys:admin holder may not use this sign-in while admin second factor is enforced. A bounce reason on the login page; on app redeem the reason of a 403.
mfa_session_required 403 /admin/auth/renew, impersonation/start, step-up-gated actions, the step-up routes and the account-security write routes The session has no second factor, or (step-up and account-security write routes) lacks pwd plus a second factor. The cookie is untouched.
step_up_required 403 step-up-gated actions, POST /admin/v1/me/step-up and /options A fresh, verified step_up_token is missing or not valid (a burned token included, on a gated action), or a token sent to me/step-up is missing, unknown, expired, already verified or bound to another session. Also a session that has no usable binding (a malformed auth_time).
no_second_factor 409 step-up routes, gated actions and POST /admin/v1/me/recovery-codes The caller has no second factor. Recovery codes do not count as a factor. Sign in again to set one up.
last_factor_required 409 POST /admin/v1/me/factors/{id}/remove The last factor cannot be removed.
not_found 404 PATCH /admin/v1/me/factors/{id}, POST /admin/v1/me/factors/{id}/remove Malformed, unknown or another person's factor id: one byte-identical body { "error": "not found", "code": "not_found" }.
factor_already_registered 409 setup/webauthn, me/factors/webauthn This key is already registered (for this account or another one). Counted toward the caps, like a wrong factor.
totp_already_set_up 409 setup/totp, setup/totp/confirm, me/factors/totp, me/factors/totp/confirm An authenticator app is already set up. Use the move route.
totp_not_set_up 409 me/factors/totp/move, me/factors/totp/confirm (a move) The person has no authenticator app to move, at the start or by the time of the confirm. Decided before the step-up token is looked at. Add the app instead.
rate_limited 429 setup/totp More than 10 secrets for one pending token. The token is not burned; the person can still confirm the last secret.
setup_incomplete 409 setup/finish Password, email code (in a row started by signin/password) or second factor is still missing.
cannot_reset_own_account 403 users/{id}/second-factor/reset An admin cannot reset their own factors.
no_password_signin 409 users/{id}/password-reset-link The target does not use password sign-in, has no password or is disabled.
not_locked 409 users/{id}/signin-unlock The target's password sign-in is not locked (no lock, or it already ended). No step-up token is consumed.
policy_enforced_by_myra 409 PUT /admin/v1/tenants/{id}/signin-policy Myra enforces the option for this organisation; an organisation admin cannot change it (a platform admin can). Decided when the change is written; nothing is changed.

These routes also use existing codes: missing_field, invalid_field (on password/reset also for a confirm that is not a boolean: field: "confirm"), pii_in_query, invalid_request, malformed_body, duplicate_key, unsupported_content_type, invalid_or_expired (on password/reset the body is { "error": "invalid_or_expired", "code": "invalid_or_expired" }), link_confirm_required, link_other_browser, sso_required, sso_lookup_unavailable, forbidden (on PUT .../signin-policy: enforced sent by a caller who is not a platform admin), permission_required (on GET / PUT .../signin-policy: no SSO_MANAGE), route_not_found (GET / PUT .../signin-policy while password_mfa_enabled is off or for an organisation that is not on password_mfa_tenant_allowlist), otp_request_cap (also on signin/password when a holder without a factor is mailed an email code), and invalid_otp, otp_attempt_cap and otp_failure_cap (on setup/email-code, as on /otp/verify), with the meaning given above.


Network errors in the app (no readable answer)

When a request from the app gets no answer it can read, the browser hands the app nothing but "the request failed" — the same for no internet, a DNS problem, a firewall, a proxy or VPN, a security filter and a browser extension. The app therefore checks why before it shows a message, and every such message carries a support reference you can copy or screenshot.

How the app tells the cases apart. Right after the failure it sends at most two small checks to the same server (each limited to 3 seconds, so the message can take up to about 6 seconds to appear; the button stays busy meanwhile):

  1. a plain GET of a cheap, harmless endpoint on the same host — /admin/auth/methods, or /v1/models for the inference API. It carries only Accept: application/json and no other header, so the browser sends it without a CORS preflight and can read the answer;
  2. only if that answer cannot be read: an opaque GET /healthz that succeeds if any answer comes back from the host, readable or not.
What the user sees Class in the reference When
You are offline … offline The browser reports no network connection. Nothing is checked.
The server did not answer in time … timeout The app's own time limit for the request ran out.
The server is reachable, but this request did not get through … interrupted The check reads a normal answer from the server: this one request was lost or rejected on the way (for example by a security filter, or because it was too large). Trying once more is reasonable; if it fails again, it is being blocked.
An answer came back from the server, but your browser could not read it … blocked No readable answer, but the host answered something. Either the service is briefly unavailable and its error page carries no CORS headers, or something between the browser and the server (firewall, proxy or VPN, security filter, browser extension) blocks or replaces the answer. The browser cannot tell these two apart.
The server cannot be reached from this network … unreachable No answer from the host at all: no internet, DNS, a firewall or VPN, or an extension blocking the whole site.
The request failed, and the cause could not be checked … unverified The checks were skipped (the page already ran 20 of them in the last minute) or could not run — a neutral message, never a guess.

Answers the network edge (Myra CDN) produces itself. On the admin API hosts (ai-api-admin…, which serve sign-in, sign-up and the app's own API) the CDN adds CORS headers to its own answers, so the app can read them and does not show them as an error of the application. On the inference host (ai-api…, /v1) it does not; a CDN block there appears as blocked.

What the user sees Class How the app recognises it
Too many requests from your network were blocked by the security filter … Where the page shows the support reference, also Verify and continue cdn_block Status 503 and the response header x-myra-captcha-state: initial (the CDN sends it because the app asks for JSON with Accept: application/json), or a 503 HTML page that links /myracloud-captcha/. Any other value of that header, an empty one, or the header on another status is not treated as a block. The button opens https://<api host>/myracloud-captcha/?q=/ in a new tab; confirming there lifts the block for this browser.
The service is temporarily unavailable. This is not a problem with your network … cdn_upstream A readable 502, 503 or 504 that carries none of the gateway's own markers: no typed code, no {"error": "…"} body, no gateway request id. (An attachment upload in the chat shows its own "the server is busy or took too long — the file is fine" message instead, with the same reference.)

An answer with one of the gateway's markers is always treated as the gateway's own answer and keeps its specific message (for example 503 sso_lookup_unavailable on sign-in). A CDN-blocked request whose CORS preflight is itself blocked cannot be read by the browser; the app then still identifies the block through check 1 above, which needs no preflight.

The support reference is one line, for example:

2026-10-14 18:33:02 UTC · ai-api-admin.myra.eu/admin/:seg/:seg/:seg · blocked
2026-10-14 18:33:02 UTC · ai-api.myra.eu/v1/:seg/:seg/:seg/chat/:seg · HTTP 503 · provider_error · req 3b0766ae-b883-4388-bad8-82b7bfef13bc

It contains the UTC time the request was sent, the API host and path (no query string; every path segment that is not a known route word is replaced: by :seg for a plain lower-case word that is not a route name, such as a tenant or gateway slug, and by :id for ids, numbers, e-mail addresses and anything with digits, dots, @, % or capitals; a request to a host that is not one of our own API hosts shows only /), the class or the origin of the answer, and — for a readable answer — the HTTP status, the machine code and the gateway's request id. It never contains a token, an e-mail address or message content. The request id is shown only when the answer carried the gateway's own X-Request-Id in one of its two server-minted shapes: a UUID (inference, /v1 and /direct — the request_log id) or 32 hexadecimal characters (an error answer of the admin API, sign-in / sign-up under /admin/auth/, or the partner portal — see Request id on admin errors). Any other value is dropped. A 32-character id is shown only when the answer's body is also the gateway's own (a typed code or an {"error": "…"} body), because a proxy or CDN could send an id of that shape too. Answers without an id are identified by time, host and path.

For support: look the time up in the edge access log of that host (each line carries the client IP the CDN forwarded as xff_client=). No line at the user's time means the request never reached the application — it failed between the browser and the CDN, or at the CDN. With a request id, search the backend access log for rid="<id>" (see Request id on admin errors).

What the app sends to make this work. Every API call asks for Accept: application/json. Reads (GET / HEAD) carry no Content-Type, so the browser sends them without a CORS preflight; requests that change something keep Content-Type: application/json, which several routes require. A confirmed blocked or unreachable failure is also reported to the operators ([network:cors-or-unreachable], at most 20 per page load), through a request that needs no CORS; an interrupted failure (the API answers, but this one endpoint did not — the signature of a CORS misconfiguration of one location) is reported as [network:interrupted] from its second occurrence per endpoint and page load. A dropped live-update stream reconnects on its own and is neither checked nor reported. See Feedback › client errors.

Error messages in the app (what failed, why, what to do)

Every error the app shows has the same three parts, plus a copyable support reference:

  1. What failed — named by the screen, for example "The agent could not be deleted." or "This section could not be loaded."
  2. Why, and what you can do — decided from the answer's structure (HTTP status, machine code, request method, the network diagnosis above), never from the server's text. The app never shows the server's own error text: admin error bodies are English and partly technical, and the message must read in your language.
  3. The support reference — the one-line reference described above, with a Copy button. Send it to support with a screenshot; it is enough to find the request.

The why part, in order of precedence:

Situation What the app says
The request was cancelled (you left the page, closed a dialog, or the session ended and the app is opening the sign-in page) nothing — no message is shown
A network problem, a timeout, or an answer of the Myra CDN the sentence from Network errors in the app
… for a request that changes something (anything but GET / HEAD), when the browser was already offline before the request started the offline sentence + "Nothing was sent." — the request never left the browser, so trying again is safe
… for any other request that changes something, except a CDN security-filter block "No answer arrived, so it is unclear whether the change was saved. Reload the page and check before you try again." — the change may have been saved before the connection broke (offline detected only after the request started included); repeating it blindly could apply it twice. Plus the approval hint (below)
… including a connection that broke while the answer was arriving (the headers came, the body did not finish — also our own 60 s limit firing mid-answer) the same network sentence (class "interrupted", or the offline sentence when the browser is offline); for a request that changes something the "unclear whether the change was saved" sentence above applies — it may have been saved
A successful (2xx) answer whose body is not valid JSON (a proxy page or a truncated reply) "The server's answer could not be read. Try again; if it happens again, contact support with the reference below." The reference class is HTTP <status> code=malformed_response. For a request that changes something the "unclear whether the change was saved" sentence is used instead, because the change may have been applied
A department or project-lock policy refusal the policy's own sentence
A machine code with a known meaning (for example target_outranks_caller, plan_model_not_allowed, the inference codes in the table above) that code's sentence
400 / 422 The server did not accept the entries — check them
401 Not signed in, or the session expired — sign in again
403 No permission — ask an administrator of your workspace
404 / 410 It no longer exists (deleted, moved, or the link is out of date) — reload
409 It conflicts with the current state (a name already in use, or a change made elsewhere at the same time) — reload and check
413 The request is too large
429 Too many requests — wait a moment (the app shows no countdown here; the sign-up page reads Retry-After itself)
503 Briefly unavailable; nothing was changed — try again
500 / 502 / 504 on a read An error on our server, not caused by you — try again; contact support with the reference if it repeats
500 / 502 / 504 on a change An error on our server, so it is unclear whether the change was saved — reload and check before you try again. Plus the approval hint (below)
any other status "The server refused the request (HTTP n)"
An error inside the app itself (no request involved) "An error occurred in the app itself. Reload the page …" — a page that crashed shows a reference with the class client (time + page), which matches the error report the app sends. That report also carries the top stack frame (function, file, line; no message text, no query string)

The statuses 400, 401, 403, 404, 409, 410 and 422 get their specific sentence only when the answer is provably the gateway's own (a typed code, an {"error": "…"} body, or the gateway's UUID request id). An HTML error page from a proxy or firewall with the same status gets the neutral "The server refused the request (HTTP n)" — a firewall's 403 says nothing about your permissions in the workspace.

A screen whose own message already states the specific reason (for example "That name is already taken", or a sign-in code that expired) shows that sentence and only the reference under it. A client-correctable validation error (for example the voucher series form's mask, count or credit codes) shows only the sentence, with no reference. The same holds for the project Files tab: a refusal of the file itself (unsupported type, empty, unreadable PDF, over the size limit, malware) is shown as one named sentence without a reference, while a temporary or unknown failure keeps it.

The approval hint. A change that is not known to have failed or succeeded gets the extra sentence "Where changes need approval, also check the approval queue: the change may have been submitted for approval instead." — except for these chat actions, which never go to an approval queue: starting a chat, chat comments, memories, feedback on an answer, reporting a message, sharing a chat in a project, saving an answer, and the demo contact form.

Starting a chat. Your message is sent only after the chat was created, so when starting a chat fails the app says "The chat could not be started. Your message is still in the input field." and, as the reason:

  • offline since before you pressed Send: "You are offline. … Nothing was sent." (ghost mode: the offline sentence alone — a ghost chat stores nothing either way);
  • no answer arrived (offline only after sending, a timeout, the server unreachable, the request interrupted or blocked, the cause not checkable, a CDN 502 / 504) or a 500 / 502 / 504: the network sentence from Network errors in the app (or the server-error sentence), followed by "If the chat was created anyway, it is in "Search" without your message; you can delete it there." (a chat without a stored row — ghost mode — omits this sentence);
  • 403, 429, 503 and the other statuses: the status sentence of the table above.

"Changes something" means the request's effect, not only its method: a POST that changes nothing — an agent or playground run, a preview, a step test, a copilot proposal, a documentation question, a dry run — is explained like a read ("try again").

One deliberate exception to "never the server's text": an administrator's configuration validator (the guardrail pattern test and the guardrail save, which name the pattern that cannot run; the single sign-on and SAML configuration; the plan editor; the MCP connector form, for administrators and members alike, whose server and OAuth URLs the gateway checks) shows the validator's one-line verdict from the gateway's own 400 / 422, inside the screen's sentence ("The test could not run: …", "The connector could not be created: …"), together with the support reference. That text is English.

Named expected refusals. A refusal the app already explains with its own message is shown but not reported as a client error: the free-trial gateway lock (trial_gateway_locked) and a trial budget above the wallet balance (trial_gateway_budget_over_balance), and a write refused for the read-only demo identity (demo_read_only). Every other coded tenant/gateway refusal, and any uncoded 403, is still reported.

Request id on admin errors

Every error answer (status 400 or higher) under /admin/… (including sign-in and sign-up under /admin/auth/…) and /partner/… carries X-Request-Id: <32 hexadecimal characters> — the id nginx assigns to the request, the same id the server's error log prints for an internal error (admin handler error [<id>]) and the sanitised 500 body returns as request_id. It is added to every error, including those produced outside the API handlers (the start-up 503, the 413 body-size limit, an nginx 500). An id the handler already set is kept. Successful answers do not carry it.

  • When the error answer carries CORS headers, Access-Control-Expose-Headers lists X-Request-Id (added to any list the route already exposes, never replacing it), so the browser app can read it.
  • A request's own X-Request-Id header is never echoed.
  • The public share page (/share/…, served through the app host) is not covered; its reference carries time, host and path.
  • Inference answers (/v1, /direct) keep their own UUID X-Request-Id on every answer — the request_log id.

The backend access log records the id the answer carried as rid="…" (rid="-" when it carried none — for example a success, or an nginx-produced answer on the inference host).

Error responses and CORS (admin API, partner portal)

Error responses under /admin/... and /partner/... carry Access-Control-Allow-Origin and Access-Control-Allow-Credentials: true whenever an app origin applies (see below). This includes errors produced before or outside the API handlers, such as the start-up 503 service_starting, the 413 payload_too_large body-size limit, and a 500 after an unexpected server error. A browser app on the configured origin therefore always sees the real status (429, 503, …) instead of a generic network/CORS failure, and can tell "failed — retry" from "no data".

  • An answer that already carries CORS headers keeps them unchanged. Every admin route writes them by the one rule in Cross-origin requests (CORS): the configured origin, or nothing.
  • For any other error response, the header is added with the configured app origin only. It never echoes the request's Origin. Under /admin/... that is the admin API's configured origin, and with none configured no header is added. Under /partner/... it is the app origin the partner portal always answers with: https://ai.myra.eu when none is configured.
  • Errors produced in front of the gateway, for example by a CDN or proxy, are not covered.
  • Every such error also carries X-Request-Id and, with CORS, exposes it — see Request id on admin errors.

Endpoint-specific error families

Bounded numbers and strings in admin inputs. A present value of the wrong type or out of bounds answers 400 with a top-level code and writes nothing; an absent field or JSON null keeps its documented meaning. Plan config (Plan config): invalid_scheduled_tasks, invalid_max_seats, invalid_plan_budget_usd, invalid_degrade_multiplier. Tenant entitlements (Tenant entitlements): invalid_entitlement_expires_at. Catalog (Catalog): invalid_badge (not a string, or contains control or formatting characters), badge_too_long (over 32 characters), invalid_plan_value. Connector sync sources (Connector sync): invalid_source_label, source_label_too_long (over 255 characters). Platform settings (Settings): invalid_setting_value (a value the setting does not accept). Approval list filters (Config approvals, Agents): invalid_status (an unknown, repeated or valueless status).

Some endpoints define their own machine-readable codes documented alongside the endpoint rather than repeated here (one source of truth). The user lists (GET /admin/v1/users, GET /admin/v1/tenants/{tenant_id}/users) answer invalid_scope / invalid_sort / invalid_dir / invalid_include_deleted / invalid_limit / invalid_offset / invalid_q / invalid_department / invalid_group / invalid_param (400) and roster_too_large (422); see Users & Tokens. The bulk user change (POST /admin/v1/users/bulk) answers invalid_body / invalid_op / invalid_user_ids / too_many_user_ids / duplicate_user_id / department_id_required / invalid_department_id / invalid_group_id / invalid_param / tenant_id_required / invalid_tenant_id (400), tenant_not_found (404), department_not_found (422), users_changed and last_owner (409); see Users & Tokens. The gateway index (GET /admin/v1/gateways) answers gateway_list_too_large (422); see Tenants & Gateways. Notably the conversation summarize / compaction family — corpus_too_large (413), span_not_found (404), span_inverted / invalid_span_content (400, formerly span_content_invalid), conflict_supersedes_stale (409), and the streaming-phase 502 codes — is defined in Conversations. The HTML conversion family — convert_unavailable (409 permanent / 503 retryable, with a reason), convert_not_ready (409), convert_not_html / convert_no_file / convert_open_failed / convert_empty / convert_bad_input (422), convert_deck_unprintable (422), convert_too_large (413 / 422), convert_unsafe_file (422), convert_rate_limited (429), convert_busy (503), convert_failed (502) and convert_timeout (504) — is defined in Conversations › HTML conversion. The agent plan proposal family — task_required / task_too_long / invalid_plan_proposal (formerly plan_proposal_invalid) / too_many_answers (400, formerly plan_proposal_too_many_answers), plan_proposal_dispatch_blocked (403, with a reason naming the gate that refused the internal model: residency, provider_not_allowed, model_disabled, provider_not_configured, plan_not_allowed, provider_objected or other; the same reason rides instructions_tidy_dispatch_blocked), plan_proposal_guardrail_blocked (422), plan_proposal_unusable_output (502), plan_proposal_model_unavailable / plan_proposal_guardrail_unavailable (503) — is defined in Agents. The agent instructions tidy family — instructions_required / invalid_request (400, alongside the instructions_* codes of Instructions limit), instructions_tidy_too_long (413), instructions_tidy_dispatch_blocked (403), instructions_tidy_guardrail_blocked / instructions_tidy_guardrail_scrubbed (422), instructions_tidy_unusable_output (502), instructions_tidy_model_unavailable / instructions_tidy_guardrail_unavailable (503) — is defined in Agents. The conversation comment family is defined in Conversation comments; there comment_body_required answers an absent, null, "", blank or invisible-characters-only body (see Conversation comments) ("" / blank formerly comment_body_empty; null is treated as absent on this route, a recorded exception to the rule table). The webhook receiver and the public chat-bridge events and slash endpoints carry a code on every JSON error; see Typed codes on the webhook receiver and the chat-bridge endpoints. The chat-bridge connection admin routes answer field_required / invalid_field / unknown_field / read_only_field (400, with a field), agent_not_found / agent_external / nothing_to_update / bot_verification_failed / workspace_ownership_failed (400), workspace_already_configured (409), platform_unreachable (502, the bot or the workspace ownership could not be verified), invalid_request (400, a defensive fallback for a refusal with no more specific code), tenant_deleted (403) and rate_limited (429); see Chat bridge. SCIM uses the RFC 7644 error envelope (SCIM).

See also