Create a content type
Creates a content model with its fields. The body is the same one the DUMA admin sends.
POST
https://api.duma-business.com/v1/cms/manage/content-typescontent:modelsSecret key only
Secret workspace key only (dk_sec_…); legacy dcms_… content keys are refused with 401.
Every authenticated request is written to the workspace’s audit log with the key as the actor.
The response’s fields includes private fields.
A body that fails validation is a 400; invalid field definitions are a 422 with issues: [{ field, message }]; a key already in use is a 409 conflict.
Request example
Example request
curl -X POST "https://api.duma-business.com/v1/cms/manage/content-types" \
-H "Authorization: Bearer dk_sec_…" \
-H "Content-Type: application/json" \
-d '{
"key": "blog-post",
"name": "Blog post",
"description": "News from the café",
"kind": "collection",
"fields": [
{
"key": "title",
"label": "Title",
"type": "text",
"required": true
},
{
"key": "slug",
"label": "Slug",
"type": "slug",
"required": true,
"unique": true,
"slugSource": "title"
},
{
"key": "hero",
"label": "Hero image",
"type": "media",
"mediaGroups": [
"image"
]
},
{
"key": "body",
"label": "Body",
"type": "richText"
}
],
"titleField": "title",
"previewUrl": "https://www.oakandember.co.uk/blog/preview"
}'Request body
JSON, sent with Content-Type: application/json.
keystringRequired- Lowercase letters, numbers,
-and_, starting with a letter; up to 64 characters and unique in the workspace. namestringRequired- Up to 120 characters.
fields[].keystringRequired- Letters, numbers and underscores, starting with a letter; up to 64 characters. Keys the delivery API uses (id, type, locale, fields…) are reserved.
fields[].labelstringRequired- Up to 120 characters.
fields[].typestringRequired- The kind of value the field holds.
textlongTextrichTextnumberbooleandatedateTimeselectslugemailurlcolorlocationjsonmediareferencegroup
Optional
descriptionstring- Up to 1000 characters.
kindstringDefault collectioncollectionholds many entries;singletonexactly one.collectionsingletonfieldsarrayDefault []- Field definitions, up to 100.
fields[].descriptionstring- Help text, up to 500 characters.
fields[].requiredboolean- Enforced when an entry is published.
fields[].uniqueboolean- Text, slug, email, URL and number fields only; not inside a group.
fields[].privateboolean- Never sent by the delivery API.
fields[].multipleboolean- Holds a list. Select, media, reference and group fields only.
fields[].sharedboolean- One value in every language. Top-level fields only; not unique fields or slugs.
fields[].minLengthnumber- Minimum length of a text value.
fields[].maxLengthnumber- Maximum length of a text value.
fields[].minnumber- Smallest number allowed.
fields[].maxnumber- Largest number allowed.
fields[].integerboolean- Whole numbers only.
fields[].patternstring- A regular expression the value must match, up to 200 characters.
fields[].patternMessagestring- The message shown when
patterndoes not match. fields[].minItemsnumber- Fewest items in a list field.
fields[].maxItemsnumber- Most items in a list field.
fields[].optionsarray- The choices of a select field, up to 200.
fields[].referenceTypesarray- Content type keys a reference field may point at. They must exist.
fields[].mediaGroupsarray- The kinds of media a media field accepts.
imagevideoaudiodocumentfields[].slugSourcestring- For a slug field, the field it is generated from.
fields[].fieldsarray- For a group field, its own field definitions. Groups nest at most two deep.
fields[].defaultValueany- The value a new entry starts with. Not sent by the delivery API.
titleFieldstring- The key of a single text-like field that names each entry.
previewUrlstring- A URL on your site for previewing drafts, up to 500 characters.
Response
Response · 201
{
"data": {
"id": "1f3a5c7e-9b2d-4f6a-8c0e-3d5f7a9b1c2e",
"key": "blog-post",
"name": "Blog post",
"description": "News from the café",
"kind": "collection",
"titleField": "title",
"previewUrl": "https://www.oakandember.co.uk/blog/preview",
"schemaVersion": 1,
"fields": [
{
"key": "title",
"label": "Title",
"type": "text",
"required": true
},
{
"key": "slug",
"label": "Slug",
"type": "slug",
"required": true,
"unique": true,
"slugSource": "title"
},
{
"key": "hero",
"label": "Hero image",
"type": "media",
"mediaGroups": [
"image"
]
},
{
"key": "body",
"label": "Body",
"type": "richText"
}
],
"createdAt": "2026-10-28T10:30:00.000Z",
"updatedAt": "2026-10-28T10:30:00.000Z"
}
}