All endpoints require authentication. See Overview & Auth.
Auth
| Method | Path | Description |
|---|
POST | /api/auth/login | Email/password login. Returns session cookie. |
POST | /api/auth/logout | Clear session cookie. |
Pages
| Method | Path | Description |
|---|
GET | /api/pages | List pages. Query: ?status=, ?content_type=, ?search= |
POST | /api/pages | Create a page |
GET | /api/pages/:id | Get page with its latest version |
PUT | /api/pages/:id | Update page (creates new version) |
DELETE | /api/pages/:id | Delete page |
POST | /api/pages/:id/publish | Publish page |
POST | /api/pages/:id/schedule | Schedule page. Body: { "scheduled_at": "<ISO date>" } |
POST | /api/pages/:id/unpublish | Unpublish page |
GET | /api/pages/:id/versions | List all versions for the current locale |
GET | /api/pages/:id/versions/:version | Get a specific version |
POST | /api/pages/:id/restore/:version | Restore a version (creates new version) |
Content Models
| Method | Path | Description |
|---|
GET | /api/content-models | List content models |
POST | /api/content-models | Create a content model |
GET | /api/content-models/:id | Get a content model |
PUT | /api/content-models/:id | Update a content model |
DELETE | /api/content-models/:id | Delete a content model |
POST | /api/content-models/:id/duplicate | Duplicate a content model |
Components
| Method | Path | Description |
|---|
GET | /api/components | List components. Query: ?component_type= |
POST | /api/components | Create a component |
GET | /api/components/:id | Get a component |
PUT | /api/components/:id | Update a component (creates new version) |
DELETE | /api/components/:id | Delete a component |
POST | /api/components/publish-batch | Publish multiple components. Body: { "ids": ["..."] } |
Assets
| Method | Path | Description |
|---|
GET | /api/assets | List assets. Query: ?search=, ?page=, ?limit= |
POST | /api/assets | Upload asset (multipart/form-data, field: file) |
GET | /api/assets/:id | Get asset metadata |
PUT | /api/assets/:id | Update asset metadata (alt_text, filename) |
DELETE | /api/assets/:id | Delete asset from D1 and R2 |
Organizations
| Method | Path | Description |
|---|
GET | /api/organizations | List organizations |
POST | /api/organizations | Create organization |
GET | /api/organizations/:id | Get organization |
PUT | /api/organizations/:id | Update organization |
DELETE | /api/organizations/:id | Delete organization |
GET | /api/organizations/:id/members | List members |
POST | /api/organizations/:id/members | Add member |
PUT | /api/organizations/:id/members/:userId | Update member role |
DELETE | /api/organizations/:id/members/:userId | Remove member |
Spaces
| Method | Path | Description |
|---|
GET | /api/spaces | List spaces in current org |
POST | /api/spaces | Create space |
GET | /api/spaces/:id | Get space |
PUT | /api/spaces/:id | Update space |
DELETE | /api/spaces/:id | Delete space |
Environments
| Method | Path | Description |
|---|
GET | /api/environments | List environments |
POST | /api/environments | Create environment |
GET | /api/environments/:id | Get environment |
PUT | /api/environments/:id | Update environment |
DELETE | /api/environments/:id | Delete environment |
Locales
| Method | Path | Description |
|---|
GET | /api/locales | List locales for current environment |
POST | /api/locales | Create locale |
PUT | /api/locales/:id | Update locale |
DELETE | /api/locales/:id | Delete locale |
Users
| Method | Path | Description |
|---|
GET | /api/users | List users in current org |
POST | /api/users | Create user |
GET | /api/users/:id | Get user |
PUT | /api/users/:id | Update user |
DELETE | /api/users/:id | Delete user |
Webhooks
| Method | Path | Description |
|---|
GET | /api/webhooks | List webhooks |
POST | /api/webhooks | Create webhook |
PUT | /api/webhooks/:id | Update webhook |
DELETE | /api/webhooks/:id | Delete webhook |
POST | /api/webhooks/:id/test | Send a test event |
API Keys
| Method | Path | Description |
|---|
GET | /api/api-keys | List API keys |
POST | /api/api-keys | Create API key |
PUT | /api/api-keys/:id | Update API key |
DELETE | /api/api-keys/:id | Delete (revoke) API key |
Preview
| Method | Path | Description |
|---|
POST | /api/preview | Create a preview token |
DELETE | /api/preview/:token | Revoke a preview token |
GET | /api/preview-urls | List preview URLs |
POST | /api/preview-urls | Create preview URL |
PUT | /api/preview-urls/:id | Update preview URL |
DELETE | /api/preview-urls/:id | Delete preview URL |