Skip to main content
View as Markdown

Endpoint Reference

Every path the Sovrium REST API serves. The authentication model, error envelope and cross-cutting behaviours that govern all of them are in the REST API Overview.

Health

Unauthenticated server health check.

Method Path Description
GET /api/health Check server status

Tables

Read table definitions, and manage outgoing table webhooks.

Method Path Description
GET /api/tables List all tables
GET /api/tables/{tableId} Get table by ID
GET /api/tables/{tableId}/permissions Get table permissions
GET /api/tables/{tableId}/export Export records as CSV
GET /api/tables/{tableId}/webhooks List table webhooks
POST /api/tables/{tableId}/webhooks/{webhookName}/test Send a test delivery
GET /api/tables/{tableId}/webhooks/{webhookName}/deliveries List deliveries
GET .../deliveries/{deliveryId} Get one delivery
POST .../deliveries/{deliveryId}/retry Retry a delivery

Records

Full CRUD, batch operations, soft-delete lifecycle, revision history, comments and realtime. See Records Overview for the data model.

CRUD

Method Path Description
GET /api/tables/{tableId}/records List records
POST /api/tables/{tableId}/records Create a record
GET /api/tables/{tableId}/records/{recordId} Get record by ID
PATCH /api/tables/{tableId}/records/{recordId} Update a record
DELETE /api/tables/{tableId}/records/{recordId} Delete a record

DELETE soft-deletes by default; ?permanent=true (admin only) and ?purge=true hard-delete on the same route. Two form-post equivalents exist for HTML forms: POST .../records/{recordId}/update and POST .../records/{recordId}/delete.

Batch operations

Method Path Description
POST /api/tables/{tableId}/records/batch Create multiple records (1–1000)
PATCH /api/tables/{tableId}/records/batch Update multiple records (1–100)
DELETE /api/tables/{tableId}/records/batch Soft-delete multiple records (1–100)
POST /api/tables/{tableId}/records/batch/delete Soft-delete, alternate verb
POST /api/tables/{tableId}/records/batch/restore Restore multiple records (1–100)
POST /api/tables/{tableId}/records/upsert Create or update records (1–100)

POST .../records/bulk-delete / bulk-update back HTML form submissions. Batch delete reads permanent from the JSON body only; the ?permanent=true query string belongs to single-record delete.

Trash & history

Method Path Description
GET /api/tables/{tableId}/trash List trashed records
POST /api/tables/{tableId}/records/{recordId}/restore Restore a deleted record
GET /api/tables/{tableId}/records/{recordId}/history Get record revision history

Comments

Method Path Description
GET /api/tables/{tableId}/records/{recordId}/comments List comments on a record
POST /api/tables/{tableId}/records/{recordId}/comments Add a comment
POST /api/tables/{tableId}/records/{recordId}/comments/read Mark comments read
GET .../{recordId}/comments/{commentId} Get comment by ID
PATCH .../{recordId}/comments/{commentId} Update a comment
DELETE .../{recordId}/comments/{commentId} Delete a comment

Realtime

Method Path Description
GET /api/tables/{tableId}/subscribe Subscribe to record changes
GET /api/tables/{tableId}/subscribe/sse Server-sent events stream
GET /api/realtime/presence Current presence information

Views

Pre-configured views that filter, sort and group records from a table.

Method Path Description
GET /api/tables/{tableId}/views List views for a table
GET /api/tables/{tableId}/views/{viewId} Get view by ID
GET /api/tables/{tableId}/views/{viewId}/records Get records through a view

Unlike ?view= on the records list, this endpoint applies the view's full configuration including its field selection and grouping — see Grouping & Saved Views.

Activity

Audit log of data changes across all tables.

Method Path Description
GET /api/activity List activity entries
GET /api/activity/{activityId} Get activity detail

Analytics

Privacy-friendly, cookie-free usage analytics.

Method Path Description
POST /api/analytics/collect Collect a page view event
GET /api/analytics/overview Get analytics overview
GET /api/analytics/pages Get top pages
GET /api/analytics/referrers Get top referrers
GET /api/analytics/devices Get device breakdown
GET /api/analytics/campaigns Get campaign stats
GET /api/analytics/events Get custom events

Authentication

Authentication is handled by Better Auth and mounted at /api/auth/* — email/password, social OAuth, sessions, password reset, email verification, two-factor, magic links, email OTP, organizations, and admin user management. See Authentication Overview for setup.

A few routes are served directly rather than by Better Auth:

Method Path Description
PATCH /api/auth/user/update Update the current user's profile
POST /api/auth/session/refresh Refresh the active session
PATCH /api/auth/admin/users/{id} Admin-update a user
GET /api/auth/organization/list-teams List teams in an organization
POST /api/auth/organization/add-team-member Add a member to a team

When auth.apiKeys is enabled, four further routes let a signed-in user manage their own long-lived credentials — see API Keys:

Method Path Description
POST /api/auth/api-key/create Mint a key (plaintext value returned once)
GET /api/auth/api-key/list List the caller's own keys
GET /api/auth/api-key/get Read one of the caller's keys by ?id=
POST /api/auth/api-key/delete Revoke a key by keyId

Without the opt-in these four answer 404.

Admins can browse the full machine-readable surface at /api/scalar and fetch the raw OpenAPI documents — see OpenAPI.

Last updated September 1, 2026

This documentation was written with AI, so errors or outdated content are possible. Sovrium is in beta. Contributions and corrections are welcome.

Built with Sovrium