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: The apiName of 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 is false.
  • 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" } }).

PropertyTypeDescription
idstringUnique resource identifier.
typestringResource kind. For a Content Type this is always "ContentType".
spaceRefer<Space>The Space this Content Type belongs to.
createdByRefer<User>The user who created it.
createdAtstring (date-time)Creation time.
updatedByRefer<User>The user who last updated it.
updatedAtstring (date-time)Last update time.
versioninteger (≥1)Resource version. It increases by 1 with every change such as create, update, publish, and unpublish.
statusstring (enum)Publish status. One of Draft, Changed, Published, Archived.
publishobjectPublish history. See the keys below.

Keys of the publish object:

KeyTypeDescription
versionintegerThe sys.version at the time of the last publish.
atstring (date-time)Last publish time.
firstAtstring (date-time)First publish time. Preserved even after unpublishing.
counterintegerCumulative publish count.
byRefer<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).

KeyTypeDescription
idstring (1-64)The unique identifier of the field. Assigned automatically on creation.
namestring (1-50)The field name shown in the content studio (e.g. Product Name).
apiNamestring (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, -, _).
typestring (enum)The type of the field. See Field types (type) below.
localizedbooleanWhether it can hold multilingual values.
requiredbooleanWhether input is required.
validationsarrayThe list of validation rules applied to the value. An empty array [] if there are no rules. See Validations (validations) below.
disabledbooleanWhether it is disabled.
targetTypestring (enum)Only when type is Refer. Whether the reference target is Content or Media.
itemsobjectOnly 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.

typeMeaningNotes
ShortTextShort single-line text.Suited for exact keyword lookup.
LongTextLong body text.Supports full-text similarity search.
RichTextFormatted body.Not searchable; used for formatted presentation.
LongInteger.Example: price price.
NumberReal number (including decimals).
BooleanTrue/false.
DateDate and time.
JsonArbitrary JSON structure.
LocationLocation (coordinates).
ReferA reference pointing to another resource.Specify Content or Media with targetType.
ArrayAn 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.

KeyShapeDescription
size{ "min", "max" }The minimum and maximum of text length or array size.
uniquebooleanForbids 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.
inarrayThe 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.
mediaMimetypeGrouparrayThe 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).
referContentTypearrayThe list of Content Types allowed for reference in a Refer (Content) field. Each entry is in the Refer<ContentType> shape.
messagestringA 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.

statusMeaning
DraftNot yet published.
ChangedHas been published before, but later changes are not yet published.
PublishedPublished with no unpublished changes.
ArchivedArchived.

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

TargetConstraint
name (Content Type)1-64 characters, required.
description128 characters or fewer, optional.
fields1-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 it Draft, then delete it (an Archived Content 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.