Preview. This site is still being built. Features, prices and terms may change, and nothing here is a binding offer. Read the preview notice

Preview. Still being built; nothing here is a binding offer. Details

CMS · home surfaces

16 routes. Paths are relative to https://api.intersink.com/v1.

All groups

The channel's home surfaces (summaries)

GET/cms/channels/{channelId}/surfaces

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path

Response

200. The payload in data is not described in the spec yet.

Create a surface (a draft; publish it when ready)

POST/cms/channels/{channelId}/surfaces

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path

Request body application/json

FieldTypeDescription
namerequiredstring1–48 lower-case letters, digits or dashes Example: "start"
titlestringAt most 80 characters. Example: "Start page"
descriptionstringAt most 300 characters.
blocksobject[]Ordered blocks. Each is {type: banner|shortcut|ad|text, id? (keep to update, omit for new), enabled?, key?, starts_at?, ends_at?, locales?, countries? | exclude_countries?, platforms?} plus its type's fields (see docs/home-surfaces.md).

Response

201. The payload in data is of type object.

One surface: its draft blocks, status and published summary (ETag = version)

GET/cms/channels/{channelId}/surfaces/{surface}

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
surfacerequiredstring, path

Response

200. The payload in data is of type object.

Replace the draft: title, description and/or the whole ordered block list

PUT/cms/channels/{channelId}/surfaces/{surface}

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
surfacerequiredstring, path
if-matchstring, header
If-Matchstring, header

Request body application/json

FieldTypeDescription
versionnumberThe version you are replacing (or send If-Match: "<version>")
titlestringAt most 80 characters.
descriptionstringAt most 300 characters.
blocksobject[]Ordered blocks. Each is {type: banner|shortcut|ad|text, id? (keep to update, omit for new), enabled?, key?, starts_at?, ends_at?, locales?, countries? | exclude_countries?, platforms?} plus its type's fields (see docs/home-surfaces.md).

Response

200. The payload in data is of type object.

Delete a surface (it disappears from clients at once)

DELETE/cms/channels/{channelId}/surfaces/{surface}

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
surfacerequiredstring, path
if-matchstring, header
versionstring, query
If-Matchstring, header

Response

200. The payload in data is not described in the spec yet.

Add one block (at `position`, default the end)

POST/cms/channels/{channelId}/surfaces/{surface}/blocks

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
surfacerequiredstring, path
if-matchstring, header

Request body application/json

FieldTypeDescription
versionnumberThe version you saw (or send If-Match: "<version>")
blockrequiredobjectOrdered blocks. Each is {type: banner|shortcut|ad|text, id? (keep to update, omit for new), enabled?, key?, starts_at?, ends_at?, locales?, countries? | exclude_countries?, platforms?} plus its type's fields (see docs/home-surfaces.md).
positionnumberIndex to insert at (default: the end)

Response

201. The payload in data is of type object.

Change one block (null clears a field)

PATCH/cms/channels/{channelId}/surfaces/{surface}/blocks/{blockId}

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
surfacerequiredstring, path
blockIdrequiredstring, path
if-matchstring, header

Request body application/json

FieldTypeDescription
versionnumberThe version you saw (or send If-Match: "<version>")
blockrequiredobjectFields to change; null clears a field. The type can't change.

Response

200. The payload in data is of type object.

Remove one block

DELETE/cms/channels/{channelId}/surfaces/{surface}/blocks/{blockId}

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
surfacerequiredstring, path
blockIdrequiredstring, path
if-matchstring, header
versionstring, query

Response

200. The payload in data is of type object.

Reorder: every block id, in the new order

PUT/cms/channels/{channelId}/surfaces/{surface}/blocks/order

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
surfacerequiredstring, path
if-matchstring, header

Request body application/json

FieldTypeDescription
versionnumberThe version you saw (or send If-Match: "<version>")
idsrequiredstring[]Every block id, in the new order

Response

200. The payload in data is of type object.

Drop unpublished changes: the draft goes back to what is published

POST/cms/channels/{channelId}/surfaces/{surface}/discard

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
surfacerequiredstring, path
if-matchstring, header

Request body application/json

FieldTypeDescription
versionnumberThe version you saw (or send If-Match: "<version>")

Response

200. The payload in data is of type object.

Who changed and published the surface, newest first (max 100): by is the person's name (or address when they have none), by_email their address

GET/cms/channels/{channelId}/surfaces/{surface}/history

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
surfacerequiredstring, path
limitrequiredstring, query

Response

200. The payload in data is not described in the spec yet.

What one audience sees: the draft (default) or the published surface, filtered like the public read

GET/cms/channels/{channelId}/surfaces/{surface}/preview

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
surfacerequiredstring, path
ofstring, queryOne of: "draft", "published".
atany, queryISO time to preview a schedule
countryany, queryExample: "GB"
platformany, queryExample: "windows"
localeany, queryExample: "en-GB"

Response

200. The payload in data is of type object.

Publish the draft as it is at `version`; clients refresh within seconds

POST/cms/channels/{channelId}/surfaces/{surface}/publish

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
surfacerequiredstring, path
if-matchstring, header

Request body application/json

FieldTypeDescription
versionnumberThe version you saw (or send If-Match: "<version>")

Response

200. The payload in data is of type object.

Take the surface off clients (the draft stays)

POST/cms/channels/{channelId}/surfaces/{surface}/unpublish

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path
surfacerequiredstring, path
if-matchstring, header

Request body application/json

FieldTypeDescription
versionnumberThe version you saw (or send If-Match: "<version>")

Response

200. The payload in data is of type object.

Validate one block without saving it (returns its stored form or 400 with every problem)

POST/cms/channels/{channelId}/surfaces/check-block

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path

Request body application/json

FieldTypeDescription
blockrequiredobject

Response

201. The payload in data is not described in the spec yet.

Upload an image for the channel's surfaces (field: image; PNG, JPEG, WebP or GIF, up to 2 MB) → {id, url}; use id as a block's image

POST/cms/channels/{channelId}/surfaces/images

Needs a signed-in user (Bearer token or access_token cookie).

Parameters

NameTypeDescription
channelIdrequiredstring, path

Response

201. The payload in data is not described in the spec yet.