Administration — API reference
Tenancy, members & auth, personas, settings & LLM connections, retention, and the audit log.
0.16.6). Download the full spec at /docs/openapi.json.auth
POST /auth/accept-invite
Accept Invite
Activate an invited user: set their password from a one-time token, log them in.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
token | string | yes | |
password | string | yes | |
displayName | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /auth/change-password
Change Password
Change the signed-in user’s password after re-verifying the current one.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
currentPassword | string | yes | |
newPassword | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PUT /auth/digest
Set Digest
Set the signed-in user’s persona digest email preference.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
optIn | boolean | yes | |
frequency | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /auth/digest/test
Send Test Digest
Compose the signed-in user’s persona digest NOW and send it, ignoring the daily cadence.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /auth/forgot-password
Forgot Password
Begin a forgotten-password reset for a registered user. Always returns a uniform 200.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PUT /auth/locale
Set Locale
Persist the signed-in user’s preferred UI language.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
locale | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /auth/login
Login
Verify email + password, issue a session token, return it with the user profile.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | |
password | string | yes | |
challengeToken | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /auth/logout
Logout
Revoke the presented session token (best-effort; idempotent).
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /auth/me
Me
Return the currently authenticated user, or 401 if there is no valid session.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /auth/mfa
Mfa Status
The caller’s own MFA state. Reachable on an mfa_pending session — it is what the
enrolment screen reads to know what to show.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /auth/mfa/challenge
Mfa Challenge
Exchange a nk_mfa_… token + a second factor for a real session. Unauthenticated.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
mfaToken | string | yes | |
code | string | null | no | |
recoveryCode | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /auth/mfa/disable
Mfa Disable
Turn the second factor off, after re-proving BOTH the password and the factor itself.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
password | string | yes | |
code | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /auth/mfa/enroll
Mfa Enroll
Issue a fresh TOTP secret + provisioning URI. Does not enable anything.
Details
Request body (application/json) — required
Schema: EnrollBody.
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /auth/mfa/recovery-codes
Mfa Regenerate Recovery Codes
Replace every outstanding recovery code. Returns the new set, shown once.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
password | string | yes | |
code | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /auth/mfa/verify
Mfa Verify
Confirm a code against the PENDING secret, then enable MFA and mint the recovery codes.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
password | string | no | |
code | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /auth/password-policy
Password Policy
The set-password rules the server will actually enforce: {minLength, breachCheck}.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
PUT /auth/persona
Set Persona
Record the signed-in user’s persona lens.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
personaKey | string | null | no | |
dismissed | boolean | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /auth/reset-password
Reset Password
Complete a forgotten-password reset from a one-time token, then sign the user in.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
token | string | yes | |
newPassword | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /auth/reset-password/validate
Validate Reset Token
Cheap pre-flight check the reset page runs before showing its form.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
token | query | string | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /auth/sessions
List Sessions
The caller’s OWN live sessions — “where am I signed in”.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /auth/sessions/revoke-all
Revoke All Sessions
Sign out everywhere. Returns {"revoked": n} — how many sessions were actually ended.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
includeCurrent | query | boolean | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
DELETE /auth/sessions/{session_id}
Revoke Session
Revoke ONE of the caller’s own sessions — the “I don’t recognise that device” action.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
session_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /auth/sso/connections
List Connections
List this company’s SSO connections (client secrets never returned).
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /auth/sso/connections
Create Connection
Create an SSO connection for this company. Protocol-specific required fields are validated before the store persists (and Fernet-encrypts any client secret).
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /auth/sso/connections/{connection_id}
Get Connection
Read one connection (company-scoped; client secret never returned).
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PATCH /auth/sso/connections/{connection_id}
Update Connection
Patch a connection (company-scoped). A raw oidcClientSecret is encrypted by the store; a
supplied required field may not be blanked.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
DELETE /auth/sso/connections/{connection_id}
Delete Connection
Delete a connection and its domain mappings (company-scoped).
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PUT /auth/sso/connections/{connection_id}/domains
Set Connection Domains
Set the email domains routed to this connection (home-realm discovery). A domain already claimed by another company hits the UNIQUE index — surfaced as a clean 409.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /auth/sso/oidc/callback
Sso Oidc Callback
OIDC authorization-code callback: consume state, exchange the code with PKCE, fully validate the id_token, JIT-provision, and deliver the session (or an MFA challenge) to the SPA.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
code | query | string | no | |
state | query | string | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /auth/sso/providers
Sso Providers
Which SSO connection (if any) serves this email’s domain — the login page’s “Sign in with SSO” affordance. No secrets in the response.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
email | query | string | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /auth/sso/saml/acs
Sso Saml Acs
SAML Assertion Consumer Service (SP-initiated POST binding): validate the signed assertion and deliver the session (or an MFA challenge) to the SPA.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /auth/sso/saml/{connection_id}/metadata
Sso Saml Metadata
SP metadata XML for the IdP administrator (application/xml).
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /auth/sso/{connection_id}/start
Sso Start
Begin an SSO login: build the authz redirect and 302 to the IdP.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
connection_id | path | string | yes | |
redirect | query | string | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /me/workspace
Workspace
Single bootstrap contract the SPA renders its shell from.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
tenancy
GET /companies
List Companies
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /memberships
List Memberships
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | query | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /orgs
List Orgs
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
company_id | query | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /orgs
Create Org
Create an org in the caller’s company (admin-gated; enforces the tier’s org cap).
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
slug | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PATCH /orgs/{org_id}
Update Org
Rename an org (or update its slug) within the caller’s company.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
org_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | null | no | |
slug | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /overview
Overview
Tenancy tree (companies → orgs → projects) with per-project session counts.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /projects
List Projects
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
org_id | query | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /projects
Create Project
Create a new project under an org.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
org_id | string | null | no | |
slug | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /projects/current
Current Project
Report the project THIS connection is scoped to.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /projects/{project_id}
Get Project
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PATCH /projects/{project_id}
Update Project
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | null | no | |
slug | string | null | no | |
archived | boolean | null | no | |
org_id | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
DELETE /projects/{project_id}
Delete Project
Delete a project and every data-plane row scoped to it.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PUT /projects/{project_id}/prefs
Set Project Pref
Toggle the current user’s per-user preference for a project (favorite on/off).
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
project_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
favorite | boolean | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /users
List Users
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
company_id | query | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
members
GET /members
List Members
List the caller company’s members (directory users + their status/role).
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /members/bulk-orgs
Bulk Set Orgs
Assign org access to several members at once.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
userIds | string[] | yes | |
orgIds | string[] | null | no | |
allOrgs | boolean | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /members/bulk-persona
Bulk Assign Persona
Set (or clear) the persona DEFAULT for a set of the caller company’s members at once.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
userIds | string[] | yes | |
personaKey | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /members/invite
Invite Member
Invite a new member: create an invited directory user + a one-time activation link.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | |
displayName | string | null | no | |
role | string | no | |
orgIds | string[] | null | no | |
allOrgs | boolean | no | |
personaKey | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PATCH /members/{user_id}
Update Member
Change a member’s role or status (e.g. disable). Scoped to the caller’s company.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
role | string | null | no | |
status | string | null | no | |
personaDefault | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
DELETE /members/{user_id}
Remove Member
Remove a member (delete the directory user + revoke their sessions).
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /members/{user_id}/activity
Member Activity
Lifecycle timeline for one member: the tenant audit events targeting them.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PUT /members/{user_id}/orgs
Set Member Orgs
Assign a member to one or more orgs. A full REPLACE of the member’s org-scoped membership grants, scoped to the caller’s company. Admin-gated.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
orgIds | string[] | null | no | |
allOrgs | boolean | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /members/{user_id}/resend-invite
Resend Invite
Rotate an invited member’s activation token and return a fresh one-time link.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
personas
GET /personas
Get Personas
List the personas (lenses) available to the caller’s tenant — powers the switcher/modal.
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /personas
Create Persona Route
Create a tenant-authored (custom) persona lens. Admin + custom_personas (Silver+).
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
description | string | null | no | |
focusAreas | string[] | no | |
home | string | no | |
defaultRange | string | no | |
nav | PersonaNavInput | no | |
dashboardIds | string[] | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PATCH /personas/{key}
Update Persona Route
Edit a persona. Editing a platform lens flips it to custom provenance (freezing it —
it stops receiving code upgrades); an already-custom lens is edited in place. The always-on
full_workspace escape hatch can’t be customized.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | null | no | |
description | string | null | no | |
focusAreas | string[] | null | no | |
home | string | null | no | |
defaultRange | string | null | no | |
nav | PersonaNavInput | null | no | |
dashboardIds | string[] | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
DELETE /personas/{key}
Delete Persona Route
Delete a custom persona. Deleting a customized platform key resets it to the shipped
default (re-seeded on the next ensure); deleting a purely-custom key also clears it from any
member who had it as a default (they fall back to their role-derived lens). Platform lenses that
were never customized, and full_workspace, can’t be deleted.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
key | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
settings
GET /llm-connections
List Llm Connections
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /llm-connections
Create Llm Connection
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | null | no | |
provider | string | null | no | |
model | string | null | no | |
baseUrl | string | null | no | |
credential | string | null | no | |
credentialMethod | string | null | no | |
secretRef | string | null | no | |
requestsPerMinute | integer | null | no | |
scopeType | string | null | no | |
scopeIds | string[] | null | no | |
isDefault | boolean | null | no | |
options | object | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /llm-connections/list-models
List Llm Connection Models
List the model ids a connection’s provider advertises, for the model picker.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
id | string | null | no | |
provider | string | null | no | |
baseUrl | string | null | no | |
credential | string | null | no | |
credentialMethod | string | null | no | |
secretRef | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /llm-connections/probe
Probe Llm Connection
Live connection probe: makes a real completion through the provider and returns reachability. Used by the UI ‘Test’ action. Never persists anything. A completion that only ran out of token budget (finish_reason=length) still counts as reachable.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
id | string | null | no | |
provider | string | null | no | |
model | string | null | no | |
baseUrl | string | null | no | |
credential | string | null | no | |
credentialMethod | string | null | no | |
secretRef | string | null | no | |
requestShape | string | null | no | |
invokePath | string | null | no | |
auth | string | null | no | |
outputJsonpath | string | null | no | |
method | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PATCH /llm-connections/{conn_id}
Update Llm Connection
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
conn_id | path | string | yes |
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | null | no | |
provider | string | null | no | |
model | string | null | no | |
baseUrl | string | null | no | |
credential | string | null | no | |
credentialMethod | string | null | no | |
secretRef | string | null | no | |
requestsPerMinute | integer | null | no | |
scopeType | string | null | no | |
scopeIds | string[] | null | no | |
isDefault | boolean | null | no | |
options | object | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
DELETE /llm-connections/{conn_id}
Delete Llm Connection
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
conn_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /settings
Get Settings
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /settings/api-keys
List Api Keys
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /settings/api-keys
Create Api Key
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
role | string | no | |
mfaCode | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /settings/api-keys/revoke
Revoke Api Key
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
preferences
GET /preferences/table-columns
Get Table Columns
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
view | query | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
PUT /preferences/table-columns
Put Table Columns
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
view | string | yes | |
columns | string[] | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
onboarding
POST /onboarding/complete
Complete Onboarding
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /onboarding/dismiss
Dismiss Onboarding
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /onboarding/provision
Provision Onboarding
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /onboarding/status
Get Onboarding Status
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
GET /onboarding/tenant
Get Tenant Onboarding
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /onboarding/tenant/ack
Ack Tenant Step
Mark a checklist step acknowledged by the admin (idempotent).
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
step | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /onboarding/tenant/complete
Complete Tenant Onboarding
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST /onboarding/tenant/dismiss
Dismiss Tenant Onboarding
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
retention
GET /retention/erasure
List Erasures
List erasure requests for the tenant, newest first (compliance evidence register).
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | no | |
offset | query | integer | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /retention/erasure
Create Erasure
Submit a GDPR Art. 17 erasure. Validates the selector is non-empty (an empty selector can
never fan out to “erase everything”), records a pending request, and starts the erasure
asynchronously — poll the request for its terminal status and manifest.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
session_ids | string[] | null | no | |
conversation_ids | string[] | null | no | |
subject_key | string | null | no | |
subject_value | string | null | no | |
project_id | string | null | no | |
reason | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /retention/erasure/{request_id}
Get Erasure
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
request_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /retention/policies
List Policies
List the tenant’s retention policies + a preview of the effective retention (days) resolved per project (most-specific-first: project override → company policy → platform env default).
Details
Responses
| Status | Description |
|---|---|
200 | Successful Response |
PUT /retention/policies
Upsert Policy
Create or update a retention policy for a scope. A company policy is forced to the
caller’s own company (its scope_id can’t be spoofed); a project policy requires an
explicit scope_id (the project). retention_days is clamped to >= 0 (0 = keep
forever). Upserts on the unique (scope_type, scope_id) pair.
Details
Request body (application/json) — required
| Field | Type | Required | Description |
|---|---|---|---|
scope_type | string | yes | |
scope_id | string | null | no | |
retention_days | integer | no | |
enabled | boolean | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
DELETE /retention/policies/{policy_id}
Delete Policy
Delete a retention policy (the scope reverts to the next-coarser effective window).
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
policy_id | path | string | yes |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
audit
GET /audit
List Audit
Admin-only tenant audit log. Filterable by action/actor/target/org/project/status,
the canonical time ticker, and a free-text q (substring over summary/target name/
action). Returns {data, meta:{total, limit, offset, facets}}.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
action | query | string | null | no | |
actorId | query | string | null | no | |
actorType | query | string | null | no | |
targetType | query | string | null | no | |
orgId | query | string | null | no | |
projectId | query | string | null | no | |
status | query | string | null | no | |
q | query | string | null | no | |
range | query | string | no | |
from | query | string | null | no | |
to | query | string | null | no | |
sortBy | query | string | no | |
sortDir | query | string | no | |
limit | query | integer | no | |
offset | query | integer | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /audit/trend
Audit Trend
Event-volume trend for the admin audit log: per-day (or per-hour) count of audit events over the selected window. Scoped to the events you can see — your company’s, plus shared-schema events — never another company’s.
Details
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
range | query | string | no | |
from | query | string | null | no | |
to | query | string | null | no | |
grain | query | string | null | no |
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |