API documentation for CMS page management.
Authorization
All requests require an API token:
?api_token=YOUR_TOKEN
Endpoints
| Resource | GET (list) | GET (one) | POST | PUT | DELETE |
|---|---|---|---|---|---|
| Sites | /cms/sites.json |
/cms/sites/:id.json |
✓ | ✓ | ✓ |
| Layouts | /cms/layouts.json |
/cms/layouts/:id.json |
✓ | ✓ | ✓ |
| Pages | /cms/pages.json |
/cms/pages/:id.json |
✓ | ✓ | ✓ |
| Paragraphs | /cms/paragraphs.json |
/cms/paragraphs/:id.json |
✓ | ✓ | ✓ |
Sites
List of sites
curl "https://domain.com/cms/sites.json?api_token=TOKEN"
Creating a site
curl -X POST "https://domain.com/cms/sites.json?api_token=TOKEN" \
-H "Content-Type: application/json" \
-d '{
"site": {
"name": "My Site",
"description": "Site description",
"layout_id": 1018
}
}'
Layouts
Creating a layout
curl -X POST "https://domain.com/cms/layouts.json?api_token=TOKEN" \
-H "Content-Type: application/json" \
-d '{
"layout": {
"name": "Marketing Layout",
"kind": "page",
"content": "<!DOCTYPE html>...{{ paragraphs }}..."
}
}'
Updating a layout
curl -X PUT "https://domain.com/cms/layouts/1018.json?api_token=TOKEN" \
-H "Content-Type: application/json" \
-d '{
"layout": {
"content": "<!DOCTYPE html>..."
}
}'
Pages
List of site pages
curl "https://domain.com/cms/pages.json?api_token=TOKEN&site_id=1018"
Creating a page
curl -X POST "https://domain.com/cms/pages.json?api_token=TOKEN" \
-H "Content-Type: application/json" \
-d '{
"page": {
"name": "Dashboard EN",
"path": "Dashboard",
"site_id": 1018,
"layout_id": 1018,
"priority": "0.9",
"fields": {
"lang": "en",
"title": "MyCompany Dashboard",
"tagline": "Microclimate Monitoring"
}
}
}'
Updating page fields
curl -X PUT "https://domain.com/cms/pages/1030.json?api_token=TOKEN" \
-H "Content-Type: application/json" \
-d '{
"page": {
"fields": {
"og_image": "https://example.com/og.jpg",
"html_description": "New description"
}
}
}'
Note: PUT overwrites the entire fields object - provide all fields!
Paragraphs
List of paragraphs
curl "https://domain.com/cms/paragraphs.json?api_token=TOKEN&page_id=1030"
Creating a paragraph
curl -X POST "https://domain.com/cms/paragraphs.json?api_token=TOKEN" \
-H "Content-Type: application/json" \
-d '{
"paragraph": {
"name": "Hero Section",
"kind": "text",
"priority": 100,
"page_id": 1030,
"content": "<section class=\"hero\">...</section>"
}
}'
Filtering and pagination
# Pagination
?page=1&per_page=50
# Filtering by site
?site_id=1018
# Filtering by page
?page_id=1030
Responses
Success (200/201)
{
"id": 1030,
"name": "Dashboard EN",
"path": "Dashboard",
"fields": {...},
"created_at": "2025-12-30T10:00:00+01:00"
}
Validation error (422)
{
"errors": {
"path": ["already exists"]
}
}
Example: Updating SEO for multiple pages
for page_id in 1028 1029 1030; do
curl -X PUT "https://domain.com/cms/pages/$page_id.json?api_token=TOKEN" \
-H "Content-Type: application/json" \
-d '{"page": {"fields": {"og_image": "https://cdn.example.com/og.jpg"}}}'
done