Content Type
Last updated: July 3, 2026
A Content Type is the template (schema) that content follows. It defines which fields the content has and, for each field, its type, whether it is localized, whether it is required, and its validation rules. Take a "Product" in a clothing store as an example: a single Content Type "Product" defines the set of attributes such as product name, price, description, and photo, while each individual product is created as a Content that follows this template.
In CMA, a Content Type is a sub-resource of Space, and its path is based on /spaces/{spaceId}/content-types. Management operations such as create, update, and unpublish are performed on CMA, and the published snapshot is delivered through CDA. Note that a Content Type is published automatically on create and update, so unlike Content it reaches the Published status right away without a separate publish call (see Status and automatic publishing below).
Resource structure
The following is the single-read response for the Content Type "Product". Along with sys (system properties), it has body properties such as name, displayField, publishWithAuthor, and fields.
{
"sys": {
"id": "3trmXRM3RqbgSnifyg7PAmlxvX4fGY",
"type": "ContentType",
"space": { "sys": { "id": "tcq4V2Xb", "type": "Refer", "targetType": "Space" } },
"publish": {
"version": 7,
"at": "2026-06-18T03:05:11.453Z",
"firstAt": "2026-06-17T16:22:01.081Z",
"counter": 4,
"by": { "sys": { "id": "3p4tcFbQRwz503VXdtHXNI5dZH5TVB", "type": "Refer", "targetType": "User" } }
},
"createdBy": { "sys": { "id": "3p4tcFbQRwz503VXdtHXNI5dZH5TVB", "type": "Refer", "targetType": "User" } },
"createdAt": "2026-06-17T16:22:01.047Z",
"updatedBy": { "sys": { "id": "3p4tcFbQRwz503VXdtHXNI5dZH5TVB", "type": "Refer", "targetType": "User" } },
"updatedAt": "2026-06-18T03:05:11.453Z",
"version": 8,
"status": "Published"
},
"name": "Product",
"displayField": "productName",
"publishWithAuthor": false,
"fields": [
{ "id": "3hzbux8gsnb4h", "name": "Product Name", "apiName": "productName", "type": "ShortText", "localized": true, "required": true, "validations": [], "disabled": false },
{ "id": "4usptben4t1z", "name": "Price", "apiName": "price", "type": "Long", "localized": false, "required": false, "validations": [], "disabled": false },
{ "id": "21zuem8be6o6j", "name": "Description", "apiName": "description", "type": "RichText", "localized": true, "required": false, "validations": [], "disabled": false },
{ "id": "2mr5ylgtheegr", "name": "Photo", "apiName": "photo", "type": "Refer", "localized": false, "required": false, "validations": [], "disabled": false, "targetType": "Media" },
{
"id": "5bpmiwo2woq8",
"name": "Brand",
"apiName": "brand",
"type": "Refer",
"localized": false,
"required": false,
"validations": [
{ "referContentType": [ { "sys": { "id": "3trmXRM3RqbgSnifyg7PLjv7PDSdHg", "type": "Refer", "targetType": "ContentType" } } ] }
],
"disabled": false,
"targetType": "Content"
}
]
}Key properties:
sys.id: The unique identifier of the Content Type. It goes into{contentTypeId}in the single-read, update, and delete paths.name: The name of the Content Type (e.g.Product).displayField: TheapiNameof the field used to represent each Content in the content studio list (e.g.productName).publishWithAuthor: Whether to include author information when a Content is published. The default isfalse.fields: The list of fields this template defines. The structure of each entry is described in Fields below.
The photo field has type Refer and targetType Media, so it points to an uploaded file asset. The brand field is Refer + targetType: Content, and the referContentType in validations restricts it to reference only Content of a specific Content Type (here, "Brand").
System properties (sys)
Every Content Type carries common system properties and Content Type specific properties in the sys object. space, createdBy, and updatedBy are in the Refer shape ({ "sys": { "id", "type": "Refer", "targetType" } }).
| Property | Type | Description |
|---|---|---|
id | string | Unique resource identifier. |
type | string | Resource kind. For a Content Type this is always "ContentType". |
space | Refer<Space> | The Space this Content Type belongs to. |
createdBy | Refer<User> | The user who created it. |
createdAt | string (date-time) | Creation time. |
updatedBy | Refer<User> | The user who last updated it. |
updatedAt | string (date-time) | Last update time. |
version | integer (≥1) | Resource version. It increases by 1 with every change such as create, update, publish, and unpublish. |
status | string (enum) | Publish status. One of Draft, Changed, Published, Archived. |
publish | object | Publish history. See the keys below. |
Keys of the publish object:
| Key | Type | Description |
|---|---|---|
version | integer | The sys.version at the time of the last publish. |
at | string (date-time) | Last publish time. |
firstAt | string (date-time) | First publish time. Preserved even after unpublishing. |
counter | integer | Cumulative publish count. |
by | Refer<User> | The user who last published. |
When you unpublish (DELETE .../publish), version, at, and by are removed from publish, leaving only firstAt and counter.
A Content Type's sys does not have the contentType (self-reference) property found in a Content's sys, because a Content Type is itself the template. It also has no archive property.
Fields
fields is the list of fields this Content Type defines. Each entry has the following structure (FieldDefinition).
| Key | Type | Description |
|---|---|---|
id | string (1-64) | The unique identifier of the field. Assigned automatically on creation. |
name | string (1-50) | The field name shown in the content studio (e.g. Product Name). |
apiName | string (1-64) | The key that refers to this field in the API. Pattern ^[a-zA-Z0-9][a-zA-Z0-9-_]*$ (starts with a letter or digit, then letters, digits, -, _). |
type | string (enum) | The type of the field. See Field types (type) below. |
localized | boolean | Whether it can hold multilingual values. |
required | boolean | Whether input is required. |
validations | array | The list of validation rules applied to the value. An empty array [] if there are no rules. See Validations (validations) below. |
disabled | boolean | Whether it is disabled. |
targetType | string (enum) | Only when type is Refer. Whether the reference target is Content or Media. |
items | object | Only when type is Array. The definition of the array elements (a Refer element or a ShortText element). |
Field types (type)
type determines how the value is stored and retrieved. Some types behave differently in search.
type | Meaning | Notes |
|---|---|---|
ShortText | Short single-line text. | Suited for exact keyword lookup. |
LongText | Long body text. | Supports full-text similarity search. |
RichText | Formatted body. | Not searchable; used for formatted presentation. |
Long | Integer. | Example: price price. |
Number | Real number (including decimals). | |
Boolean | True/false. | |
Date | Date and time. | |
Json | Arbitrary JSON structure. | |
Location | Location (coordinates). | |
Refer | A reference pointing to another resource. | Specify Content or Media with targetType. |
Array | An array holding multiple values. | Accompanied by an element definition in items. |
In the "Product" example, Product Name is ShortText, Price is Long, Description is RichText, Photo is Refer (targetType: Media), and Brand is Refer (targetType: Content).
Validations (validations)
validations is an array of rules to apply to the field value. Each entry holds one of the following keys.
| Key | Shape | Description |
|---|---|---|
size | { "min", "max" } | The minimum and maximum of text length or array size. |
unique | boolean | Forbids duplicate values within the same Content Type. |
regexp | { "pattern", "flags" } | The value must match the regular expression pattern. pattern required. |
prohibitRegexp | { "pattern", "flags" } | Rejects the value if it matches the regular expression pattern. pattern required. |
in | array | The list of allowed values. Only values in the list pass. |
range | { "min", "max" } | The minimum and maximum of a numeric value. |
dateRange | { "min", "max", "after", "before" } | The allowed range of a date value. |
mediaMimetypeGroup | array | The list of file types allowed in a Refer (Media) field. See the enum below. |
mediaImageDimensions | { "width", "height" } | Pixel constraints on the width and height of an image. |
mediaFileSize | { "min", "max" } | The minimum and maximum of file size (bytes). |
referContentType | array | The list of Content Types allowed for reference in a Refer (Content) field. Each entry is in the Refer<ContentType> shape. |
message | string | A custom message to show when validation fails. |
Values usable in mediaMimetypeGroup (12 of them): Attachment, Plaintext, Image, Audio, Video, RichText, Presentation, Spreadsheet, PdfDocument, Archive, Code, Markup.
The brand field in the "Product" example uses referContentType to restrict references to only the "Brand" Content Type (whose sys.id is 3trmXRM3RqbgSnifyg7PLjv7PDSdHg).
Status and automatic publishing
A Content Type is published automatically on create, update, and partial update. This differs from Content. A Content only enters the delivery path after a separate publish call following creation, whereas a Content Type's create response comes back as status: "Published" right away.
status is one of the following four values.
status | Meaning |
|---|---|
Draft | Not yet published. |
Changed | Has been published before, but later changes are not yet published. |
Published | Published with no unpublished changes. |
Archived | Archived. |
sys.version increases by 1 with every change. Because a Content Type is updated and published at once, a single update raises version by 2 (the update itself +1, the automatic publish +1). In the "Notice" example, version is 2 right after creation (create +1, automatic publish +1) and publish.counter is 1. After a subsequent update, version becomes 4 and publish.counter becomes 2.
The only path by which a Content Type becomes Draft is an explicit unpublish (DELETE .../publish). When you unpublish, status becomes Draft, and version, at, and by are removed from the publish object, leaving only firstAt and counter.
Constraints
| Target | Constraint |
|---|---|
name (Content Type) | 1-64 characters, required. |
description | 128 characters or fewer, optional. |
fields | 1-80 on create, at least 1 on update. |
name (field) | 1-50 characters, required. |
apiName (field) | 1-64 characters, pattern ^[a-zA-Z0-9][a-zA-Z0-9-_]*$, required. |
Delete guard: Deletion must satisfy both conditions.
- If even one Content uses this Content Type, it cannot be deleted (
WGL422010). Delete all such Content first. This check is evaluated first. - A Content Type in a published state (
Published/Changed) cannot be deleted directly (WGL422009). Unpublish it first (DELETE .../publish) to make itDraft, then delete it (anArchivedContent Type can also be deleted).
API
The base URL for all endpoints below is https://cma.weegloo.com/v1, and a Bearer token that authenticates against CMA is required in the Authorization header. Update, partial update, publish, and unpublish must also send the X-Weegloo-Version header (the current resource's sys.version) for optimistic concurrency control.
Related documents
- Content modeling: How to create a Content Type in the content studio.
- Status and publishing: What publishing and versions mean.
