Documentation menu

API reference

23 operations in secrets. Raw spec: openapi.json.

GET/api/v1/secrets/folders

GET /api/secrets/folders — metadata-only category tree.

Parameters

NameInTypeRequiredDescription
client_idquery—NoClient-scope tree; omitted = org-scope tree.

Responses

StatusDescription
200

Security: bearer

POST/api/v1/secrets/folders

secrets_folders_create

Request body

CreateSecretFolderRequest

Responses

StatusDescription
200
409slug already exists in this scope
422validation error

Security: bearer

PATCH/api/v1/secrets/folders/{id}

secrets_folders_update

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

UpdateSecretFolderRequest

Responses

StatusDescription
200
404folder not visible in scope
409the shipped default is immutable; fork instead

Security: bearer

DELETE/api/v1/secrets/folders/{id}

secrets_folders_delete

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200deleted
404folder not visible in scope
409seed refusal or non-empty subtree

Security: bearer

POST/api/v1/secrets/folders/{id}/fork

POST /api/secrets/folders/{id}/fork — fork-the-seed customization (a NEW row graph in the client's scope, never edit-in-place, ADR 0004).

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

ForkSecretFolderRequest

Responses

StatusDescription
200
404source folder or client not visible in scope
409a fork of that slug already exists

Security: bearer

GET/api/v1/secrets/grants

GET /api/secrets/grants — the grant matrix reads for admins (Owner or Admin only; grants are policy data, not vault contents).

Responses

StatusDescription
200
403grant administration is Owner/Admin only

Security: bearer

PUT/api/v1/secrets/grants

PUT /api/secrets/grants — upserts ONE role × folder grant row (can_edit implies read). Owner/Admin only.

Request body

SetSecretGrantRequest

Responses

StatusDescription
200
403grant administration is Owner/Admin only
404folder or role not visible in scope
422validation error

Security: bearer

DELETE/api/v1/secrets/grants

DELETE /api/secrets/grants?role_id=&folder_id= — revoke one grant.

Parameters

NameInTypeRequiredDescription
role_idquerystringYes
folder_idquerystringYes

Responses

StatusDescription
200deleted
403grant administration is Owner/Admin only
404grant not found

Security: bearer

GET/api/v1/secrets/records

GET /api/secrets/records — metadata-only vault rows.

Parameters

NameInTypeRequiredDescription
client_idquery—NoClient-scope records; omitted = org-scope.
folder_idquery—No

Responses

StatusDescription
200

Security: bearer

POST/api/v1/secrets/records

POST /api/secrets/records — seals fields with coordinate AAD; instant-first (IF1–IF3) when an idempotency key rides the request.

Request body

CreateSecretRecordRequest

Responses

StatusDescription
200
403restricted category gate denied
409title already exists in this folder / idempotency key reused
422validation error

Security: bearer

POST/api/v1/secrets/records/bulk

POST /api/secrets/records/bulk — the chunked worker path.

Request body

BulkSecretIngestRequest

Responses

StatusDescription
200
403restricted category gate denied
422chunk over cap / validation error
429org write budget exhausted

Security: bearer

GET/api/v1/secrets/records/{id}

GET /api/secrets/records/{id} — metadata only.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200
404record not visible in scope

Security: bearer

PATCH/api/v1/secrets/records/{id}

PATCH /api/secrets/records/{id} — metadata + field rotation/clear (`value: null` clears — A5); instant-first envelope (IF1–IF3).

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

UpdateSecretRecordRequest

Responses

StatusDescription
200
403restricted category gate denied
404record not visible in scope
409title collision / version conflict / idempotency key reused
422validation error

Security: bearer

DELETE/api/v1/secrets/records/{id}

DELETE /api/secrets/records/{id} — records retire; their fields cascade; the audit keeps the trail.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200deleted
403restricted category gate denied
404record not visible in scope

Security: bearer

GET/api/v1/secrets/records/{id}/file

GET /api/secrets/records/{id}/file — the reveal-file path (document kind ONLY): requires `secrets:edit` + the category gate (the same posture as field reveal), decrypts the object-store ciphertext, and emits `secret.revealed` in-commit with the read. The response is the sole carrier of the plaintext bytes.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200
403restricted category gate denied
404record or object not found
409record has no stored file

Security: bearer

PUT/api/v1/secrets/records/{id}/file

PUT /api/secrets/records/{id}/file — document-kind ONLY. Seals the uploaded bytes (AAD-bound to the record coordinate), PUTs the ciphertext to the object store behind the core-store S3/local seam, and pins the pointer + hash + byte length on the record in the same tx (event emitted in-commit).

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

string

Responses

StatusDescription
200
403restricted category gate denied
404record not visible in scope
422record is not document-kind / body over cap

Security: bearer

POST/api/v1/secrets/records/{id}/reveal

POST /api/secrets/records/{id}/reveal — the ONLY plaintext path, mirroring `/passwords/{id}/reveal`: requires `secrets:edit`, runs inside the org tx so the reveal event commits atomically with the read, decrypts with coordinate AAD first (falling back to the legacy seal for rows the deterministic importer forwarded) and the response is the sole carrier of the decrypted fields.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200
403reveal requires secrets:edit (and a category grant on restricted chains)
404record not visible in scope

Security: bearer