Skip to main content

Admin & operator API

Two management planes: project admin (adminToken) and operator (masterKey). See Operator guide for bootstrapping.

Project-admin — /v1/projects/{project_id}/admin/*​

Secured with adminToken; accepts X-Environment.

AreaEndpoints
UsersGET/POST /users, GET/PATCH/DELETE /users/{id}, /ban, /unban, /password, /verify-email, /verify-phone, /mfa/reset, /sessions[/revoke|/{id}], /identities[/{id}], /grants[/{id}], /roles, /impersonate, /anonymize, /export
App clientsGET/POST /apps, GET/PATCH/DELETE /apps/{id}, /apps/{id}/secrets[/{id}]; desired-state PUT /clients?dry_run&prune
Service accountsCRUD + /secrets (runtime minting: POST /v1/service-accounts/tokens)
API keysCRUD + /rotate
Connections (SSO)SAML/OIDC connection CRUD, /test, /rotate-certificate, /scim/tokens; verified domains
ConfigGET/PUT config (every document at once, ?dry_run), GET/PUT config/{auth, password-policy, session-policy, mfa-policy, rate-limits}, config/public-metadata, features, consents, retention-policy, i18n/{locale}
Signing keysjwks, jwks/rotate, jwks/{key_id}/activate, DELETE jwks/{key_id}; token-profiles[/{id}][/preview]
InvitesGET/POST /invites, POST /invites/{id}/revoke (token shown once)
Webhooks & hookswebhooks[/{id}], /rotate-secret, /test; webhook-deliveries[/{id}/retry]; events[/{id}/replay]; hooks[/{id}][/test]
Audit / jobs / import / exportaudit-logs[/{id}], audit/export; jobs[/{id}][/cancel]; import/users, import/password-hashes/verify; exports/{job_id}
Risk & rate limitsrisk/events, risk/rules[/{id}], rate-limit/blocks[/{id}]
Providersoauth-providers[/{id}], email-providers[/{id}], sms-providers[/{id}][/send-test], email-templates[/{id}][/preview|/send-test]
Access requestsaccess-requests[/{id}/approve|/deny]

Examples​

# List users in the test environment (keyset paginated)
curl "https://auth.example.com/v1/projects/prj_7Fk2/admin/users?limit=50" \
-H "Authorization: Bearer <admin_token>" -H "X-Environment: test"

# Set the session policy
curl -sX PUT https://auth.example.com/v1/projects/prj_7Fk2/admin/config/session-policy \
-H "Authorization: Bearer <admin_token>" -H "Content-Type: application/json" \
-d '{"access_ttl":900,"refresh_ttl":2592000,"idle_timeout":0,"reuse_detection":true}'

# Import users (async job; supply pre-hashed bcrypt passwords)
curl -sX POST https://auth.example.com/v1/projects/prj_7Fk2/admin/import/users \
-H "Authorization: Bearer <admin_token>" -H "Content-Type: application/json" \
-d '{"users":[{"email":"ada@example.com","password_hash":"$2b$12$..."}],"password_hash_format":"bcrypt"}'
# -> { "job_id": "job_...", "status": "running" } ; poll GET .../admin/jobs/{job_id}

Operator — /mgmt/v1/*​

Secured with masterKey.

MethodPath
GET/POST/mgmt/v1/projects
GET/PATCH/DELETE/mgmt/v1/projects/{id}
GET/PUT/mgmt/v1/projects/{id}/features, /environments[/{env}]
GET/POST/DELETE/mgmt/v1/projects/{id}/admin-tokens[/{id}]
POST/mgmt/v1/projects/{id}/config:export | config:plan | config:apply
curl -sX POST https://auth.example.com/mgmt/v1/projects \
-H "Authorization: Bearer $MASTER_KEY" -H "Content-Type: application/json" \
-d '{"name":"Acme","slug":"acme"}'
# -> 201 { "project": { "id": "prj_...", ... } }

Test mode — /v1/test/*​

Secured with adminToken; non-live environments only (a live X-Environment is refused). For deterministic tests:

MethodPath
GET/v1/test/messages?channel&to — captured email/SMS inbox
POST/v1/test/clock — {advance_seconds?, reset?}
POST/v1/test/reset — wipe the environment's data
POST/v1/test/seed — create fixtures