REST API

Every Cerberus API endpoint, grouped by area, with the interactive OpenAPI reference.

The Cerberus API publishes an OpenAPI 3.0 contract, docs/contracts/openapi.json in the cerberus-api repository. CI checks that the running application still produces exactly that contract, and the Flutter client generates its HTTP client from it (see Client architecture ). This site carries a copy, rendered at the bottom of this page.

Two kinds of authorization

The contract describes itself in one sentence: identity authentication and vault access are separate. Signing in through Heimdall yields a bearer token that proves who the caller is; it opens nothing. Reading or changing vault content additionally needs a short-lived vault access proof that only a client holding the vault keys can produce. See Authentication and vault access .

flowchart LR
    C[Client] -- "Authorization: Bearer (Heimdall token)" --> A{{Cerberus API}}
    C -- "X-Cerberus-Vault-Access (handle from a signed challenge)" --> A
    A -- "identity calls" --> H[(Heimdall)]
    A -- "ciphertext + metadata" --> D[(PostgreSQL)]
HeaderCarries
Authorization: Bearer …The Heimdall token — a person’s, or an application’s for GET /api/software-secrets only.
X-Cerberus-Vault-AccessThe vault-access handle, on every request that reads or changes vault content.
X-Cerberus-Challenge-Id, X-Cerberus-ProofA signed challenge, on proof operations (unlock, profile access, protection change, recovery).

The contract itself declares no security schemes, so the generated reference below does not show these headers. Responses, status codes and error codes are described in Responses and errors ; the use case behind each endpoint is listed in Use cases .

Endpoints by area

Authentication — Auth

MethodPathPurpose
POST/api/auth/loginSign in through Heimdall.
POST/api/auth/2fa/verifyComplete a second-factor challenge.
POST/api/auth/closure/loginSign in to an account that is pending closure (to cancel it).
POST/api/auth/closure/2fa/verifySecond factor for the closure sign-in.

Account — Account, AccountExport, Identity

MethodPathPurpose
POST/api/accountsRegister a Cerberus account.
GET/api/accounts/meGet the signed-in account.
PUT/api/accounts/meUpdate the account.
PUT/api/identity/meUpdate identity details held by Heimdall.
GET/api/accounts/me/offline-policyRead the offline renewal policy.
PUT/api/accounts/me/offline-policyChange or disable the offline renewal policy.
POST/api/accounts/me/closureRequest account closure (30-day grace period).
POST/api/accounts/me/closure/cancelCancel a pending closure.
DELETE/api/accounts/me/permanentPermanently delete the account now.
POST/api/accounts/me/exportExport the account’s data.

Vault protection — Vault

MethodPathPurpose
GET/api/vault/protectionRead the vault protection material.
POST/api/vault/protectionInitialize vault protection.
PUT/api/vault/protectionChange vault protection.
POST/api/vault/challengesIssue a vault-access challenge.
POST/api/vault/unlockProve vault access and receive an account-wide vault-access handle.
GET/api/vault/recovery-materialRead the material needed to recover with the recovery key.
POST/api/vault/recoveryRecover vault access with the one-time recovery key.
PUT/api/vault/recoveryRefresh (replace) the recovery key.

Profiles — Profiles

MethodPathPurpose
GET/api/profilesList profiles.
POST/api/profilesCreate a profile.
GET/api/profiles/{id}Get a profile.
PUT/api/profiles/{id}Update a profile.
DELETE/api/profiles/{id}Move a profile to the trash (its records, folders and collections are kept).
PUT/api/profiles/{id}/associationsSet which folders, records and collections the profile contains.
POST/api/profiles/{id}/access/challengesIssue a profile-access challenge.
POST/api/profiles/{id}/accessOpen profile access with a proof; returns a profile-scoped handle.

Records — Records

MethodPathPurpose
GET/api/recordsList records.
POST/api/recordsCreate a record.
GET/api/records/{id}Get a record.
PUT/api/records/{id}Update a record.
DELETE/api/records/{id}Move a record to the trash.
DELETE/api/records/{id}/permanentPermanently delete a record.
PUT/api/records/{id}/folderMove a record to another folder.

Folders — Folders

MethodPathPurpose
GET/api/foldersList folders.
POST/api/foldersCreate a folder.
GET/api/folders/{id}Get a folder.
PUT/api/folders/{id}Update a folder.
DELETE/api/folders/{id}Move a folder to the trash, with its subfolders and records.
PUT/api/folders/{id}/parentMove a folder under another parent.

Collections and sharing — Collections

MethodPathPurpose
GET/api/collectionsList collections.
POST/api/collectionsCreate a collection.
GET/api/collections/{id}Get a collection.
PUT/api/collections/{id}Update a collection.
DELETE/api/collections/{id}Move a collection to the trash and revoke its grants (members are kept).
PUT/api/collections/{id}/membersSet the collection’s member records and folders.
POST/api/collections/{id}/grantsShare the collection with another account, or regrant a revoked share.
PUT/api/collections/{id}/grants/{grantId}Change a share’s access level.
DELETE/api/collections/{id}/grants/{grantId}Revoke a share.

Software access — SoftwareGrants, SoftwareSecrets

MethodPathPurpose
POST/api/software-grantsGrant a software identity read access to selected secrets.
DELETE/api/software-grants/{id}Revoke a software grant.
GET/api/software-secretsRetrieve the ciphertext granted to the calling software.

Offline and synchronization — OfflineAuthorizations, Sync

MethodPathPurpose
POST/api/offline-authorizationsIssue or renew the offline lease for a profile.
GET/api/sync/changesDownload changes since a cursor.
POST/api/sync/editsUpload edits made offline.

Trash — Trash

MethodPathPurpose
GET/api/trashList recoverable trash entries.
POST/api/trash/{id}/restoreRestore a trash entry.
DELETE/api/trashPermanently empty the trash.

Health — Health

MethodPathPurpose
GET/health/liveLiveness probe.
GET/health/readyReadiness probe.
GET/health/detailsDetailed health, for operators holding an operational grant.

See Health probes for what each probe reports.

Interactive reference