Ask
Type to search
Endpoints

Content Pieces

Content pieces store all the content and related metadata that you create. With the API you can both retrieve and manage content pieces, including their variants and content groups they’re a part of.

Content of individual pieces is represented in a JSON tree format, described in detail in a separate section.

Retrieve Content Piece

Retrieves details of the content piece specified by ID. You can specify additional options to retrieve specific variant of the content piece, change return format of the description and specify whether the content should be included in the response.

GET
/content-pieces
Query Parameters
idstring
Required

ID of the content piece

contentboolean

Whether to fetch the JSON content

variantstring

ID or key of the variant

descriptionstring
html

Format of the description

htmltext

Response object
idstring

ID of the content piece

datestring | null

ISO-formatted date metadata of the content piece

titlestring

Title of the content piece

descriptionstring | null

Description of the content piece

coverUrlstring | null

URL of the cover image

coverAltstring | null

Alt text of the cover image

contentGroupIdstring

ID of the content group the piece is directly assigned to

customData

Custom JSON data of the content piece

canonicalLinkstring | null

Canonical link of the content piece

slugstring

Slug of the content piece

filenamestring | null

Filename of the content piece

idstring

ID of the workspace member

idstring

ID of the user

avatarstring

URL of the user's profile image

usernamestring

Short username

fullNamestring

User's full name

emailstring

Email address

idstring

ID of the tag

labelstring

Label assigned to the tag

colorstring

Color assigned to the tag

grayredpinkorangeamberpurpleindigobluecyangreenteallimefuchsiaemerald

coverWidthstring

Width of the cover image

contentobject

JSON content of the piece

Request
Response
{
  "id": "cc6b3be85cb621fcca0568dd",
  "date": "string",
  "title": "string",
  "description": "string",
  "coverUrl": "string",
  "coverAlt": "string",
  "contentGroupId": "4a199daf7db303be195b8b86",
  "customData": "string",
  "canonicalLink": "string",
  "slug": "string",
  "filename": "string",
  "members": [
    {
      "id": "2d9eee214c97fe6849fab054",
      "profile": {
        "id": "fb4ccf50f9abc1699ef1ab13",
        "avatar": "string",
        "username": "string",
        "fullName": "string",
        "email": "[email protected]"
      }
    }
  ],
  "tags": [
    {
      "id": "330feb385dda6ed62c663771",
      "label": "string",
      "color": "gray"
    }
  ],
  "coverWidth": "string",
  "content": {
    ...
  }
}

List Content Pieces

List content pieces assigned to the content group specified by ID. Supports pagination and filtering by slug or tag ID.

GET
/content-pieces/list
Query Parameters
contentboolean

Whether to fetch the JSON content

contentGroupIdstring

Comma-separated list of IDs of the content groups which contain the content pieces

variantstring

ID or key of the variant

slugstring

Slug of the content piece

tagIdstring

ID of the tag

lastOrderstring

Last order identifier to start fetching content pieces from

perPagenumber
20

Number of content pieces per page

pagenumber
1

Page number to fetch

Response object[]
idstring

ID of the content piece

datestring | null

ISO-formatted date metadata of the content piece

titlestring

Title of the content piece

descriptionstring | null

Description of the content piece

coverUrlstring | null

URL of the cover image

coverAltstring | null

Alt text of the cover image

contentGroupIdstring

ID of the content group the piece is directly assigned to

customData

Custom JSON data of the content piece

canonicalLinkstring | null

Canonical link of the content piece

slugstring

Slug of the content piece

filenamestring | null

Filename of the content piece

idstring

ID of the workspace member

idstring

ID of the user

avatarstring

URL of the user's profile image

usernamestring

Short username

fullNamestring

User's full name

emailstring

Email address

idstring

ID of the tag

labelstring

Label assigned to the tag

colorstring

Color assigned to the tag

grayredpinkorangeamberpurpleindigobluecyangreenteallimefuchsiaemerald

coverWidthstring

Width of the cover image

orderstring
contentobject

JSON content of the piece

Request
Response
[
  {
    "id": "db32b898d884369e2c1d5a8b",
    "date": "string",
    "title": "string",
    "description": "string",
    "coverUrl": "string",
    "coverAlt": "string",
    "contentGroupId": "283cb91a14c716723edeb5f8",
    "customData": "string",
    "canonicalLink": "string",
    "slug": "string",
    "filename": "string",
    "members": [
      {
        "id": "ce82b0a9173a1391c70a2b81",
        "profile": {
          "id": "6aa12008ec1c1478ca8233ae",
          "avatar": "string",
          "username": "string",
          "fullName": "string",
          "email": "[email protected]"
        }
      }
    ],
    "tags": [
      {
        "id": "48abb9ca53ee563e8ff35d31",
        "label": "string",
        "color": "gray"
      }
    ],
    "order": "string"
  }
]

Create Content Piece

Creates a content piece from the provided data and assigns it to the specified content group.

POST
/content-pieces
Body Parameters
datestring | null

ISO-formatted date metadata of the content piece

titlestring
Required

Title of the content piece

descriptionstring | null

Description of the content piece

tagsstring[]
Required

IDs of the tags assigned to the content piece

coverUrlstring | null

URL of the cover image

coverAltstring | null

Alt text of the cover image

contentGroupIdstring
Required

ID of the content group the piece is directly assigned to

customData

Custom JSON data of the content piece

canonicalLinkstring | null

Canonical link of the content piece

filenamestring | null

Filename of the content piece

membersstring[]
Required

IDs of the workspace members assigned to the content piece

contentstring

HTML content

referenceIdstring

ID of the reference content piece to order the content piece after

slugstring

Slug of the content piece

Response object
idstring
Request
Response
{
  "id": "743b0098a83ee6ee0980736d"
}

Update Content Piece

Updates a content piece (or specified variant) matched by ID, using the provided data. If a new content group is specified the piece will be reassigned to it.

PUT
/content-pieces
Body Parameters
idstring
Required

ID of the content piece

datestring | null

ISO-formatted date metadata of the content piece

titlestring

Title of the content piece

descriptionstring | null

Description of the content piece

tagsstring[]

IDs of the tags assigned to the content piece

coverUrlstring | null

URL of the cover image

coverAltstring | null

Alt text of the cover image

contentGroupIdstring

ID of the content group the piece is directly assigned to

customData

Custom JSON data of the content piece

canonicalLinkstring | null

Canonical link of the content piece

slugstring

Slug of the content piece

filenamestring | null

Filename of the content piece

membersstring[]

IDs of the workspace members assigned to the content piece

coverWidthstring

Width of the cover image

contentstring

HTML content

variantstring

ID or key of the variant to update

Response 200
Request

Delete Content Piece

Deletes the content piece specified by ID, together with all its variants.

DELETE
/content-pieces
Query Parameters
idstring
Required

ID of the content piece

Response 200
Request