API Reference
Sovrium exposes a complete REST API for managing tables, records, views, activity logs, analytics, and authentication. All endpoints accept and return JSON.
Early Preview
The API surface is evolving. Endpoints may change before v1.0.
Interactive API Explorer
Browse and test every endpoint interactively with the Scalar API client. Includes request builder, response viewer, and code generation.
Base URL
All endpoints are relative to your Sovrium instance base URL.
http://localhost:3000/api
Health
Server health check endpoint.
Check server status
Tables
Read table definitions, including field schemas and permission rules.
List all tables
Get table by ID
Get table permissions
Records
Full CRUD, batch operations, soft-delete lifecycle, revision history, and record comments.
CRUD
List records
Create a record
Get record by ID
Update a record
Soft-delete a record
Batch Operations
Create multiple records
Update multiple records
Soft-delete multiple records
Create or update a record
Trash & History
List trashed records
Restore a deleted record
Restore multiple records
Get record revision history
Comments
List comments on a record
Add a comment
Get comment by ID
Update a comment
Delete a comment
Views
Pre-configured views that filter, sort, and group records from a table.
List views for a table
Get view by ID
Get records through a view
Activity
Audit log of data changes across all tables.
List activity entries
Get activity detail
Analytics
Privacy-friendly, cookie-free usage analytics.
Collect a page view event
Get analytics overview
Get top pages
Get top referrers
Get device breakdown
Get campaign stats
Authentication
Powered by Better Auth with 28+ endpoints for sign-in, sign-up, sessions, OAuth, 2FA, and admin user management.
Authentication is handled by Better Auth and includes email/password sign-in, social OAuth providers, session management, password reset, email verification, two-factor authentication, and admin endpoints. See the Auth configuration docs or explore all endpoints in the interactive API explorer.
Cross-Cutting Features
Capabilities that apply across all API endpoints.
OpenAPI Schema
Download the OpenAPI 3.1 specification for use with any API client or code generator.
curl https://your-instance.com/docs/openapi.json