API referenceError codes

Error codes

Errors from the API are returned as:

{
  "error": {
    "type": "invalid_request_error",
    "code": "bad_request",
    "message": "human-readable explanation",
    "param": "limit",
    "details": {},
    "request_id": "0b9f3c1e-6a52-4d0e-9d0a-3f1f8a1c2b7d",
    "retryable": false
  }
}
  • type is derived from the status: invalid_request_error (400, 422), authentication_error (401), permission_error (403), not_found_error (404), conflict_error (409), rate_limit_error (429), api_error (everything else).
  • code is the machine-readable value to branch on.
  • param and details are optional. param only appears on some 400 responses.
  • request_id matches the X-Request-Id response header.
  • retryable is true for 429 and 503.
  • retryAfterSeconds appears on 429, and on 503 when the server knows how long to wait. The same value is sent in the Retry-After header.

4xx: client errors

400

CodeMeaning
validation_errorThe request failed schema validation. details.issues lists each path, message and code.
bad_requestThe request is well-formed but not acceptable, for example a bad cursor.
hard_delete_unsupportedmode=hard on /forget for a kind other than fact.
asof_in_futureasOf on POST /recall names an instant that has not happened yet.
erasure_subject_requiredPOST /admin/erasure without exactly one of userId and actorId.
erasure_not_confirmedPOST /admin/erasure whose confirm does not repeat the subject’s id.
self_edit_content_requiredPOST /self/edit with an action that needs content, and none was sent.

401 unauthorized

The Authorization header is missing, malformed, or the key is invalid, revoked or past its sunset date.

403

CodeMeaning
forbiddenThe key is not allowed to do this (IP allowlist, workspace membership, role).
INSUFFICIENT_SCOPEThe key lacks the scope the route requires. The message names the scope. This code is upper case on the wire.
wrong_regionThe workspace is pinned to another region. details.homeRegion and details.instanceRegion say which. Only checked when MNEMO_REGION is set and the workspace has a region. gRPC answers PermissionDenied and a WebSocket upgrade is closed with 1008.
user_binding_requiredThe action needs an approval, and approvals need a key bound to a user.
approval_not_found, approval_workspace_mismatch, approval_not_approved, approval_expiredThe approval sent with an export request cannot be used.

404

CodeMeaning
not_foundThe resource does not exist in this workspace, or is above the key’s sensitivity ceiling.
sensitivity_above_ceilingA write asked for a sensitivity the key could never read back. Nothing was stored.

409

CodeMeaning
conflictThe write conflicts with existing state, or a request with the same Idempotency-Key is still running.
revision_conflictA fact patch sent a stale revision. details carries expectedRevision and currentRevision.
event_immutableEvents cannot be deleted or forgotten.
workspace_mismatchA harness binding does not match the authenticated workspace.

413 payload_too_large

The request body is over 1 MB.

422

CodeMeaning
unprocessable_entityThe request is valid JSON but cannot be applied. Also returned when an Idempotency-Key is reused with a different request.
poisoning_rejectedThe content was refused by the poisoning gate. details.categories says why.
self_edit_forget_unsupportedPOST /self/edit with action: "forget" under an approval policy that cannot resolve it.
dry_run_not_supported, deep_mode_not_supportedOptions of POST /consolidation/trigger that are not available yet. Nothing was changed.
invalid_harness_envelope, unsupported_protocol_versionHost capture (/harness/v1/*) sent an envelope the server cannot read.

429 rate_limited

A rate or concurrency limit was hit. details.reason is request_rate or concurrency. Wait for Retry-After. See Rate limits.

5xx: server errors

500 internal_error

An unhandled failure. The body carries no internal detail. Quote the request_id when you report it.

501 not_implemented

The server is running without something the route needs. The common case is recall without a pre-embedded vector when no LLM provider is configured.

503

CodeMeaning
service_unavailableA dependency (database, Redis, an upstream call) is down or too slow. A write may or may not have been applied, so retry it with an Idempotency-Key.
semantic_search_unavailableStrict semantic recall was asked for and no embedder answered.
auth_unavailableThe server could not check the key’s user status. It fails closed.
fleet_shedThe cluster’s Postgres is too busy for this kind of request. Retry after Retry-After. See Rate limits.
harness_storage_unavailableHost capture storage is not available.

Some 503 responses carry an operational code in details.code, from MNEMO_001 to MNEMO_010 (for example MNEMO_004: session collapse LLM failed, session preserved for retry).

Routes outside the envelope

A few routes mounted outside the main router answer with a flat body, { "error": "<code>" }, sometimes with a message: /health/deep (missing_bearer_token, invalid_or_expired_token, insufficient_scope) and the dashboard sign-in routes.