CMS items

Create an item

Creates an item at the end of the collection’s manual order. Scalar values go in data keyed by field key and are validated against the field types — unknown keys are rejected, required fields must be present, plain_text and markdown are capped at 1,048,576 bytes (markdown must not contain raw HTML), date values are ISO 8601 with timezone, and color values are normalized to hex. Relationship and asset values go in the side maps: references (reference: an item id; multi_reference: an ordered array of up to 1,000 ids), images (image: an asset id or { assetId, altText }; gallery: an ordered array of up to 25 of those), and files (file: an asset id or { assetId }). slug is optional — it is derived from data.title or data.name when omitted. Set a non-future publishedAt to create an already-published item, or a future publishAt to schedule it; the two fields are mutually exclusive.

post/cms/collections/{collectionId}/items

Request

  • Base URL: https://api.cactal.ai/v1
  • URL: https://api.cactal.ai/v1/cms/collections/{collectionId}/items
  • Auth: HTTP bearer

Path parameters

collectionIdstring required

Request body

slugstring
publishedAtunknown
publishAtunknown
dataobject
referencesobject
imagesobject
filesobject

Response

Identity of the created item. Read the full item back with the get-item endpoint.

idstring required

Id of the created item.

slugstring required

Slug of the created item, derived from data.title or data.name when not provided.

publishedAtstring date-time nullable required

null when the item was created as a draft; the publish timestamp otherwise.

publishAtstring date-time nullable required

Future publication time when the item was created as scheduled; null otherwise.

Changes

No recorded changes to this operation across all 1 revision of this API.