API referenceAdministration

Administration — API reference

Tenancy, members & auth, personas, settings & LLM connections, retention, and the audit log.

Generated from the live OpenAPI schema (version 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

FieldTypeRequiredDescription
tokenstringyes
passwordstringyes
displayNamestring | nullno

Responses

StatusDescription
200Successful Response
422Validation 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

FieldTypeRequiredDescription
currentPasswordstringyes
newPasswordstringyes

Responses

StatusDescription
200Successful Response
422Validation Error

PUT /auth/digest

Set Digest

Set the signed-in user’s persona digest email preference.

Details

Request body (application/json) — required

FieldTypeRequiredDescription
optInbooleanyes
frequencystring | nullno

Responses

StatusDescription
200Successful Response
422Validation 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

StatusDescription
200Successful 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

FieldTypeRequiredDescription
emailstringyes

Responses

StatusDescription
200Successful Response
422Validation Error

PUT /auth/locale

Set Locale

Persist the signed-in user’s preferred UI language.

Details

Request body (application/json) — required

FieldTypeRequiredDescription
localestringyes

Responses

StatusDescription
200Successful Response
422Validation Error

POST /auth/login

Login

Verify email + password, issue a session token, return it with the user profile.

Details

Request body (application/json) — required

FieldTypeRequiredDescription
emailstringyes
passwordstringyes
challengeTokenstring | nullno

Responses

StatusDescription
200Successful Response
422Validation Error

POST /auth/logout

Logout

Revoke the presented session token (best-effort; idempotent).

Details

Responses

StatusDescription
200Successful Response

GET /auth/me

Me

Return the currently authenticated user, or 401 if there is no valid session.

Details

Responses

StatusDescription
200Successful 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

StatusDescription
200Successful 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

FieldTypeRequiredDescription
mfaTokenstringyes
codestring | nullno
recoveryCodestring | nullno

Responses

StatusDescription
200Successful Response
422Validation 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

FieldTypeRequiredDescription
passwordstringyes
codestringyes

Responses

StatusDescription
200Successful Response
422Validation 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

StatusDescription
200Successful Response
422Validation 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

FieldTypeRequiredDescription
passwordstringyes
codestringyes

Responses

StatusDescription
200Successful Response
422Validation 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

FieldTypeRequiredDescription
passwordstringno
codestringyes

Responses

StatusDescription
200Successful Response
422Validation Error

GET /auth/password-policy

Password Policy

The set-password rules the server will actually enforce: {minLength, breachCheck}.

Details

Responses

StatusDescription
200Successful Response

PUT /auth/persona

Set Persona

Record the signed-in user’s persona lens.

Details

Request body (application/json) — required

FieldTypeRequiredDescription
personaKeystring | nullno
dismissedbooleanno

Responses

StatusDescription
200Successful Response
422Validation 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

FieldTypeRequiredDescription
tokenstringyes
newPasswordstringyes

Responses

StatusDescription
200Successful Response
422Validation Error

GET /auth/reset-password/validate

Validate Reset Token

Cheap pre-flight check the reset page runs before showing its form.

Details

Parameters

ParameterInTypeRequiredDescription
tokenquerystringno

Responses

StatusDescription
200Successful Response
422Validation Error

GET /auth/sessions

List Sessions

The caller’s OWN live sessions — “where am I signed in”.

Details

Responses

StatusDescription
200Successful Response

POST /auth/sessions/revoke-all

Revoke All Sessions

Sign out everywhere. Returns {"revoked": n} — how many sessions were actually ended.

Details

Parameters

ParameterInTypeRequiredDescription
includeCurrentquerybooleanno

Responses

StatusDescription
200Successful Response
422Validation 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

ParameterInTypeRequiredDescription
session_idpathstringyes

Responses

StatusDescription
200Successful Response
422Validation Error

GET /auth/sso/connections

List Connections

List this company’s SSO connections (client secrets never returned).

Details

Responses

StatusDescription
200Successful 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

StatusDescription
200Successful Response

GET /auth/sso/connections/{connection_id}

Get Connection

Read one connection (company-scoped; client secret never returned).

Details

Parameters

ParameterInTypeRequiredDescription
connection_idpathstringyes

Responses

StatusDescription
200Successful Response
422Validation 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

ParameterInTypeRequiredDescription
connection_idpathstringyes

Responses

StatusDescription
200Successful Response
422Validation Error

DELETE /auth/sso/connections/{connection_id}

Delete Connection

Delete a connection and its domain mappings (company-scoped).

Details

Parameters

ParameterInTypeRequiredDescription
connection_idpathstringyes

Responses

StatusDescription
200Successful Response
422Validation 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

ParameterInTypeRequiredDescription
connection_idpathstringyes

Responses

StatusDescription
200Successful Response
422Validation 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

ParameterInTypeRequiredDescription
codequerystringno
statequerystringno

Responses

StatusDescription
200Successful Response
422Validation 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

ParameterInTypeRequiredDescription
emailquerystringno

Responses

StatusDescription
200Successful Response
422Validation 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

StatusDescription
200Successful Response

GET /auth/sso/saml/{connection_id}/metadata

Sso Saml Metadata

SP metadata XML for the IdP administrator (application/xml).

Details

Parameters

ParameterInTypeRequiredDescription
connection_idpathstringyes

Responses

StatusDescription
200Successful Response
422Validation Error

GET /auth/sso/{connection_id}/start

Sso Start

Begin an SSO login: build the authz redirect and 302 to the IdP.

Details

Parameters

ParameterInTypeRequiredDescription
connection_idpathstringyes
redirectquerystringno

Responses

StatusDescription
200Successful Response
422Validation Error

GET /me/workspace

Workspace

Single bootstrap contract the SPA renders its shell from.

Details

Responses

StatusDescription
200Successful Response

tenancy

GET /companies

List Companies

Details

Responses

StatusDescription
200Successful Response

GET /memberships

List Memberships

Details

Parameters

ParameterInTypeRequiredDescription
user_idquerystring | nullno

Responses

StatusDescription
200Successful Response
422Validation Error

GET /orgs

List Orgs

Details

Parameters

ParameterInTypeRequiredDescription
company_idquerystring | nullno

Responses

StatusDescription
200Successful Response
422Validation 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

FieldTypeRequiredDescription
namestringyes
slugstring | nullno

Responses

StatusDescription
200Successful Response
422Validation Error

PATCH /orgs/{org_id}

Update Org

Rename an org (or update its slug) within the caller’s company.

Details

Parameters

ParameterInTypeRequiredDescription
org_idpathstringyes

Request body (application/json) — required

FieldTypeRequiredDescription
namestring | nullno
slugstring | nullno

Responses

StatusDescription
200Successful Response
422Validation Error

GET /overview

Overview

Tenancy tree (companies → orgs → projects) with per-project session counts.

Details

Responses

StatusDescription
200Successful Response

GET /projects

List Projects

Details

Parameters

ParameterInTypeRequiredDescription
org_idquerystring | nullno

Responses

StatusDescription
200Successful Response
422Validation Error

POST /projects

Create Project

Create a new project under an org.

Details

Request body (application/json) — required

FieldTypeRequiredDescription
namestringyes
org_idstring | nullno
slugstring | nullno

Responses

StatusDescription
200Successful Response
422Validation Error

GET /projects/current

Current Project

Report the project THIS connection is scoped to.

Details

Responses

StatusDescription
200Successful Response

GET /projects/{project_id}

Get Project

Details

Parameters

ParameterInTypeRequiredDescription
project_idpathstringyes

Responses

StatusDescription
200Successful Response
422Validation Error

PATCH /projects/{project_id}

Update Project

Details

Parameters

ParameterInTypeRequiredDescription
project_idpathstringyes

Request body (application/json) — required

FieldTypeRequiredDescription
namestring | nullno
slugstring | nullno
archivedboolean | nullno
org_idstring | nullno

Responses

StatusDescription
200Successful Response
422Validation Error

DELETE /projects/{project_id}

Delete Project

Delete a project and every data-plane row scoped to it.

Details

Parameters

ParameterInTypeRequiredDescription
project_idpathstringyes

Responses

StatusDescription
200Successful Response
422Validation 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

ParameterInTypeRequiredDescription
project_idpathstringyes

Request body (application/json) — required

FieldTypeRequiredDescription
favoritebooleanyes

Responses

StatusDescription
200Successful Response
422Validation Error

GET /users

List Users

Details

Parameters

ParameterInTypeRequiredDescription
company_idquerystring | nullno

Responses

StatusDescription
200Successful Response
422Validation Error

members

GET /members

List Members

List the caller company’s members (directory users + their status/role).

Details

Responses

StatusDescription
200Successful Response

POST /members/bulk-orgs

Bulk Set Orgs

Assign org access to several members at once.

Details

Request body (application/json) — required

FieldTypeRequiredDescription
userIdsstring[]yes
orgIdsstring[] | nullno
allOrgsbooleanno

Responses

StatusDescription
200Successful Response
422Validation 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

FieldTypeRequiredDescription
userIdsstring[]yes
personaKeystring | nullno

Responses

StatusDescription
200Successful Response
422Validation 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

FieldTypeRequiredDescription
emailstringyes
displayNamestring | nullno
rolestringno
orgIdsstring[] | nullno
allOrgsbooleanno
personaKeystring | nullno

Responses

StatusDescription
200Successful Response
422Validation 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

ParameterInTypeRequiredDescription
user_idpathstringyes

Request body (application/json) — required

FieldTypeRequiredDescription
rolestring | nullno
statusstring | nullno
personaDefaultstring | nullno

Responses

StatusDescription
200Successful Response
422Validation Error

DELETE /members/{user_id}

Remove Member

Remove a member (delete the directory user + revoke their sessions).

Details

Parameters

ParameterInTypeRequiredDescription
user_idpathstringyes

Responses

StatusDescription
200Successful Response
422Validation Error

GET /members/{user_id}/activity

Member Activity

Lifecycle timeline for one member: the tenant audit events targeting them.

Details

Parameters

ParameterInTypeRequiredDescription
user_idpathstringyes

Responses

StatusDescription
200Successful Response
422Validation 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

ParameterInTypeRequiredDescription
user_idpathstringyes

Request body (application/json) — required

FieldTypeRequiredDescription
orgIdsstring[] | nullno
allOrgsbooleanno

Responses

StatusDescription
200Successful Response
422Validation 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

ParameterInTypeRequiredDescription
user_idpathstringyes

Responses

StatusDescription
200Successful Response
422Validation Error

personas

GET /personas

Get Personas

List the personas (lenses) available to the caller’s tenant — powers the switcher/modal.

Details

Responses

StatusDescription
200Successful Response

POST /personas

Create Persona Route

Create a tenant-authored (custom) persona lens. Admin + custom_personas (Silver+).

Details

Request body (application/json) — required

FieldTypeRequiredDescription
namestringyes
descriptionstring | nullno
focusAreasstring[]no
homestringno
defaultRangestringno
navPersonaNavInputno
dashboardIdsstring[]no

Responses

StatusDescription
200Successful Response
422Validation 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

ParameterInTypeRequiredDescription
keypathstringyes

Request body (application/json) — required

FieldTypeRequiredDescription
namestring | nullno
descriptionstring | nullno
focusAreasstring[] | nullno
homestring | nullno
defaultRangestring | nullno
navPersonaNavInput | nullno
dashboardIdsstring[] | nullno

Responses

StatusDescription
200Successful Response
422Validation 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

ParameterInTypeRequiredDescription
keypathstringyes

Responses

StatusDescription
200Successful Response
422Validation Error

settings

GET /llm-connections

List Llm Connections

Details

Responses

StatusDescription
200Successful Response

POST /llm-connections

Create Llm Connection

Details

Request body (application/json) — required

FieldTypeRequiredDescription
namestring | nullno
providerstring | nullno
modelstring | nullno
baseUrlstring | nullno
credentialstring | nullno
credentialMethodstring | nullno
secretRefstring | nullno
requestsPerMinuteinteger | nullno
scopeTypestring | nullno
scopeIdsstring[] | nullno
isDefaultboolean | nullno
optionsobject | nullno

Responses

StatusDescription
200Successful Response
422Validation 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

FieldTypeRequiredDescription
idstring | nullno
providerstring | nullno
baseUrlstring | nullno
credentialstring | nullno
credentialMethodstring | nullno
secretRefstring | nullno

Responses

StatusDescription
200Successful Response
422Validation 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

FieldTypeRequiredDescription
idstring | nullno
providerstring | nullno
modelstring | nullno
baseUrlstring | nullno
credentialstring | nullno
credentialMethodstring | nullno
secretRefstring | nullno
requestShapestring | nullno
invokePathstring | nullno
authstring | nullno
outputJsonpathstring | nullno
methodstring | nullno

Responses

StatusDescription
200Successful Response
422Validation Error

PATCH /llm-connections/{conn_id}

Update Llm Connection

Details

Parameters

ParameterInTypeRequiredDescription
conn_idpathstringyes

Request body (application/json) — required

FieldTypeRequiredDescription
namestring | nullno
providerstring | nullno
modelstring | nullno
baseUrlstring | nullno
credentialstring | nullno
credentialMethodstring | nullno
secretRefstring | nullno
requestsPerMinuteinteger | nullno
scopeTypestring | nullno
scopeIdsstring[] | nullno
isDefaultboolean | nullno
optionsobject | nullno

Responses

StatusDescription
200Successful Response
422Validation Error

DELETE /llm-connections/{conn_id}

Delete Llm Connection

Details

Parameters

ParameterInTypeRequiredDescription
conn_idpathstringyes

Responses

StatusDescription
200Successful Response
422Validation Error

GET /settings

Get Settings

Details

Responses

StatusDescription
200Successful Response

GET /settings/api-keys

List Api Keys

Details

Responses

StatusDescription
200Successful Response

POST /settings/api-keys

Create Api Key

Details

Request body (application/json) — required

FieldTypeRequiredDescription
namestringyes
rolestringno
mfaCodestring | nullno

Responses

StatusDescription
200Successful Response
422Validation Error

POST /settings/api-keys/revoke

Revoke Api Key

Details

Request body (application/json) — required

FieldTypeRequiredDescription
idstringyes

Responses

StatusDescription
200Successful Response
422Validation Error

preferences

GET /preferences/table-columns

Get Table Columns

Details

Parameters

ParameterInTypeRequiredDescription
viewquerystringyes

Responses

StatusDescription
200Successful Response
422Validation Error

PUT /preferences/table-columns

Put Table Columns

Details

Request body (application/json) — required

FieldTypeRequiredDescription
viewstringyes
columnsstring[]yes

Responses

StatusDescription
200Successful Response
422Validation Error

onboarding

POST /onboarding/complete

Complete Onboarding

Details

Responses

StatusDescription
200Successful Response

POST /onboarding/dismiss

Dismiss Onboarding

Details

Responses

StatusDescription
200Successful Response

POST /onboarding/provision

Provision Onboarding

Details

Responses

StatusDescription
200Successful Response

GET /onboarding/status

Get Onboarding Status

Details

Responses

StatusDescription
200Successful Response

GET /onboarding/tenant

Get Tenant Onboarding

Details

Responses

StatusDescription
200Successful Response

POST /onboarding/tenant/ack

Ack Tenant Step

Mark a checklist step acknowledged by the admin (idempotent).

Details

Request body (application/json) — required

FieldTypeRequiredDescription
stepstringyes

Responses

StatusDescription
200Successful Response
422Validation Error

POST /onboarding/tenant/complete

Complete Tenant Onboarding

Details

Responses

StatusDescription
200Successful Response

POST /onboarding/tenant/dismiss

Dismiss Tenant Onboarding

Details

Responses

StatusDescription
200Successful Response

retention

GET /retention/erasure

List Erasures

List erasure requests for the tenant, newest first (compliance evidence register).

Details

Parameters

ParameterInTypeRequiredDescription
limitqueryintegerno
offsetqueryintegerno

Responses

StatusDescription
200Successful Response
422Validation 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

FieldTypeRequiredDescription
session_idsstring[] | nullno
conversation_idsstring[] | nullno
subject_keystring | nullno
subject_valuestring | nullno
project_idstring | nullno
reasonstring | nullno

Responses

StatusDescription
200Successful Response
422Validation Error

GET /retention/erasure/{request_id}

Get Erasure

Details

Parameters

ParameterInTypeRequiredDescription
request_idpathstringyes

Responses

StatusDescription
200Successful Response
422Validation 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

StatusDescription
200Successful 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

FieldTypeRequiredDescription
scope_typestringyes
scope_idstring | nullno
retention_daysintegerno
enabledbooleanno

Responses

StatusDescription
200Successful Response
422Validation Error

DELETE /retention/policies/{policy_id}

Delete Policy

Delete a retention policy (the scope reverts to the next-coarser effective window).

Details

Parameters

ParameterInTypeRequiredDescription
policy_idpathstringyes

Responses

StatusDescription
200Successful Response
422Validation 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

ParameterInTypeRequiredDescription
actionquerystring | nullno
actorIdquerystring | nullno
actorTypequerystring | nullno
targetTypequerystring | nullno
orgIdquerystring | nullno
projectIdquerystring | nullno
statusquerystring | nullno
qquerystring | nullno
rangequerystringno
fromquerystring | nullno
toquerystring | nullno
sortByquerystringno
sortDirquerystringno
limitqueryintegerno
offsetqueryintegerno

Responses

StatusDescription
200Successful Response
422Validation 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

ParameterInTypeRequiredDescription
rangequerystringno
fromquerystring | nullno
toquerystring | nullno
grainquerystring | nullno

Responses

StatusDescription
200Successful Response
422Validation Error