Responses and errors

The response envelope, request headers, HTTP status mapping and the stable error codes of the Cerberus API.

Request headers

HeaderWhenValue
AuthorizationEvery protected requestBearer <Heimdall token> — a person token, or an application token for GET /api/software-secrets only.
X-Cerberus-Vault-AccessEvery request that reads or changes vault contentThe base64url vault-access handle (32 opaque bytes) from /api/vault/unlock or /api/profiles/{id}/access.
X-Cerberus-Challenge-IdProof operationsThe challenge id from /api/vault/challenges or /api/profiles/{id}/access/challenges.
X-Cerberus-ProofProof operationsThe client’s signature over the challenge and the exact request bytes.
Content-TypeBodiesapplication/json — proof bodies must be uncompressed strict UTF-8 without a BOM.

Response envelope

Every response, success or failure, is wrapped:

{
  "success": true,
  "data": { "id": "6f1c…", "revision": 3 },
  "messages": ["record_found"],
  "errors": [],
  "timestamp": "2026-11-10T12:00:00Z"
}
FieldMeaning
successWhether the operation succeeded (read-only).
dataThe result, for operations that return one (DataOutput<T>); absent for ProcessOutput.
messagesStable outcome codes, e.g. collection_access_granted, software_secret_found.
errorsStable error codes — see below.
timestampServer time of the response.

The one exception is the account export, which streams a raw JSON attachment (cerberus-account-export.json, format cerberus-account-export-v1).

Every response carries Cache-Control: no-store.

Status codes

StatusMeaning
200 / 201 / 202Success; 202 for work that completes asynchronously (e.g. account erasure pending).
400Invalid input (validation_failed).
401Authentication or proof failed.
403Denied — including a stale vault-access handle.
404Absent or hidden: the API does not reveal whether a resource you may not see exists.
409A revision or state conflict.
410Expired — a trash restore after the deadline, a closure cancellation after 30 days.
413The request exceeds CERBERUS_MAX_REQUEST_BYTES (empty body).
503A dependency is unavailable (Heimdall, the database, restore reconciliation).

Error codes

CodeTypical statusMeaning
validation_failed400The input failed validation.
authentication_required401No valid identity token. Clients end the session.
fresh_authentication_required401The operation needs a token signed less than 60 seconds ago.
vault_access_required401Signed in, but no valid vault-access handle. Clients route to unlock.
vault_access_denied401 / 403The proof or handle was refused.
operational_access_required403/health/details without an operational grant.
not_found404Absent or not visible to the caller.
revision_conflict409expectedRevision does not match.
operation_conflict409An idempotency key or operation id was reused with a different payload.
recovery_credential_consumed409The recovery credential has already been used.
resynchronization_required409The sync cursor is invalid or expired: clear the scope and take a fresh snapshot.
closure_expired410The 30-day closure window has passed.
identity_unavailable503Heimdall could not be reached or answered unexpectedly; the API fails closed.
persistence_unavailable503The database is unavailable.
restore_reconciliation_required503The instance was restored and has not reconciled yet.

Concurrency

Online writes carry expectedRevision (or expectedAccountRevision, expectedProtectionRevision, expectedPolicyRevision) and fail with 409 revision_conflict when it is stale. Offline edits are the exception: they carry no expected revision and are resolved by the latest edit — see Offline use and synchronization .