API reference

Preview Content (V2)

API referencehttps://api.contit.cloud

Preview Content (V2)

Draft/preview content endpoints using the V2 flat-dictionary model with separate translations.

POST /v2/preview-contents/{contentTypeKey}/ids V2

Get preview content IDs only (V2)

Returns only the IDs of matching draft/preview content items.

Requires the ReadAccess policy

Path parameters

NameTypeRequiredDescription
contentTypeKeystringThe content type key

Request body application/json

PropertyTypeRequiredDescription
filter object — Filter tree
page integer — Page number
pageSize integer — Items per page

Responses

200Success
idsstring[]Array of content item IDs
totalintegerTotal matching items
401Unauthorized

Code examples

curl -X POST "https://api.contit.cloud/v2/preview-contents/{contentTypeKey}/ids" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "filter": "filter_value",
  "page": 1,
  "pageSize": 1
}'
Example request
{
  "filter": null,
  "page": 1,
  "pageSize": 50
}
Example response 200
{
  "ids": [
    "d4e5f6a7-b8c9-0123-defg-456789012345"
  ],
  "total": 1
}
Try it Live
GET /v2/preview-contents/{contentTypeKey}/{id} V2

Get single preview content (V2)

Retrieve a single draft/preview content item using the V2 model.

Requires the ReadAccess policy

Path parameters

NameTypeRequiredDescription
contentTypeKeystringThe content type key
idstringThe content item ID (GUID)

Responses

200Success
idstringContent item ID
fieldsobjectFlat dictionary of field key to value
translationsobjectDictionary of field key to locale-value pairs
401Unauthorized
404Not Found

Code examples

curl -X GET "https://api.contit.cloud/v2/preview-contents/{contentTypeKey}/{id}" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response 200
{
  "id": "d4e5f6a7-b8c9-0123-defg-456789012345",
  "fields": {
    "title": "Draft Article",
    "body": "<p>Work in progress...</p>",
    "status": "draft"
  },
  "translations": {
    "title": {
      "en": "Draft Article",
      "it": "Bozza Articolo"
    }
  }
}
Try it Live
PUT /v2/preview-contents/{contentTypeKey} V2

Create or update preview content (V2)

Create or update a draft content item using the V2 flat-dictionary model.

Requires the WriteAccess policy

Path parameters

NameTypeRequiredDescription
contentTypeKeystringThe content type key

Request body application/json

PropertyTypeRequiredDescription
id string — Content item ID. Omit to create.
fields object Flat dictionary of field key to value
translations object — Translations dictionary
clientInfo string — Optional client identifier

Responses

200Success
idstringContent item ID
fieldsobjectFlat field dictionary
translationsobjectTranslations dictionary
401Unauthorized

Code examples

curl -X PUT "https://api.contit.cloud/v2/preview-contents/{contentTypeKey}" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "id_value",
  "fields": "fields_value",
  "translations": "translations_value",
  "clientInfo": "clientInfo_value"
}'
Example request
{
  "fields": {
    "title": "New Draft",
    "body": "<p>Draft content</p>"
  },
  "translations": {
    "title": {
      "en": "New Draft",
      "it": "Nuova Bozza"
    }
  },
  "clientInfo": "cms-editor-v2"
}
Example response 200
{
  "id": "a7b8c9d0-e1f2-3456-hijk-234567890123",
  "fields": {
    "title": "New Draft",
    "body": "<p>Draft content</p>"
  },
  "translations": {
    "title": {
      "en": "New Draft",
      "it": "Nuova Bozza"
    }
  }
}
Try it Live