Get started

REST API

Everything in the platform is available through a versioned REST API at /api/v1. The Admin Studio uses the same API.

Interactive documentation

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:

bash
curl -H "Authorization: Bearer bcms_1a2b3c4d_xxxxxxxxxxxxxxxxxxxx" \
  https://cms.example.com/api/v1/entities/article/records

A 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.

bash
curl -c cookies.txt -H "content-type: application/json" \
  -d '{"email":"ada@acme.com","password":"…"}' \
  https://cms.example.com/api/v1/auth/login

Conventions

  • 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-id header. You may send your own.
  • Resources of other workspaces always return 404.

Records

MethodPathScopeDescription
GET/entities/{key}/recordsrecords:readList records
POST/entities/{key}/recordsrecords:writeCreate a record
GET/entities/{key}/records/{id}records:readGet one record
PATCH/entities/{key}/records/{id}records:writeUpdate fields
DELETE/entities/{key}/records/{id}records:writeMove to the trash
POST/entities/{key}/records/{id}/restorerecords:write (admin)Restore from the trash
DELETE/entities/{key}/records/{id}/permanentrecords:write (admin)Delete a trashed record forever

Create

bash
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:

bash
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

ParameterExampleDescription
page, pageSizepage=2&pageSize=50Pagination. pageSize is 1 to 100, default 20
sortsort=-price,nameComma-separated, - for descending. Also createdAt and updatedAt. Default -createdAt
filterfilter[price][gte]=10See below
searchsearch=lampCase-insensitive match on text fields
fieldsfields=name,priceReturn only these fields
expandexpand=author,tagsReplace relation ids with the linked records (one level deep, up to 5 fields)
deleteddeleted=trueAdmins: list the trash

Filters

filter[field]=value means equals. filter[field][operator]=value uses an operator:

OperatorMeaningExample
eq, neEqual / not equalfilter[status][ne]=draft
gt, gte, lt, lteComparisons (numbers, dates)filter[price][lt]=100
inOne of a comma-separated list (up to 100)filter[status][in]=draft,review
containsText contains (case-insensitive), or a multi-value field contains a valuefilter[tags][contains]=sale
startsWithText starts withfilter[name][startsWith]=desk
isNullField 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

json
{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "Validation failed",
    "details": [{ "path": "data.price", "message": "Must be at least 0" }]
  }
}
StatusCommon codes
400INVALID_FILTER, INVALID_SORT, INVALID_FIELDS, INVALID_EXPAND, BAD_REQUEST
401UNAUTHENTICATED, INVALID_CREDENTIALS
403FORBIDDEN, CSRF_INVALID, FIELD_FORBIDDEN, QUOTA_EXCEEDED
404NOT_FOUND (also for other workspaces' resources)
409RECORD_VERSION_CONFLICT, UNIQUE_VIOLATION, ENTITY_ARCHIVED, ENTITY_HAS_RECORDS
413 / 415PAYLOAD_TOO_LARGE, UNSUPPORTED_MEDIA_TYPE
422VALIDATION_FAILED, PLUGIN_REJECTED
429RATE_LIMITED, with a Retry-After header
5xxINTERNAL_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

MethodPathDescription
GET/setup/statusIs the installation set up?
POST/setupFirst-run setup (once)
POST/auth/login, /auth/logoutSign in / out
GET/auth/sessionCurrent user, workspace, permissions, CSRF token
POST/auth/switch-tenant, /auth/passwordSwitch workspace, change password
GET, PATCH/tenantCurrent workspace
GET/admin/usageUsage and quota limits
GET, POST, PATCH/platform/tenantsPlatform admins: provision and suspend workspaces

Administration

MethodPathDescription
GET, POST, PATCH, DELETE/admin/membersMembers and roles
GET, POST, DELETE/admin/api-keysAPI keys
GET/admin/audit-eventsAudit log
GET/admin/field-typesField 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}/versionsSchema history
GET, POST/admin/config/export, /diff, /applySchema as code
GET, POST/admin/templates…Templates and upgrades
GET, POST/admin/plugins…Plugins

Media

MethodPathDescription
POST/mediaUpload (multipart/form-data: file, optional alt)
GET/media, /media/{id}List (filter kind, search) and get metadata
GET/media/{id}/fileDownload the file
PATCH, DELETE/media/{id}Update alt text or file name, delete
bash
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.

ByteContent by ByteRings is open source under the MIT License. Edit on GitHub