Documentation menu

API reference

36 operations in settings. Raw spec: openapi.json.

GET/api/v1/org

GET /api/org — profile fields shown on General settings / the wizard.

Responses

StatusDescription
200

Security: bearer

PATCH/api/v1/org

PATCH /api/org — updates name and/or ticket prefix (Admin:edit). Idempotent; emits `org.updated` + audit row.

Request body

PatchOrgRequest

Responses

StatusDescription
200
422

Security: bearer

GET/api/v1/org/pod-visibility

GET /api/org/pod-visibility — the org's stored matrix; `config` is `{}` when the org never customized (clients fall back to their registry defaults, defaults-first).

Responses

StatusDescription
200

Security: bearer

PUT/api/v1/org/pod-visibility

PUT /api/org/pod-visibility — rewrites the org's matrix (Admin:edit). Emits `org.pod_visibility_updated` + audit row in the same tx.

Request body

PutPodVisibilityRequest

Responses

StatusDescription
200
403
422invalid matrix shape

Security: bearer

PUT/api/v1/settings/ai/byok

PUT /api/settings/ai/byok — seals and stores an API key at rest (Admin:edit + owner/admin standing). Rides the instant-first write path; replays are byte-identical and the trail stores presence flags only.

Request body

PutByokSecretRequest

Responses

StatusDescription
200
403
409idempotency key reused or version conflict
422invalid provider or key

Security: bearer

DELETE/api/v1/settings/ai/byok/{provider}

DELETE /api/settings/ai/byok/{provider} — removes a sealed BYOK key through the same gated path; the write trail keeps the presence snapshot.

Parameters

NameInTypeRequiredDescription
providerpathstringYes

Responses

StatusDescription
200
403
404rls_sparse: no key stored for that provider

Security: bearer

PUT/api/v1/settings/ai/caps

PUT /settings/ai/caps — upsert org-wide or per-user soft/hard caps (audited).

Request body

PutAiCapRequest

Responses

StatusDescription
200
403
422cap validation

Security: bearer

DELETE/api/v1/settings/ai/caps/{cap_id}

DELETE /settings/ai/caps/{cap_id}.

Parameters

NameInTypeRequiredDescription
cap_idpathstringYes

Responses

StatusDescription
200
403
404rls_sparse

Security: bearer

PUT/api/v1/settings/ai/catalog

PUT /settings/ai/catalog — upsert one curated (provider, model) pair.

Request body

PutAiCatalogRequest

Responses

StatusDescription
200
403
409duplicate (provider, model) pair

Security: bearer

DELETE/api/v1/settings/ai/catalog/{entry_id}

DELETE /settings/ai/catalog/{entry_id}.

Parameters

NameInTypeRequiredDescription
entry_idpathstringYes

Responses

StatusDescription
200
403
404rls_sparse

Security: bearer

GET/api/v1/settings/ai/credentials

GET /settings/ai/credentials — the org's credential summaries (admin).

Responses

StatusDescription
200
403

Security: bearer

PUT/api/v1/settings/ai/credentials

PUT /settings/ai/credentials — seal an ORG credential (admin).

Request body

PutAiCredentialRequest

Responses

StatusDescription
200
403
422

Security: bearer

DELETE/api/v1/settings/ai/credentials/{credential_id}

DELETE /settings/ai/credentials/{credential_id} — revoke an ORG credential.

Parameters

NameInTypeRequiredDescription
credential_idpathstringYes

Responses

StatusDescription
200
403
404rls_sparse

Security: bearer

GET/api/v1/settings/ai/decision

settings_ai_decision_overview

Responses

StatusDescription
200
403

Security: bearer

PUT/api/v1/settings/ai/decision/features

settings_ai_decision_features_put

Request body

PutDecisionFeaturesRequest

Responses

StatusDescription
200
403

Security: bearer

PUT/api/v1/settings/ai/decision/{surface_key}/config

settings_ai_decision_config_put

Parameters

NameInTypeRequiredDescription
surface_keypathstringYes

Request body

PutDecisionConfigRequest

Responses

StatusDescription
200
403
422unknown surface, or the config rode a typed refusal (reason rides verbatim)

Security: bearer

POST/api/v1/settings/ai/decision/{surface_key}/preview

settings_ai_decision_preview

Parameters

NameInTypeRequiredDescription
surface_keypathstringYes

Request body

DecisionPreviewRequest

Responses

StatusDescription
200
403

Security: bearer

GET/api/v1/settings/ai/decision/{surface_key}/runs

GET /api/settings/ai/decision/{surface_key}/runs — the shadow run log.

Parameters

NameInTypeRequiredDescription
surface_keypathstringYes
daysquery—NoWindow in days, 1..=90. Default 7 — the log's own window.
limitquery—No

