Skip to main content

Pages

Pages represent structured, route-based content. Each page has a unique route within a site and can contain multiple sections, each with their own localizations.

Endpoints​

MethodPathPermissionDescription
GET/sites/{site_id}/pages?page&per_pageReadList all pages (paginated)
GET/pages/{id}ReadGet page by ID
GET/sites/{site_id}/pages/by-route/{route}ReadGet page by route
POST/pagesAuthorCreate a page
PUT/pages/{id}AuthorUpdate a page
DELETE/pages/{id}EditorSoft delete a page
POST/pages/{id}/cloneAuthorClone a page as a new Draft
POST/pages/{id}/reviewReviewerApprove or request changes
GET/pages/{page_id}/sectionsReadGet sections for a page
POST/pages/{page_id}/sectionsAuthorCreate a page section
PUT/pages/sections/{id}AuthorUpdate a page section
DELETE/pages/sections/{id}EditorDelete a page section
GET/pages/sections/{section_id}/localizationsReadGet localizations for a section
GET/pages/{page_id}/sections/localizationsReadGet all section localizations for a page
PUT/pages/sections/{section_id}/localizationsAuthorUpsert a section localization
DELETE/pages/sections/localizations/{id}EditorDelete a section localization
POST/sites/{site_id}/pages/bulkAuthor/EditorBulk status update or delete

List Pages​

curl -H "X-API-Key: oy_live_abc123..." \
"https://your-domain.com/api/v1/sites/{site_id}/pages?page=1&per_page=10"

Get Page by Route​

Routes are stored with a leading slash. The route path is passed as a URL segment:

curl -H "X-API-Key: oy_live_abc123..." \
https://your-domain.com/api/v1/sites/{site_id}/pages/by-route/about

Create a Page​

curl -X POST \
-H "X-API-Key: oy_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"site_ids": ["550e8400-..."],
"route": "/about",
"slug": "about",
"status": "Draft"
}' \
https://your-domain.com/api/v1/pages

Response 201 Created

Page Sections​

Sections are ordered building blocks within a page. Each section has a section_type (e.g., "hero", "text", "gallery") and a display_order.

# Create a section
curl -X POST \
-H "X-API-Key: oy_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"section_type": "hero",
"display_order": 0
}' \
https://your-domain.com/api/v1/pages/{page_id}/sections

Section Localizations​

Each section can have localized content. The upsert endpoint creates a new localization or updates an existing one for the given locale.

curl -X PUT \
-H "X-API-Key: oy_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"locale_id": "locale-uuid",
"title": "Welcome",
"text": "Hello, world!"
}' \
https://your-domain.com/api/v1/pages/sections/{section_id}/localizations

Editorial Workflow​

Pages follow the same editorial workflow as blogs. See the Blogs documentation for details on the review process.

Bulk Actions​

Identical to blog bulk actions. Supports UpdateStatus and Delete actions.