API Reference

RESTful API for collections and records.

How It Works

ReadySite connects your systems to your users through a unified data layer.

Your Systems CRM, ERP, Services
API POST /api/records
ReadySite Collections & Records
Views {{range .Records}}
Your Users Instant Updates

Sync data via API → Store in collections → Render instantly in pages

CRM ERP Automations REST API Collections AI Agent Renderer Static Files Admin Dashboard Manage Content Published Pages Live to Users
Integrations
ReadySite
Frontend

Base URL

https://your-site.com/api

All endpoints return JSON. Include your token in the Authorization header:

Authorization: Bearer your-token-here

Errors return JSON with a message field:

{"message": "record not found"}  // 404
{"message": "unauthorized"}      // 401
Tip

Don't want to write API calls? The AI assistant can create, update, and delete records for you through natural language.

Records

GET /collections/{collectionId}/records

List all records with optional filtering and pagination.

GET /collections/{collectionId}/records/{id}

Get a single record by ID.

POST /collections/{collectionId}/records

Create a new record. Returns 201 on success.

PATCH /collections/{collectionId}/records/{id}

Update an existing record.

DELETE /collections/{collectionId}/records/{id}

Delete a record. Returns 204 on success.

Real-time

GET /collections/{collectionId}/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));
});
Event payload
// Each event sends a JSON payload:
{
  "action": "create",           // "create", "update", or "delete"
  "record": {
    "id": "abc123",
    "title": "New Post",
    "content": "Hello world"
  }
}

Filtering

Note

Pass filters as the filter query parameter: /api/collections/posts/records?filter=status = 'published' && views > 100

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

What's next?