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 service accounts 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:create
GET/projects/{projectId}project:read
PATCH/projects/{projectId}project:update
DELETE/projects/{projectId}project:delete
POST/projects/{projectId}/restoreproject:delete

Creating a project also creates its three environments and the project-admin and member roles. GET /projects/{projectId} includes the environment list.

Service accounts

GET/projects/{projectId}/service-accountscredential:read
POST/projects/{projectId}/service-accountscredential:manageuser only
POST/projects/{projectId}/service-accounts/{accountId}/disablecredential:manageuser only

The creation response contains data.apiKey exactly once.

Configuration

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

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

RBAC

GET/projects/{projectId}/rolesproject:read
POST/projects/{projectId}/rolesproject:update
POST/projects/{projectId}/role-bindingsproject:update
POST/authorizeproject:read

POST /authorize takes projectId in the body, not the path.

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-logsaudit:read

Latest 100 entries, newest first.

OIDC clients

All three require a user session.

GET/projects/{projectId}/oidc-clientscredential:readuser only
POST/projects/{projectId}/oidc-clientscredential:manageuser only
POST/projects/{projectId}/oidc-clients/{clientId}/disablecredential: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:manageuser only
GET/projects/{projectId}/billing/plansbilling:read
POST/projects/{projectId}/billing/plansbilling:manage
POST/projects/{projectId}/billing/checkoutbilling:manage
GET/projects/{projectId}/subjects/{subjectId}/entitlementsbilling:read
POST/projects/{projectId}/subjects/{subjectId}/entitlement-grantsbilling:manage

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

Subjects

DELETE/projects/{projectId}/subjects/{subjectId}credential:manage

Deletes the Gate identity behind a subject id, along with its sessions, linked accounts, memberships, OAuth tokens and consents, and every role binding naming it. 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