HTTP API Reference

Core

MethodEndpointDescription
GET/Server info
GET/healthHealth check
POST/db/queryExecute Cypher: { query, params?, database? }
POST/db/uuidReserve a UUID for 5 minutes (editor/admin)
POST/db/import/cypherImport a Cypher script (admin/editor)
GET/db/{name}/schemaGet database schema
GET/db/{name}/graphGet full graph data
POST/graphqlGraphQL endpoint
ANY/functions/v1/{name}Invoke a stored edge function

Authentication

MethodEndpointDescription
POST/auth/loginLogin, returns JWT tokens
POST/auth/refreshRefresh access token
POST/auth/registerRegister new user
POST/auth/change-passwordChange password
GET/auth/verifyVerify email via token query param
POST/auth/resend-verificationResend the verification email
POST/auth/verify-codeVerify email with the short code from the email
POST/auth/otp/requestRequest a 6-digit OTP for an email
POST/auth/otp/verifyVerify OTP, returns JWT tokens
GET/.well-known/jwks.jsonJWKS public keys

Service Accounts (admin)

MethodEndpointDescription
POST/auth/service-accountsCreate service account
GET/auth/service-accountsList service accounts
GET/auth/service-accounts/{id}Get one
PATCH/auth/service-accounts/{id}Update name / roles
DELETE/auth/service-accounts/{id}Delete account (revokes all keys)
POST/auth/service-accounts/{id}/keysMint a new API key (plaintext returned once)
GET/auth/service-accounts/{id}/keysList keys for an account
DELETE/auth/service-accounts/{id}/keys/{key_id}Revoke an API key

Apps & Projects

MethodEndpointDescription
POST/appsCreate app (server admin) - { slug, name }
GET/appsApps the caller is a member of (server admin: all)
GET/apps/{id|slug}App detail incl. the caller's privilege
PATCH/apps/{id}Rename / enable / disable (app admin)
DELETE/apps/{id}Delete app and cascade its schema (server admin)
GET/apps/{id}/membersList members
PUT/apps/{id}/members/{user}Add or update a member - { privilege } (app admin)
DELETE/apps/{id}/members/{user}Remove a member (app admin)
GET/apps/{id}/labelsLabels bound to the app schema
PUT/apps/{id}/labels/{label}Bind a label (editor+)
DELETE/apps/{id}/labels/{label}Unbind a label (app admin)
GET/apps/{id}/settingsScopable settings with effective value and source
PUT/apps/{id}/settingsSet overrides - { key: value, ... } (app admin)
DELETE/apps/{id}/settings/{key}Remove an override (app admin)
GET/apps/{id}/email-templatesTemplates and whether each is customised
GET/apps/{id}/email-templates/{name}One template (effective parts)
PUT/apps/{id}/email-templates/{name}Override subject / html / text (app admin)
DELETE/apps/{id}/email-templates/{name}Revert to the server default (app admin)
POST/apps/{id}/email-templates/{name}/previewRender with sample values
GET/apps/{id}/exportFull JSON backup of the app (app admin)
POST/apps/import?slug=…Restore a backup as a NEW app (server admin)

Scope any request to an app with the X-Anvil-App: <id|slug> header. See Apps & Projects.

System Settings (admin)

MethodEndpointDescription
GET/system/settingsList all runtime settings
GET/system/settings/{key}Get one setting
PUT/system/settings/{key}Update one (hot-reload, no restart)
DELETE/system/settings/{key}Reset to file / env / default

Document Store

MethodEndpointDescription
GET/docsList collections
POST/docs/{collection}Create collection
DELETE/docs/{collection}Drop collection
GET/docs/{collection}/{id}Get document
PUT/docs/{collection}/{id}Upsert document
DELETE/docs/{collection}/{id}Delete document
POST/docs/{collection}/queryQuery with filters
POST/docs/{collection}/batchBatch operations
GET/docs/{collection}/scanPaginated scan

Cypher equivalents: SHOW COLLECTIONS (name, schema, id, document count), CREATE COLLECTION <name>, DROP COLLECTION <name>. Dropping a collection frees its name for reuse in any schema.

Admin

MethodEndpointDescription
GET/admin/statsServer statistics
GET/admin/usersList users
GET/admin/rolesList roles
GET/admin/eventsQuery event log
GET/admin/slow-queriesRecent slow queries
GET/admin/query-statsQuery frequency analytics