Preview Content (V1)
Draft/preview content endpoints using the V1 typed-field model. Includes all search, get, and aggregate operations plus publish/unpublish actions.
Base URL: https://api.contit.cloud
/preview-contents/{contentTypeKey}
Search preview contents
Search and filter draft/preview content items with pagination, ordering, and localization.
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 | — | Number of items per page |
filter |
object | — | Filter tree |
order |
object | — | Sorting configuration |
locale |
string | — | Locale code |
includeRelations |
string[] | — | Relation field keys to expand |
Responses
items |
ContentModel[] | Array of 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 |
Code examples
curl -X POST "https://api.contit.cloud/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/preview-contents/{contentTypeKey}", content);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/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/preview-contents/{contentTypeKey}",
json=payload,
headers=headers
)
data = response.json()
{
"page": 1,
"pageSize": 20,
"filter": null,
"order": { "type": "condition", "fieldKey": "updatedAt", "sortDir": "Desc" },
"locale": "en"
}
{
"items": [
{
"id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"contentType": "Article",
"fields": [
{ "type": "Text", "key": "title", "value": "Draft Post" },
{ "type": "Text", "key": "status", "value": "draft" }
],
"createdAt": "2026-03-18T11:00:00Z",
"updatedAt": "2026-03-18T15:30:00Z"
}
],
"total": 1,
"page": 1,
"pageSize": 20,
"totalPages": 1,
"hasMorePages": false
}
/preview-contents/{contentTypeKey}/ids
Get preview content IDs only
Returns only the IDs of matching draft/preview content items.
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
ids |
string[] | Array of content item IDs |
total |
integer | Total matching items |
Code examples
curl -X POST "https://api.contit.cloud/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/preview-contents/{contentTypeKey}/ids", content);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/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/preview-contents/{contentTypeKey}/ids",
json=payload,
headers=headers
)
data = response.json()
{
"filter": null,
"page": 1,
"pageSize": 100
}
{
"ids": [
"d4e5f6a7-b8c9-0123-defg-456789012345"
],
"total": 1
}
/preview-contents/{contentTypeKey}/{id}
Get single preview content
Retrieve a single draft/preview content item by its ID.
ReadAccess policy
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contentTypeKey |
string | ✓ | The content type key |
id |
string | ✓ | The content item ID (GUID) |
Responses
id |
string | Content item ID |
contentType |
string | Content type key |
fields |
ContentField[] | Array of typed fields |
Code examples
curl -X GET "https://api.contit.cloud/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/preview-contents/{contentTypeKey}/{id}");
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/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/preview-contents/{contentTypeKey}/{id}",
headers=headers
)
data = response.json()
{
"id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"contentType": "Article",
"fields": [
{ "type": "Text", "key": "title", "value": "Draft Post" },
{ "type": "RichText", "key": "body", "value": "<p>Work in progress...</p>" }
],
"createdAt": "2026-03-18T11:00:00Z",
"updatedAt": "2026-03-18T15:30:00Z"
}
/preview-contents/{contentTypeKey}/{id}
Get preview content with relations
Retrieve a draft/preview content item with expanded relations and locale.
ReadAccess policy
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contentTypeKey |
string | ✓ | The content type key |
id |
string | ✓ | The content item ID (GUID) |
Request Body application/json
| Property | Type | Required | Description |
|---|---|---|---|
locale |
string | — | Locale code |
includeRelations |
string[] | — | Relation field keys to expand |
Responses
id |
string | Content item ID |
contentType |
string | Content type key |
fields |
ContentField[] | Array of typed fields with relations expanded |
Code examples
curl -X POST "https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"locale": "locale_value",
"includeRelations": []
}'
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");
var content = new StringContent("{
\"locale\": \"locale_value\",
\"includeRelations\": []
}",
Encoding.UTF8, "application/json");
var response = await http.PostAsync(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}", content);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}",
{
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"locale": "locale_value",
"includeRelations": []
})
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"locale": "locale_value",
"includeRelations": []
}
response = requests.post(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}",
json=payload,
headers=headers
)
data = response.json()
{
"locale": "en",
"includeRelations": ["category"]
}
{
"id": "d4e5f6a7-b8c9-0123-defg-456789012345",
"contentType": "Article",
"fields": [
{ "type": "Text", "key": "title", "value": "Draft Post" },
{ "type": "Relation", "key": "category", "value": { "id": "e5f6a7b8-c9d0-1234-efgh-567890123456", "contentType": "Category", "fields": [{ "type": "Text", "key": "name", "value": "Technology" }] } }
],
"createdAt": "2026-03-18T11:00:00Z",
"updatedAt": "2026-03-18T15:30:00Z"
}
/preview-contents/{contentTypeKey}/aggregate
Aggregate preview content field values
Compute an aggregate on a field across matching draft/preview content items.
ReadAccess policy
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contentTypeKey |
string | ✓ | The content type key |
Request Body application/json
| Property | Type | Required | Description |
|---|---|---|---|
fieldKey |
string | ✓ | The field key to aggregate on |
aggregateType |
string | ✓ | Sum, Avg, Min, Max, or Count |
filter |
object | — | Optional filter |
Responses
value |
decimal | Computed aggregate value |
Code examples
curl -X POST "https://api.contit.cloud/preview-contents/{contentTypeKey}/aggregate" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fieldKey": "fieldKey_value",
"aggregateType": "aggregateType_value",
"filter": "filter_value"
}'
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");
var content = new StringContent("{
\"fieldKey\": \"fieldKey_value\",
\"aggregateType\": \"aggregateType_value\",
\"filter\": \"filter_value\"
}",
Encoding.UTF8, "application/json");
var response = await http.PostAsync(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/aggregate", content);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/aggregate",
{
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"fieldKey": "fieldKey_value",
"aggregateType": "aggregateType_value",
"filter": "filter_value"
})
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"fieldKey": "fieldKey_value",
"aggregateType": "aggregateType_value",
"filter": "filter_value"
}
response = requests.post(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/aggregate",
json=payload,
headers=headers
)
data = response.json()
{
"type": "condition",
"fieldKey": "wordCount",
"aggregateType": "Sum",
"filter": null
}
{
"value": 15420
}
/preview-contents/{contentTypeKey}/aggregategroup
Grouped aggregation on preview content
Compute an aggregate grouped by a field across matching draft/preview content items.
ReadAccess policy
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contentTypeKey |
string | ✓ | The content type key |
Request Body application/json
| Property | Type | Required | Description |
|---|---|---|---|
fieldKey |
string | ✓ | The field key to aggregate on |
aggregateType |
string | ✓ | Sum, Avg, Min, Max, or Count |
groupByFieldKey |
string | ✓ | The field key to group by |
filter |
object | — | Optional filter |
Responses
items |
AggregateGroupItem[] | Array of group-value / aggregate-value pairs |
Code examples
curl -X POST "https://api.contit.cloud/preview-contents/{contentTypeKey}/aggregategroup" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fieldKey": "fieldKey_value",
"aggregateType": "aggregateType_value",
"groupByFieldKey": "groupByFieldKey_value",
"filter": "filter_value"
}'
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");
var content = new StringContent("{
\"fieldKey\": \"fieldKey_value\",
\"aggregateType\": \"aggregateType_value\",
\"groupByFieldKey\": \"groupByFieldKey_value\",
\"filter\": \"filter_value\"
}",
Encoding.UTF8, "application/json");
var response = await http.PostAsync(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/aggregategroup", content);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/aggregategroup",
{
method: "POST",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"fieldKey": "fieldKey_value",
"aggregateType": "aggregateType_value",
"groupByFieldKey": "groupByFieldKey_value",
"filter": "filter_value"
})
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"fieldKey": "fieldKey_value",
"aggregateType": "aggregateType_value",
"groupByFieldKey": "groupByFieldKey_value",
"filter": "filter_value"
}
response = requests.post(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/aggregategroup",
json=payload,
headers=headers
)
data = response.json()
{
"type": "condition",
"fieldKey": "wordCount",
"aggregateType": "Avg",
"groupByFieldKey": "author",
"filter": null
}
{
"items": [
{ "groupValue": "Marco Rossi", "aggregateValue": 1250.5 },
{ "groupValue": "Anna Bianchi", "aggregateValue": 980.0 }
]
}
/preview-contents/{contentTypeKey}
Create or update preview content
Create a new draft content item or update an existing one.
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. Null to create. |
contentType |
string | ✓ | Content type key |
fields |
ContentField[] | ✓ | Array of typed fields |
clientInfo |
string | — | Optional client identifier |
Responses
id |
string | Content item ID |
contentType |
string | Content type key |
fields |
ContentField[] | Typed fields |
Code examples
curl -X PUT "https://api.contit.cloud/preview-contents/{contentTypeKey}" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "id_value",
"contentType": "contentType_value",
"fields": [],
"clientInfo": "clientInfo_value"
}'
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");
var content = new StringContent("{
\"id\": \"id_value\",
\"contentType\": \"contentType_value\",
\"fields\": [],
\"clientInfo\": \"clientInfo_value\"
}",
Encoding.UTF8, "application/json");
var response = await http.PutAsync(
"https://api.contit.cloud/preview-contents/{contentTypeKey}", content);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/preview-contents/{contentTypeKey}",
{
method: "PUT",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"id": "id_value",
"contentType": "contentType_value",
"fields": [],
"clientInfo": "clientInfo_value"
})
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"id": "id_value",
"contentType": "contentType_value",
"fields": [],
"clientInfo": "clientInfo_value"
}
response = requests.put(
"https://api.contit.cloud/preview-contents/{contentTypeKey}",
json=payload,
headers=headers
)
data = response.json()
{
"id": null,
"contentType": "Article",
"fields": [
{ "type": "Text", "key": "title", "value": "My Draft" },
{ "type": "RichText", "key": "body", "value": "<p>Work in progress</p>" }
],
"clientInfo": "cms-editor"
}
{
"id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890",
"contentType": "Article",
"fields": [
{ "type": "Text", "key": "title", "value": "My Draft" },
{ "type": "RichText", "key": "body", "value": "<p>Work in progress</p>" }
],
"createdAt": "2026-03-20T14:00:00Z",
"updatedAt": "2026-03-20T14:00:00Z"
}
/preview-contents/{contentTypeKey}/{id}
Delete preview content
Permanently delete a draft/preview content item.
WriteAccess policy
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contentTypeKey |
string | ✓ | The content type key |
id |
string | ✓ | The content item ID (GUID) |
Responses
Code examples
curl -X DELETE "https://api.contit.cloud/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 content = new StringContent("{}",
Encoding.UTF8, "application/json");
var response = await http.DeleteAsync(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}", content);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}",
{
method: "DELETE",
headers: {
"X-Api-Key": "YOUR_API_KEY",
}
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
response = requests.delete(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}",
headers=headers
)
data = response.json()
{
"success": true
}
/preview-contents/{contentTypeKey}/{id}/publish
Publish draft content
Publish a draft/preview content item, making it available via the published content endpoints.
WriteAccess policy
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contentTypeKey |
string | ✓ | The content type key |
id |
string | ✓ | The content item ID (GUID) |
Request Body application/json
| Property | Type | Required | Description |
|---|---|---|---|
clientInfo |
string | — | Optional client identifier for audit logging |
Responses
Code examples
curl -X PUT "https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}/publish" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"clientInfo": "clientInfo_value"
}'
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");
var content = new StringContent("{
\"clientInfo\": \"clientInfo_value\"
}",
Encoding.UTF8, "application/json");
var response = await http.PutAsync(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}/publish", content);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}/publish",
{
method: "PUT",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"clientInfo": "clientInfo_value"
})
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"clientInfo": "clientInfo_value"
}
response = requests.put(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}/publish",
json=payload,
headers=headers
)
data = response.json()
{
"clientInfo": "cms-editor"
}
{
"success": true
}
/preview-contents/{contentTypeKey}/{id}/unpublish
Unpublish content
Unpublish a content item, reverting it to draft-only status and removing it from published content endpoints.
WriteAccess policy
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contentTypeKey |
string | ✓ | The content type key |
id |
string | ✓ | The content item ID (GUID) |
Request Body application/json
| Property | Type | Required | Description |
|---|---|---|---|
clientInfo |
string | — | Optional client identifier for audit logging |
Responses
Code examples
curl -X PUT "https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}/unpublish" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"clientInfo": "clientInfo_value"
}'
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "YOUR_API_KEY");
var content = new StringContent("{
\"clientInfo\": \"clientInfo_value\"
}",
Encoding.UTF8, "application/json");
var response = await http.PutAsync(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}/unpublish", content);
response.EnsureSuccessStatusCode();
var json = await response.Content.ReadAsStringAsync();
const response = await fetch(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}/unpublish",
{
method: "PUT",
headers: {
"X-Api-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"clientInfo": "clientInfo_value"
})
}
);
const data = await response.json();
import requests
headers = {"X-Api-Key": "YOUR_API_KEY"}
payload = {
"clientInfo": "clientInfo_value"
}
response = requests.put(
"https://api.contit.cloud/preview-contents/{contentTypeKey}/{id}/unpublish",
json=payload,
headers=headers
)
data = response.json()
{
"clientInfo": "cms-editor"
}
{
"success": true
}