API Reference

RESTful API for collections and records.

Base URL

https://your-site.com/api

All endpoints return JSON. Include Bearer token in Authorization header.

Records

GET /collections/{'{collection}'}/records

List all records with optional filtering and pagination.

GET /collections/{'{collection}'}/records/{'{id}'}

Get a single record by ID.

POST /collections/{'{collection}'}/records

Create a new record. Returns 201 on success.

PATCH /collections/{'{collection}'}/records/{'{id}'}

Update an existing record.

DELETE /collections/{'{collection}'}/records/{'{id}'}

Delete a record. Returns 204 on success.

Authentication

POST /collections/{'{collection}'}/auth-with-password

Authenticate with email and password.

{
  "identity": "user@example.com",
  "password": "secret"
}

Real-time

GET /collections/{'{collection}'}/subscribe

Subscribe to changes via Server-Sent Events.

connect create update delete
const events = new EventSource('/api/collections/posts/subscribe');
events.addEventListener('create', e => {
  console.log(JSON.parse(e.data));
});

Filtering

= Equal status = 'published'
!= Not equal status != 'draft'
> < Comparison views > 100
~ Contains title ~ 'hello'
&& AND a = 1 && b = 2
|| OR a = 1 || b = 2