Preview Content (V2)
Draft/preview content endpoints using the V2 flat-dictionary model with separate translations.
Base URL: https://api.contit.cloud
POST
/v2/preview-contents/{contentTypeKey}
V2
Search preview contents (V2)
Search draft/preview content items using the V2 flat-dictionary model.
Requires
ReadAccess policy
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contentTypeKey |
string | ✓ | The content type key |
Request Body application/json
| Property | Type | Required | Description |
|---|---|---|---|
page |
integer | — | Page number (1-based) |
pageSize |
integer | — | Items per page |
filter |
object | — | Filter tree |
order |
object | — | Sorting configuration |
locale |
string | — | Locale code |
includeRelations |
string[] | — | Relation field keys to expand |
Responses
200
Success
items |
V2ContentModel[] | Array of V2 draft content items |
total |
integer | Total matching items |
page |
integer | Current page |
pageSize |
integer | Items per page |
totalPages |
integer | Total pages |
hasMorePages |
boolean | Whether more pages exist |
401
Unauthorized
Code examples
curl -X POST "https://api.contit.cloud/v2/preview-contents/{contentTypeKey}" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"page": 1,
"pageSize": 1,
"filter": "filter_value",
"order": "order_value",
"locale": "locale_value",
"includeRelations": []
}'
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");
var content = new StringContent("{
\"page\": 1,
\"pageSize\": 1,
\"filter\": \"filter_value\",
\"order\": \"order_value\",
\"locale\": \"locale_value\",
\"includeRelations\": []
}",
Encoding.UTF8, "application/json");
var response = await http.PostAsync(
"https://api.contit.cloud/v2/preview-contents/{contentTypeKey}", content);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/v2/preview-contents/{contentTypeKey}",
{
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"page": 1,
"pageSize": 1,
"filter": "filter_value",
"order": "order_value",
"locale": "locale_value",
"includeRelations": []
})
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"page": 1,
"pageSize": 1,
"filter": "filter_value",
"order": "order_value",
"locale": "locale_value",
"includeRelations": []
}
response = requests.post(
"https://api.contit.cloud/v2/preview-contents/{contentTypeKey}",
json=payload,
headers=headers
)
data = response.json()
Example Request
{
"page": 1,
"pageSize": 10,
"filter": null,
"locale": "it"
}
Example Response
200
{
"items": [
{
"id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"fields": {
"title": "Bozza Articolo",
"status": "draft",
"category": "blog"
},
"translations": {
"title": {
"it": "Bozza Articolo",
"en": "Draft Article"
}
}
}
],
"total": 1,
"page": 1,
"pageSize": 10,
"totalPages": 1,
"hasMorePages": false
}
Try it
Live
curl
Response
POST
/v2/preview-contents/{contentTypeKey}/ids
V2
Get preview content IDs only (V2)
Returns only the IDs of matching draft/preview content items.
Requires
ReadAccess policy
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contentTypeKey |
string | ✓ | The content type key |
Request Body application/json
| Property | Type | Required | Description |
|---|---|---|---|
filter |
object | — | Filter tree |
page |
integer | — | Page number |
pageSize |
integer | — | Items per page |
Responses
200
Success
ids |
string[] | Array of content item IDs |
total |
integer | Total matching items |
401
Unauthorized
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
}'
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");
var content = new StringContent("{
\"filter\": \"filter_value\",
\"page\": 1,
\"pageSize\": 1
}",
Encoding.UTF8, "application/json");
var response = await http.PostAsync(
"https://api.contit.cloud/v2/preview-contents/{contentTypeKey}/ids", content);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/v2/preview-contents/{contentTypeKey}/ids",
{
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"filter": "filter_value",
"page": 1,
"pageSize": 1
})
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"filter": "filter_value",
"page": 1,
"pageSize": 1
}
response = requests.post(
"https://api.contit.cloud/v2/preview-contents/{contentTypeKey}/ids",
json=payload,
headers=headers
)
data = response.json()
Example Request
{
"filter": null,
"page": 1,
"pageSize": 50
}
Example Response
200
{
"ids": [
"d4e5f6a7-b8c9-0123-defg-456789012345"
],
"total": 1
}
Try it
Live
curl
Response
GET
/v2/preview-contents/{contentTypeKey}/{id}
V2
Get single preview content (V2)
Retrieve a single draft/preview content item using the V2 model.
Requires
ReadAccess policy
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contentTypeKey |
string | ✓ | The content type key |
id |
string | ✓ | The content item ID (GUID) |
Responses
200
Success
id |
string | Content item ID |
fields |
object | Flat dictionary of field key to value |
translations |
object | Dictionary of field key to locale-value pairs |
401
Unauthorized
404
Not Found
Code examples
curl -X GET "https://api.contit.cloud/v2/preview-contents/{contentTypeKey}/{id}" \
-H "X-Api-Key: YOUR_API_KEY"
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");
var response = await http.GetAsync("https://api.contit.cloud/v2/preview-contents/{contentTypeKey}/{id}");
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/v2/preview-contents/{contentTypeKey}/{id}",
{
method: "GET",
headers: {
"X-Api-Key": "YOUR_API_KEY",
}
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
response = requests.get(
"https://api.contit.cloud/v2/preview-contents/{contentTypeKey}/{id}",
headers=headers
)
data = response.json()
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
curl
Response
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
WriteAccess policy
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contentTypeKey |
string | ✓ | The content type key |
Request Body application/json
| Property | Type | Required | Description |
|---|---|---|---|
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
200
Success
id |
string | Content item ID |
fields |
object | Flat field dictionary |
translations |
object | Translations dictionary |
401
Unauthorized
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"
}'
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");
var content = new StringContent("{
\"id\": \"id_value\",
\"fields\": \"fields_value\",
\"translations\": \"translations_value\",
\"clientInfo\": \"clientInfo_value\"
}",
Encoding.UTF8, "application/json");
var response = await http.PutAsync(
"https://api.contit.cloud/v2/preview-contents/{contentTypeKey}", content);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/v2/preview-contents/{contentTypeKey}",
{
method: "PUT",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"id": "id_value",
"fields": "fields_value",
"translations": "translations_value",
"clientInfo": "clientInfo_value"
})
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"id": "id_value",
"fields": "fields_value",
"translations": "translations_value",
"clientInfo": "clientInfo_value"
}
response = requests.put(
"https://api.contit.cloud/v2/preview-contents/{contentTypeKey}",
json=payload,
headers=headers
)
data = response.json()
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
curl
Response