API reference
36 operations in settings. Raw spec: openapi.json.
/api/v1/orgGET /api/org — profile fields shown on General settings / the wizard.
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
/api/v1/orgPATCH /api/org — updates name and/or ticket prefix (Admin:edit). Idempotent; emits `org.updated` + audit row.
Request body
PatchOrgRequest
Responses
| Status | Description |
|---|---|
200 | |
422 |
Security: bearer
/api/v1/org/pod-visibilityGET /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
| Status | Description |
|---|---|
200 |
Security: bearer
/api/v1/org/pod-visibilityPUT /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
| Status | Description |
|---|---|
200 | |
403 | |
422 | invalid matrix shape |
Security: bearer
/api/v1/settings/ai/byokPUT /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
| Status | Description |
|---|---|
200 | |
403 | |
409 | idempotency key reused or version conflict |
422 | invalid provider or key |
Security: bearer
/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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
provider | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 | |
403 | |
404 | rls_sparse: no key stored for that provider |
Security: bearer
/api/v1/settings/ai/capsPUT /settings/ai/caps — upsert org-wide or per-user soft/hard caps (audited).
Request body
PutAiCapRequest
Responses
| Status | Description |
|---|---|
200 | |
403 | |
422 | cap validation |
Security: bearer
/api/v1/settings/ai/caps/{cap_id}DELETE /settings/ai/caps/{cap_id}.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
cap_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 | |
403 | |
404 | rls_sparse |
Security: bearer
/api/v1/settings/ai/catalogPUT /settings/ai/catalog — upsert one curated (provider, model) pair.
Request body
PutAiCatalogRequest
Responses
| Status | Description |
|---|---|
200 | |
403 | |
409 | duplicate (provider, model) pair |
Security: bearer
/api/v1/settings/ai/catalog/{entry_id}DELETE /settings/ai/catalog/{entry_id}.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
entry_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 | |
403 | |
404 | rls_sparse |
Security: bearer
/api/v1/settings/ai/credentialsGET /settings/ai/credentials — the org's credential summaries (admin).
Responses
| Status | Description |
|---|---|
200 | |
403 |
Security: bearer
/api/v1/settings/ai/credentialsPUT /settings/ai/credentials — seal an ORG credential (admin).
Request body
PutAiCredentialRequest
Responses
| Status | Description |
|---|---|
200 | |
403 | |
422 |
Security: bearer
/api/v1/settings/ai/credentials/{credential_id}DELETE /settings/ai/credentials/{credential_id} — revoke an ORG credential.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
credential_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 | |
403 | |
404 | rls_sparse |
Security: bearer
/api/v1/settings/ai/decisionsettings_ai_decision_overview
Responses
| Status | Description |
|---|---|
200 | |
403 |
Security: bearer
/api/v1/settings/ai/decision/featuressettings_ai_decision_features_put
Request body
PutDecisionFeaturesRequest
Responses
| Status | Description |
|---|---|
200 | |
403 |
Security: bearer
/api/v1/settings/ai/decision/{surface_key}/configsettings_ai_decision_config_put
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
surface_key | path | string | Yes |
Request body
PutDecisionConfigRequest
Responses
| Status | Description |
|---|---|
200 | |
403 | |
422 | unknown surface, or the config rode a typed refusal (reason rides verbatim) |
Security: bearer
/api/v1/settings/ai/decision/{surface_key}/previewsettings_ai_decision_preview
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
surface_key | path | string | Yes |
Request body
DecisionPreviewRequest
Responses
| Status | Description |
|---|---|
200 | |
403 |
Security: bearer
/api/v1/settings/ai/decision/{surface_key}/runsGET /api/settings/ai/decision/{surface_key}/runs — the shadow run log.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
surface_key | path | string | Yes | |
days | query | — | No | Window in days, 1..=90. Default 7 — the log's own window. |
limit | query | — | No |
Responses
| Status | Description |
|---|---|
200 | |
404 |
Security: bearer
/api/v1/settings/ai/grantsPUT /settings/ai/grants — upsert one per-surface grant (audited).
Request body
PutAiGrantRequest
Responses
| Status | Description |
|---|---|
200 | |
403 | |
422 | unknown surface or grantee validation |
Security: bearer
/api/v1/settings/ai/grants/{grant_id}DELETE /settings/ai/grants/{grant_id} — revoke one grant (audited).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
grant_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 | |
403 | |
404 | rls_sparse |
Security: bearer
/api/v1/settings/ai/matrixGET /settings/ai/matrix — the full admin view.
Responses
| Status | Description |
|---|---|
200 | |
403 |
Security: bearer
/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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
surface_key | path | string | Yes |
Request body
PutAiPickRequest
Responses
| Status | Description |
|---|---|
200 | |
403 | |
404 | rls_sparse |
422 | model not in the admin allowlist |
Security: bearer
/api/v1/settings/ai/plugin-surfacesOrg-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
| Status | Description |
|---|---|
200 | |
403 |
Security: bearer
/api/v1/settings/ai/plugin-surfacesPUT /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
| Status | Description |
|---|---|
200 | |
403 | |
422 | surface key validation |
Security: bearer
/api/v1/settings/ai/plugin-surfaces/{surface_id}/disablePOST /settings/ai/plugin-surfaces/{surface_id}/disable.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
surface_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 | |
403 | |
404 |
Security: bearer
/api/v1/settings/ai/plugin-surfaces/{surface_id}/enablePOST /settings/ai/plugin-surfaces/{surface_id}/enable.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
surface_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 | |
403 | |
404 |
Security: bearer
/api/v1/settings/ai/statusGET /api/settings/ai/status — overview of AI completion provider & configured keys.
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
/api/v1/settings/ai/testPOST /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
| Status | Description |
|---|---|
200 | |
403 |
Security: bearer
/api/v1/settings/ai/usage/orgGET /settings/ai/usage/org — org progress roll-up (admin).
Responses
| Status | Description |
|---|---|
200 | |
403 |
Security: bearer
/api/v1/settings/orgGET /api/settings/org — effective org settings (defaults overlaid by stored overrides). Visible to every member.
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
/api/v1/settings/orgPUT /api/settings/org — upserts one org-scope override after registry validation (Admin:edit required). Emits `setting.updated` + audit row.
Request body
UpdateSettingRequest
Responses
| Status | Description |
|---|---|
200 | |
403 | |
422 | unknown key or invalid value |
Security: bearer
/api/v1/settings/registryGET /api/settings/registry — every declared setting with kind, default, scope and validation shape. Any authenticated member may read it.
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
/api/v1/settings/self-hostGET /api/v1/settings/self-host — the self-hoster visibility payload.
Responses
| Status | Description |
|---|---|
200 | |
403 | requires an org owner or admin |
Security: bearer
/api/v1/settings/userGET /api/settings/user — the caller's effective personal settings.
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
/api/v1/settings/userPUT /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
| Status | Description |
|---|---|
200 | |
422 | unknown key or invalid value |
Security: bearer
/api/v1/settings/user/email-envelopeGET /api/settings/user/email-envelope — the caller's resolved envelope, for the signature editor's live preview and the composer's prefill.
Responses
| Status | Description |
|---|---|
200 |
Security: bearer