API reference

Content (V2)

API referencehttps://api.contit.cloud

Content (V2)

V2 content endpoints use a simplified flat-dictionary model for fields and a separate translations dictionary for localized values.

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

Get content IDs only (V2)

Returns only the IDs of matching content items using V2 filtering.

Richiede la policy ReadAccess

Parametri del percorso

NomeTipoObbligatorioDescrizione
contentTypeKeystringThe content type key

Corpo della richiesta application/json

ProprietàTipoObbligatorioDescrizione
filter object — Filter tree to restrict results
page integer — Page number (1-based)
pageSize integer — Number of items per page

Risposte

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

Esempi di codice

curl -X POST "https://api.contit.cloud/v2/contents/{contentTypeKey}/ids" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "filter": "filter_value",
  "page": 1,
  "pageSize": 1
}'
Esempio di richiesta
{
  "filter": {
    "type": "and",
    "conditions": [
      { "type": "condition", "fieldKey": "active", "operator": "e", "value": true }
    ]
  },
  "page": 1,
  "pageSize": 50
}
Esempio di risposta 200
{
  "ids": [
    "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "b2c3d4e5-f6a7-8901-bcde-f12345678901"
  ],
  "total": 2
}
Prova Live
GET /v2/contents/{contentTypeKey}/{id} V2

Get single content (V2)

Retrieve a single content item by ID using the V2 flat-dictionary model.

Richiede la policy ReadAccess

Parametri del percorso

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

Risposte

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

Esempi di codice

curl -X GET "https://api.contit.cloud/v2/contents/{contentTypeKey}/{id}" \
  -H "X-Api-Key: YOUR_API_KEY"
Esempio di risposta 200
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "fields": {
    "title": "Breaking News",
    "body": "<p>Full article content here.</p>",
    "category": "news",
    "publishDate": "2026-03-15T10:30:00Z",
    "featured": true
  },
  "translations": {
    "title": {
      "en": "Breaking News",
      "it": "Ultime Notizie"
    },
    "body": {
      "en": "<p>Full article content here.</p>",
      "it": "<p>Contenuto completo dell'articolo.</p>"
    }
  }
}
Prova Live
PUT /v2/contents/{contentTypeKey} V2

Create or update content (V2)

Create a new content item (omit id) or update an existing one using the V2 flat-dictionary model with separate translations.

Richiede la policy WriteAccess

Parametri del percorso

NomeTipoObbligatorioDescrizione
contentTypeKeystringThe content type key

Corpo della richiesta application/json

ProprietàTipoObbligatorioDescrizione
id string — Content item ID. Omit or null to create a new item.
fields object Flat dictionary of field key to value
translations object — Dictionary of field key to locale-value pairs for localized fields
clientInfo string — Optional client identifier for audit logging

Risposte

200Success — returns the saved V2 content item
idstringContent item ID (generated if new)
fieldsobjectFlat dictionary of field key to value
translationsobjectTranslations dictionary
401Unauthorized

Esempi di codice

curl -X PUT "https://api.contit.cloud/v2/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"
}'
Esempio di richiesta
{
  "id": null,
  "fields": {
    "title": "New Article",
    "body": "<p>Content goes here.</p>",
    "category": "blog"
  },
  "translations": {
    "title": {
      "en": "New Article",
      "it": "Nuovo Articolo"
    },
    "body": {
      "en": "<p>Content goes here.</p>",
      "it": "<p>Il contenuto va qui.</p>"
    }
  },
  "clientInfo": "cms-editor-v2"
}
Esempio di risposta 200
{
  "id": "c9d0e1f2-a3b4-5678-ghij-901234567890",
  "fields": {
    "title": "New Article",
    "body": "<p>Content goes here.</p>",
    "category": "blog"
  },
  "translations": {
    "title": {
      "en": "New Article",
      "it": "Nuovo Articolo"
    },
    "body": {
      "en": "<p>Content goes here.</p>",
      "it": "<p>Il contenuto va qui.</p>"
    }
  }
}
Prova Live