REST API
Everything in the platform is available through a versioned REST API at /api/v1. The Admin Studio uses the same API.
Every installation serves an OpenAPI 3.1 document at /api/v1/openapi.json and interactive docs at /api/v1/docs. /api/v1/openapi/tenant.json adds typed schemas and paths for your own entities.
Authentication
API keys (servers, apps, scripts)
Create a key under API keys in the Admin Studio and send it as a bearer token:
curl -H "Authorization: Bearer bcms_1a2b3c4d_xxxxxxxxxxxxxxxxxxxx" \
https://cms.example.com/api/v1/entities/article/recordsA key belongs to one workspace and is limited to its scopes. Keys cannot manage members or other keys.
Browser sessions
POST /api/v1/auth/login sets an httpOnly session cookie and returns the session, including a csrfToken. Every state-changing request made with the cookie (POST, PATCH, DELETE) must send the token in the x-csrf-token header. Bearer-token requests don't need it.
curl -c cookies.txt -H "content-type: application/json" \
-d '{"email":"ada@acme.com","password":"…"}' \
https://cms.example.com/api/v1/auth/loginConventions
- Requests and responses are JSON. The request body limit is 1 MB by default.
- Successful responses wrap their payload:
{ "data": … }, and lists add"meta". - IDs are UUIDs. Timestamps are ISO 8601 in UTC.
- Every response has an
x-request-idheader. You may send your own. - Resources of other workspaces always return
404.
Records
| Method | Path | Scope | Description |
|---|---|---|---|
| GET | /entities/{key}/records | records:read | List records |
| POST | /entities/{key}/records | records:write | Create a record |
| GET | /entities/{key}/records/{id} | records:read | Get one record |
| PATCH | /entities/{key}/records/{id} | records:write | Update fields |
| DELETE | /entities/{key}/records/{id} | records:write | Move to the trash |
| POST | /entities/{key}/records/{id}/restore | records:write (admin) | Restore from the trash |
| DELETE | /entities/{key}/records/{id}/permanent | records:write (admin) | Delete a trashed record forever |
Create
curl -X POST https://cms.example.com/api/v1/entities/product/records \
-H "Authorization: Bearer $API_KEY" -H "content-type: application/json" \
-d '{"data": {"name": "Desk lamp", "price": 19.9}}'Missing fields get their default values. Unknown fields, invalid values and missing required fields return 422 with details per field.
Update with concurrency control
Send only the fields to change. Include the version you last read to avoid overwriting someone else's change:
curl -X PATCH https://cms.example.com/api/v1/entities/product/records/$ID \
-H "Authorization: Bearer $API_KEY" -H "content-type: application/json" \
-d '{"data": {"price": "24.50", "stock": null}, "version": 3}'If the record changed meanwhile, the API answers 409 RECORD_VERSION_CONFLICT with details.currentVersion.
Querying
| Parameter | Example | Description |
|---|---|---|
page, pageSize | page=2&pageSize=50 | Pagination. pageSize is 1 to 100, default 20 |
sort | sort=-price,name | Comma-separated, - for descending. Also createdAt and updatedAt. Default -createdAt |
filter | filter[price][gte]=10 | See below |
search | search=lamp | Case-insensitive match on text fields |
fields | fields=name,price | Return only these fields |
expand | expand=author,tags | Replace relation ids with the linked records (one level deep, up to 5 fields) |
deleted | deleted=true | Admins: list the trash |
Filters
filter[field]=value means equals. filter[field][operator]=value uses an operator:
| Operator | Meaning | Example |
|---|---|---|
eq, ne | Equal / not equal | filter[status][ne]=draft |
gt, gte, lt, lte | Comparisons (numbers, dates) | filter[price][lt]=100 |
in | One of a comma-separated list (up to 100) | filter[status][in]=draft,review |
contains | Text contains (case-insensitive), or a multi-value field contains a value | filter[tags][contains]=sale |
startsWith | Text starts with | filter[name][startsWith]=desk |
isNull | Field is empty (true) or set (false) | filter[stock][isNull]=true |
System attributes work too: filter[id][in]=…, filter[createdAt][gte]=2026-01-01T00:00:00Z. Up to 20 conditions are combined with AND. Which operators work depends on the field type. Unknown fields or unsupported operators return 400 INVALID_FILTER. You can only filter, sort and select fields your role or key may read.
Errors
{
"error": {
"code": "VALIDATION_FAILED",
"message": "Validation failed",
"details": [{ "path": "data.price", "message": "Must be at least 0" }]
}
}| Status | Common codes |
|---|---|
| 400 | INVALID_FILTER, INVALID_SORT, INVALID_FIELDS, INVALID_EXPAND, BAD_REQUEST |
| 401 | UNAUTHENTICATED, INVALID_CREDENTIALS |
| 403 | FORBIDDEN, CSRF_INVALID, FIELD_FORBIDDEN, QUOTA_EXCEEDED |
| 404 | NOT_FOUND (also for other workspaces' resources) |
| 409 | RECORD_VERSION_CONFLICT, UNIQUE_VIOLATION, ENTITY_ARCHIVED, ENTITY_HAS_RECORDS |
| 413 / 415 | PAYLOAD_TOO_LARGE, UNSUPPORTED_MEDIA_TYPE |
| 422 | VALIDATION_FAILED, PLUGIN_REJECTED |
| 429 | RATE_LIMITED, with a Retry-After header |
| 5xx | INTERNAL_ERROR, with requestId for support |
Rate limits
By default each client (API key or IP address) may make 600 requests per minute. Login and setup are limited to 10 attempts per minute per IP. Administrators can change both. See Configuration.
Endpoint reference
Authentication and workspace
| Method | Path | Description |
|---|---|---|
| GET | /setup/status | Is the installation set up? |
| POST | /setup | First-run setup (once) |
| POST | /auth/login, /auth/logout | Sign in / out |
| GET | /auth/session | Current user, workspace, permissions, CSRF token |
| POST | /auth/switch-tenant, /auth/password | Switch workspace, change password |
| GET, PATCH | /tenant | Current workspace |
| GET | /admin/usage | Usage and quota limits |
| GET, POST, PATCH | /platform/tenants | Platform admins: provision and suspend workspaces |
Administration
| Method | Path | Description |
|---|---|---|
| GET, POST, PATCH, DELETE | /admin/members | Members and roles |
| GET, POST, DELETE | /admin/api-keys | API keys |
| GET | /admin/audit-events | Audit log |
| GET | /admin/field-types | Field type registry |
| GET, POST, PATCH, DELETE | /admin/entities[/{id}] | Entities |
| POST, PATCH, DELETE | /admin/entities/{id}/fields[/{fieldId}] | Fields, and /fields/reorder |
| GET | /admin/entities/{id}/versions | Schema history |
| GET, POST | /admin/config/export, /diff, /apply | Schema as code |
| GET, POST | /admin/templates… | Templates and upgrades |
| GET, POST | /admin/plugins… | Plugins |
Media
| Method | Path | Description |
|---|---|---|
| POST | /media | Upload (multipart/form-data: file, optional alt) |
| GET | /media, /media/{id} | List (filter kind, search) and get metadata |
| GET | /media/{id}/file | Download the file |
| PATCH, DELETE | /media/{id} | Update alt text or file name, delete |
curl -X POST https://cms.example.com/api/v1/media \
-H "Authorization: Bearer $API_KEY" \
-F "file=@cover.png;type=image/png" -F "alt=Product photo"System
GET /health, GET /health/ready, GET /openapi.json, GET /openapi/tenant.json, GET /docs. The public content API is described on its own page.