API reference

Content Types

API referencehttps://api.contit.cloud

Content Types

Endpoints for managing content type definitions (schemas), including their fields, validation rules, and display settings.

GET /content-types

List all content types

Retrieve all content type definitions in the workspace, including their field schemas.

Requires the ReadAccess policy

Responses

200Success
(array)ContentTypeModel[]Array of content type definitions
401Unauthorized

Code examples

curl -X GET "https://api.contit.cloud/content-types" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response 200
[
  {
    "id": "a1b2c3d4-0000-0000-0000-000000000001",
    "name": "Article",
    "key": "Article",
    "icon": "newspaper",
    "groupName": "Content",
    "fieldTitleKey": "title",
    "sortIndex": 0,
    "versioningDisabled": false,
    "fields": [
      {
        "key": "title",
        "type": "Text",
        "name": "Title",
        "required": true,
        "translatable": true,
        "sortIndex": 0
      },
      {
        "key": "body",
        "type": "RichText",
        "name": "Body",
        "required": false,
        "translatable": true,
        "sortIndex": 1
      },
      {
        "key": "publishDate",
        "type": "DateTime",
        "name": "Publish Date",
        "required": false,
        "translatable": false,
        "sortIndex": 2
      }
    ]
  },
  {
    "id": "a1b2c3d4-0000-0000-0000-000000000002",
    "name": "Product",
    "key": "Product",
    "icon": "shopping_cart",
    "groupName": "Commerce",
    "fieldTitleKey": "name",
    "sortIndex": 1,
    "versioningDisabled": false,
    "fields": [
      {
        "key": "name",
        "type": "Text",
        "name": "Product Name",
        "required": true,
        "translatable": true,
        "sortIndex": 0
      },
      {
        "key": "price",
        "type": "Number",
        "name": "Price",
        "required": true,
        "translatable": false,
        "sortIndex": 1
      }
    ]
  }
]
Try it Live
GET /content-types/{key}

Get single content type

Retrieve a single content type definition by its key.

Requires the ReadAccess policy

Path parameters

NameTypeRequiredDescription
keystringThe content type key (e.g. 'Article', 'Product')

Responses

200Success
idstringContent type ID
namestringDisplay name
keystringUnique key
iconstringMaterial icon name
groupNamestringLogical group name
fieldTitleKeystringField key used as display title
sortIndexintegerSort order
versioningDisabledbooleanWhether versioning is disabled
fieldsFieldDefinition[]Array of field definitions
401Unauthorized
404Not Found

Code examples

curl -X GET "https://api.contit.cloud/content-types/{key}" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response 200
{
  "id": "a1b2c3d4-0000-0000-0000-000000000001",
  "name": "Article",
  "key": "Article",
  "icon": "newspaper",
  "groupName": "Content",
  "fieldTitleKey": "title",
  "sortIndex": 0,
  "versioningDisabled": false,
  "fields": [
    {
      "key": "title",
      "type": "Text",
      "name": "Title",
      "required": true,
      "translatable": true,
      "sortIndex": 0
    },
    {
      "key": "body",
      "type": "RichText",
      "name": "Body",
      "required": false,
      "translatable": true,
      "sortIndex": 1
    }
  ]
}
Try it Live
PUT /content-types

Create or update content type

Create a new content type definition or update an existing one. Include the full field schema in the request.

Requires the WriteAccess policy

Request body application/json

PropertyTypeRequiredDescription
id string — Content type ID. Null or omit to create.
name string Display name
key string Unique key (alphanumeric, PascalCase recommended)
icon string — Material icon name
groupName string — Logical group name for organization
fieldTitleKey string — Field key to use as display title in lists
sortIndex integer — Sort order among content types
versioningDisabled boolean — Whether to disable versioning for this type
fields FieldDefinition[] Array of field definitions

Responses

200Success — returns the saved content type
idstringContent type ID
namestringDisplay name
keystringUnique key
fieldsFieldDefinition[]Field definitions
401Unauthorized

Code examples

curl -X PUT "https://api.contit.cloud/content-types" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "id_value",
  "name": "name_value",
  "key": "key_value",
  "icon": "icon_value",
  "groupName": "groupName_value",
  "fieldTitleKey": "fieldTitleKey_value",
  "sortIndex": 1,
  "versioningDisabled": true,
  "fields": []
}'
Example request
{
  "name": "FAQ",
  "key": "FAQ",
  "icon": "help",
  "groupName": "Support",
  "fieldTitleKey": "question",
  "sortIndex": 5,
  "versioningDisabled": false,
  "fields": [
    { "key": "question", "type": "Text", "name": "Question", "required": true, "translatable": true, "sortIndex": 0 },
    { "key": "answer", "type": "RichText", "name": "Answer", "required": true, "translatable": true, "sortIndex": 1 }
  ]
}
Example response 200
{
  "id": "b2c3d4e5-0000-0000-0000-000000000003",
  "name": "FAQ",
  "key": "FAQ",
  "icon": "help",
  "groupName": "Support",
  "fieldTitleKey": "question",
  "sortIndex": 5,
  "versioningDisabled": false,
  "fields": [
    { "key": "question", "type": "Text", "name": "Question", "required": true, "translatable": true, "sortIndex": 0 },
    { "key": "answer", "type": "RichText", "name": "Answer", "required": true, "translatable": true, "sortIndex": 1 }
  ]
}
Try it Live
DELETE /content-types/{key}

Delete content type

Delete a content type definition. The content type must have no existing content items (must be empty).

Requires the WriteAccess policy

Path parameters

NameTypeRequiredDescription
keystringThe content type key to delete

Responses

200Success — content type deleted
401Unauthorized
404Not Found
409Conflict — content type has existing content items

Code examples

curl -X DELETE "https://api.contit.cloud/content-types/{key}" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response 200
{
  "success": true
}
Try it Live