CMS · pages
11 routes. Paths are relative to https://api.intersink.com/v1.
- GET/cms/channels/{channelId}/pagesList the channel's pages (all statuses)
- POST/cms/channels/{channelId}/pagesCreate a page (draft by default)
- GET/cms/channels/{channelId}/pages/{pageId}Get a page with its sections
- PATCH/cms/channels/{channelId}/pages/{pageId}Update a page (title, slug, SEO, status)
- DELETE/cms/channels/{channelId}/pages/{pageId}Delete a page and its sections
- POST/cms/channels/{channelId}/pages/{pageId}/publishPublish a page
- POST/cms/channels/{channelId}/pages/{pageId}/sectionsAdd a section (content is sanitized HTML)
- PATCH/cms/channels/{channelId}/pages/{pageId}/sections/{sectionId}Update a section
- DELETE/cms/channels/{channelId}/pages/{pageId}/sections/{sectionId}Delete a section
- PUT/cms/channels/{channelId}/pages/{pageId}/sections/orderReorder sections: ids = every section, in order
- POST/cms/channels/{channelId}/pages/{pageId}/unpublishUnpublish a page (back to draft)
List the channel's pages (all statuses)
GET/cms/channels/{channelId}/pages
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| page | number, query | Minimum 1. |
| limit | number, query | Minimum 1, maximum 100. |
| status | string, query | One of: "draft", "published", "archived". |
| q | string, query | Search in the title/name |
Response
200. The payload in data is not described in the spec yet.
Create a page (draft by default)
POST/cms/channels/{channelId}/pages
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| description | string | Intro (plain text) At most 2000 characters. |
| image | string | directus_files id of the hero image |
| meta_title | string | At most 255 characters. |
| meta_description | string | At most 500 characters. |
| meta_keyword | string | At most 255 characters. |
| tags | string | At most 255 characters. |
| og_image | string | directus_files id of the og:image |
| canonical_url | string | At most 2048 characters. Example: "https://shop.example.com/about-us" |
| noindex | boolean | Ask search engines not to index |
| titlerequired | string | At most 255 characters. Example: "About us" |
| slugrequired | string | Unique per channel At most 120 characters. Example: "about-us" |
| status | string | One of: "draft", "published". |
Response
201. The payload in data is of type object.
Get a page with its sections
GET/cms/channels/{channelId}/pages/{pageId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| pageIdrequired | number, path |
Response
200. The payload in data is of type object.
Update a page (title, slug, SEO, status)
PATCH/cms/channels/{channelId}/pages/{pageId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| pageIdrequired | number, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| description | string | Intro (plain text) At most 2000 characters. |
| image | string | directus_files id of the hero image |
| meta_title | string | At most 255 characters. |
| meta_description | string | At most 500 characters. |
| meta_keyword | string | At most 255 characters. |
| tags | string | At most 255 characters. |
| og_image | string | directus_files id of the og:image |
| canonical_url | string | At most 2048 characters. Example: "https://shop.example.com/about-us" |
| noindex | boolean | Ask search engines not to index |
| title | string | At most 255 characters. |
| slug | string | At most 120 characters. Example: "about-us" |
| status | string | One of: "draft", "published", "archived". |
Response
200. The payload in data is of type object.
Delete a page and its sections
DELETE/cms/channels/{channelId}/pages/{pageId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| pageIdrequired | number, path |
Response
200. The payload in data is not described in the spec yet.
Publish a page
POST/cms/channels/{channelId}/pages/{pageId}/publish
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| pageIdrequired | number, path |
Response
201. The payload in data is of type object.
Add a section (content is sanitized HTML)
POST/cms/channels/{channelId}/pages/{pageId}/sections
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| pageIdrequired | number, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| title | string | At most 255 characters. |
| content | string | Rich text (HTML). Sanitized server-side with an allow-list. At most 100000 characters. |
| sort | number | Minimum 0, maximum 10000. |
Response
201. The payload in data is of type object.
Update a section
PATCH/cms/channels/{channelId}/pages/{pageId}/sections/{sectionId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| pageIdrequired | number, path | |
| sectionIdrequired | number, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| title | string | At most 255 characters. |
| content | string | Rich text (HTML). Sanitized server-side with an allow-list. At most 100000 characters. |
| sort | number | Minimum 0, maximum 10000. |
Response
200. The payload in data is of type object.
Delete a section
DELETE/cms/channels/{channelId}/pages/{pageId}/sections/{sectionId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| pageIdrequired | number, path | |
| sectionIdrequired | number, path |
Response
200. The payload in data is not described in the spec yet.
Reorder sections: ids = every section, in order
PUT/cms/channels/{channelId}/pages/{pageId}/sections/order
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| pageIdrequired | number, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| idsrequired | number[] | Every section id of the page, in the new order |
Response
200. The payload in data is of type object.
Unpublish a page (back to draft)
POST/cms/channels/{channelId}/pages/{pageId}/unpublish
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| pageIdrequired | number, path |
Response
201. The payload in data is of type object.