Responses

StatusDescription
200
404

Security: bearer

PUT/api/v1/settings/ai/grants

PUT /settings/ai/grants — upsert one per-surface grant (audited).

Request body

PutAiGrantRequest

Responses

StatusDescription
200
403
422unknown surface or grantee validation

Security: bearer

DELETE/api/v1/settings/ai/grants/{grant_id}

DELETE /settings/ai/grants/{grant_id} — revoke one grant (audited).

Parameters

NameInTypeRequiredDescription
grant_idpathstringYes

Responses

StatusDescription
200
403
404rls_sparse

Security: bearer

GET/api/v1/settings/ai/matrix

GET /settings/ai/matrix — the full admin view.

Responses

StatusDescription
200
403

Security: bearer

PUT/api/v1/settings/ai/model-picks/{surface_key}

PUT /settings/ai/model-picks/{surface_key} — the ORG default pick (owner/admin standing; stored as user_id NULL so every member's resolution falls back onto it when no personal pick holds).

Parameters

NameInTypeRequiredDescription
surface_keypathstringYes

Request body

PutAiPickRequest

Responses

StatusDescription
200
403
404rls_sparse
422model not in the admin allowlist

Security: bearer

GET/api/v1/settings/ai/plugin-surfaces

Org-scoped plugin surfaces registered by THIS org (kind = 'plugin'), for the admin plugin-surface management view. Globally seeded native/internal keys are administrable through the matrix, not here.

Responses

StatusDescription
200
403

Security: bearer

PUT/api/v1/settings/ai/plugin-surfaces

PUT /settings/ai/plugin-surfaces — register (or update) one org-scoped plugin surface (audited, instant-first write path). The registered key is deny-by-default until the grant flow covers it.

Request body

PutAiPluginSurfaceRequest

Responses

StatusDescription
200
403
422surface key validation

Security: bearer

POST/api/v1/settings/ai/plugin-surfaces/{surface_id}/disable

POST /settings/ai/plugin-surfaces/{surface_id}/disable.

Parameters

NameInTypeRequiredDescription
surface_idpathstringYes

Responses

StatusDescription
200
403
404

Security: bearer

POST/api/v1/settings/ai/plugin-surfaces/{surface_id}/enable

POST /settings/ai/plugin-surfaces/{surface_id}/enable.

Parameters

NameInTypeRequiredDescription
surface_idpathstringYes

Responses

StatusDescription
200
403
404

Security: bearer

GET/api/v1/settings/ai/status

GET /api/settings/ai/status — overview of AI completion provider & configured keys.

Responses

StatusDescription
200

Security: bearer

POST/api/v1/settings/ai/test

POST /api/settings/ai/test — test-connection probe (Admin:edit gated). None mode returns the typed unavailable outcome; a configured provider verifies its sealed key still decrypts (tamper/rotation check). No vendor HTTP call happens in v1 — the live probe rides the edge adapters when a lane wires them.

Request body

TestConnectionRequest

Responses

StatusDescription
200
403

Security: bearer

GET/api/v1/settings/ai/usage/org

GET /settings/ai/usage/org — org progress roll-up (admin).

Responses

StatusDescription
200
403

Security: bearer

GET/api/v1/settings/org

GET /api/settings/org — effective org settings (defaults overlaid by stored overrides). Visible to every member.

Responses

StatusDescription
200

Security: bearer

PUT/api/v1/settings/org

PUT /api/settings/org — upserts one org-scope override after registry validation (Admin:edit required). Emits `setting.updated` + audit row.

Request body

UpdateSettingRequest

Responses

StatusDescription
200
403
422unknown key or invalid value

Security: bearer

GET/api/v1/settings/registry

GET /api/settings/registry — every declared setting with kind, default, scope and validation shape. Any authenticated member may read it.

Responses

StatusDescription
200

Security: bearer

GET/api/v1/settings/self-host

GET /api/v1/settings/self-host — the self-hoster visibility payload.

Responses

StatusDescription
200
403requires an org owner or admin

Security: bearer

GET/api/v1/settings/user

GET /api/settings/user — the caller's effective personal settings.

Responses

StatusDescription
200

Security: bearer

PUT/api/v1/settings/user

PUT /api/settings/user — upserts one of the CALLER's own user-scope overrides. No role requirement: everyone may tune their own preferences.

Request body

UpdateSettingRequest

Responses

StatusDescription
200
422unknown key or invalid value

Security: bearer

GET/api/v1/settings/user/email-envelope

GET /api/settings/user/email-envelope — the caller's resolved envelope, for the signature editor's live preview and the composer's prefill.

Responses

StatusDescription
200

Security: bearer