ContentSchema
Interface
Complete content schema defining all custom fields for a structured category.
Attached to categories with contentMode: 'structured'.
Content articles in structured categories populate their customData field
according to this schema instead of using the free-form body editor.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Ordered array of field definitions.<br>Fields are rendered in the admin editor in the order they appear here.<br>Each field's |
SchemaField
Interface
A single field definition in a content schema. Defines the structure, constraints, and display properties of one custom field.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Default value pre-filled when creating new content.<br>The type of this value should match the field's |
|
| Yes | Sub-field definitions for |
|
| Yes | Help text displayed below the field in the admin editor.<br>Used to provide additional context or instructions to content editors. |
|
| Yes | Display label for individual items in an |
|
| No | Unique field identifier used as the property name in the content's |
|
| No | Human-readable label displayed in the admin editor above the field.<br>Can contain spaces and special characters. Used for UI only, not in the data. |
|
| Yes | Maximum number of items allowed in an |
|
| Yes | Minimum number of items required in an |
|
| Yes | Available options for |
|
| Yes | Placeholder text shown in the input field when empty.<br>Only used for display in the admin editor.<br>Applies to |
|
| Yes | Whether a value must be provided when saving the content.<br>Defaults to |
|
| No | Field type that determines the editor widget, validation, and serialization.<br>See SchemaFieldType for the complete list and how each type maps<br>to a value in |
|
| Yes | Validation rules for this field.<br>Applied both in the admin editor (client-side) and on the API (server-side).<br>See SchemaFieldValidation for which rules apply to which field types. |
SchemaFieldOption
Interface
Option definition for select and multiselect field types.
Only meaningful when the parent field's type is 'select' or 'multiselect'.
Property | Type | Optional | Description |
|---|---|---|---|
|
| No | Human-readable label displayed in the admin editor's dropdown.<br>Can contain spaces and special characters. |
|
| No | Machine-readable value stored in |
SchemaFieldType
TypeAlias
Supported field types in a content schema.
Each type determines how the field is rendered in the admin editor and how
its value is serialized in the customData object:
Type | Value in customData |
|---|---|
| Plain text string |
| Multi-line text string |
| HTML string (converted from TipTap editor) |
| Numeric value (integer or float) |
|
|
| Single string from the options list |
| Array of strings from the options list |
| CDN URL string of the uploaded image |
| CDN URL string of the uploaded file |
| Full URL string (validated) |
| Email address string (validated) |
| ISO 8601 date string ( |
| ISO 8601 datetime string |
| Hex color string (e.g. |
| Nested object with sub-fields |
| Array of objects with sub-fields |
| Resolved data from a DataSource reference |
type SchemaFieldType = "string" | "text" | "richtext" | "number" | "boolean" | "select" | "multiselect" | "image" | "file" | "url" | "email" | "date" | "datetime" | "color" | "object" | "array" | "dataSource"SchemaFieldValidation
Interface
Validation rules for a schema field.
Which rules are applicable depends on the field's type:
minLength/maxLength: apply tostring,text,richtext,url,emailmin/max: apply tonumberpattern: applies tostring,text
Invalid combinations (e.g. minLength on a number field) are ignored.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Maximum numeric value (inclusive).<br>Only applies to |
|
| Yes | Maximum text length (inclusive).<br>Applies to string-like field types ( |
|
| Yes | Minimum numeric value (inclusive).<br>Only applies to |
|
| Yes | Minimum text length (inclusive).<br>Applies to string-like field types ( |
|
| Yes | Regular expression pattern for validation.<br>Only applies to |