Endpoints

Every path below is relative to /api/v1. For request and response schemas, use the OpenAPI explorer or fetch /api/v1/openapi.json.

This table is maintained by hand and covers /api/v1 only. The generated contract — both surfaces, with schemas — is described in OpenAPI and client generation, which is also where to start if you would rather generate a client than write one.

"User only" means the route rejects API keys with 403 A user session is required.

Operations

GET/healthnone

Organizations

Every organization route requires a user session.

GET/organizationssessionuser only
POST/organizationssessionuser only
GET/organizations/{organizationId}project:readuser only
PATCH/organizations/{organizationId}organization:updateuser only
DELETE/organizations/{organizationId}organization:deleteuser only
POST/organizations/{organizationId}/restoreorganization:deleteuser only

GET /organizations accepts ?state=active|archived|all. Creating an organization makes you its owner. Archiving clears the caller's active organization.

Projects

GET/organizations/{organizationId}/projectsproject:read
POST/organizations/{organizationId}/projectsproject:write
GET/projects/{projectId}project:read
PATCH/projects/{projectId}project:write
DELETE/projects/{projectId}project:delete
POST/projects/{projectId}/restoreproject:delete

Creating a project also creates its three environments. GET /projects/{projectId} includes the environment list. Organization-level routes are for people only: an API key is refused even when it holds *.

API keys

GET/projects/{projectId}/api-keysproject:read
POST/projects/{projectId}/api-keyscredentials:manageuser only
GET/projects/{projectId}/api-keys/{keyId}project:read
POST/projects/{projectId}/api-keys/{keyId}/revokecredentials:manageuser only

The creation response contains the raw key in data.secret exactly once.

Configuration

GET/environments/{environmentId}/configsconfig:read
GET/environments/{environmentId}/configs/{key}config:reveal / config:read
PUT/environments/{environmentId}/configs/{key}config:write
DELETE/environments/{environmentId}/configs/{key}config:write
POST/environments/{environmentId}/configs/{key}/restoreconfig:write

Reading one value needs config:reveal for users but only config:read for API keys. List responses always mask secrets.

Accounting

POST/projects/{projectId}/usage-eventsusage:write
GET/projects/{projectId}/analytics/summaryusage:read AND billing:read
GET/projects/{projectId}/analytics/activityusage:read AND billing:read
GET/projects/{projectId}/analytics/subjectsusage:read AND billing:read
GET/projects/{projectId}/subjects/{subjectId}/activityusage:read AND billing:read

Analytics requires both permissions. Usage replays return 200 with duplicate: true.

/analytics/activity returns daily active-subject, usage, and revenue trends — days is 7–90, default 30. /analytics/subjects is the paginated subject directory — days 7–365, plus q, sort, limit, and offset — and is the only list route that answers with { total, limit, offset, subjects } instead of a bare array. /subjects/{subjectId}/activity is one subject's series, meters, billing state, and 50 most recent events. All four accept an optional environmentId; the semantics are in Usage and billing.

Audit

GET/projects/{projectId}/audit-logsproject:read

Latest 100 entries, newest first.

OAuth clients

All three require a user session.

GET/projects/{projectId}/oidc-clientsproject:readuser only
POST/projects/{projectId}/oidc-clientscredentials:manageuser only
POST/projects/{projectId}/oidc-clients/{clientId}/disablecredentials:manageuser only

The creation response contains clientSecret once, and null for native clients.

Billing

GET/environments/{environmentId}/stripe-connectionbilling:read
PUT/environments/{environmentId}/stripe-connectionbilling:writeuser only
GET/projects/{projectId}/billing/plansbilling:read
POST/projects/{projectId}/billing/plansbilling:write
POST/projects/{projectId}/billing/checkoutbilling:write
GET/projects/{projectId}/subjects/{subjectId}/entitlementsbilling:read
POST/projects/{projectId}/subjects/{subjectId}/entitlement-grantsbilling:write

Checkout requires an idempotency-key header of 16–255 characters.

Subjects

DELETE/projects/{projectId}/subjects/{subjectId}/accessusers:write
POST/projects/{projectId}/subjects/{subjectId}/accessusers:write
DELETE/projects/{projectId}/subjects/{subjectId}users:write

DELETE …/access removes one product's access: it cancels the subject's subscriptions, revokes this project's OAuth grants and entitlement grants, and blocks checkout. POST …/access restores it. Both are safe to repeat.

DELETE /projects/{projectId}/subjects/{subjectId} deletes the Gate identity behind a subject id, along with its sessions, linked accounts, memberships, and OAuth tokens and consents. Billing and accounting rows are keyed on the opaque subject id and are deliberately kept.

Only a project the subject actually signed into may delete it: one of the caller project's OIDC clients must hold either a consent or a refresh token from that user, or the answer is 403. Both count, because a client marked skip_consent never writes a consent row. Without this rule, one project could delete an identity shared with every other Evonia product.

Webhooks

POST/webhooks/stripe/{environmentId}none — signature verified

Unauthenticated. Verified against the webhook secret stored for that environment.

Documentation

GET/docsnone
GET/openapi.jsonnone

/api/v1/docs is the Swagger UI, also reachable at /docs/api-reference.

Protocol routes

These live under /api/auth, outside /api/v1, and are served by better-auth.

PurposePath
Authorization/api/auth/oauth2/authorize
Token/api/auth/oauth2/token
User info/api/auth/oauth2/userinfo
Introspection/api/auth/oauth2/introspect
Revocation/api/auth/oauth2/revoke
End session/api/auth/oauth2/end-session
Consent/api/auth/oauth2/consent
OIDC discovery/.well-known/openid-configuration
OAuth metadata/.well-known/oauth-authorization-server
JSON Web Keys/.well-known/jwks.json