Skip to content

Update a content type

PUT
/api/content/management/types/{id}
curl --request PUT \
--url https://example.com/api/content/management/types/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "Article", "displayName": "News Article", "apiName": "article", "description": "example", "settings": { "isSitePage": true, "requiresNativeFile": true }, "isLocked": true, "fields": [ { "name": "title", "description": "Title", "datatype": "text", "required": true, "isSearchable": true, "hidden": true, "readOnly": true, "defaultValue": "example", "valuecount": "single", "settings": { "caas": { "customValidators": [ "example" ], "description": "example", "editor": { "additionalProperty": "example" }, "valueCountRange": "example" }, "customEditor": { "enabled": true, "url": "example" }, "referenceType": "example", "allowMultiple": true, "maxLength": 1, "minValue": 1, "maxValue": 1 }, "referenceType": { "type": "example", "types": [ "example" ] }, "config": { "height": 300, "plugins": [ "example" ], "toolbar": "example", "promotion": true, "relative_urls": true, "convert_urls": true }, "linkRefTypes": [ "example" ], "imgRefTypes": [ "example" ], "options": [ { "name": "example", "value": "example" } ], "detailPagesOnly": true, "showTime": true, "isCustomJSONForm": true, "customJSONFormDef": "example" } ] }'

Updates an existing content type definition. Type must not be locked.

id
required

Type ID

string
Media typeapplication/json
object
name

Type name

string
Example
Article
displayName

Human-readable type name

string
Example
News Article
apiName

API-friendly name (camelCase)

string
Example
article
description

Type description

string
settings

Type-level settings

object
isSitePage

Whether this type represents a site page

boolean
requiresNativeFile

Whether an item of this type must have a native file attached to save

boolean
isLocked

Whether type is locked for editing

boolean
fields

Field definitions

Array<object>
object
name
required

Field name (used as key)

string
Example
title
description

Human-readable field label

string
Example
Title
datatype
required

Field data type

string
Allowed values: text largetext richtext singleselect multiselect boolean number decimal sitepage datetime json reference contentquery
required

Whether field is required

boolean
isSearchable

Whether field is indexed for search

boolean
hidden

Whether field is hidden in the UI

boolean
readOnly

Whether field is read-only

boolean
defaultValue

Default field value

valuecount

Whether field accepts single or multiple values

string
Allowed values: single multiple
settings

Field-specific settings

object
caas

CAAS-specific settings

object
customValidators

Custom validation rules

Array
description

CAAS field description

string
editor

Editor configuration

object
key
additional properties
valueCountRange

Value count range constraint

customEditor

Custom editor settings

object
enabled

Whether custom editor is enabled

boolean
url

Custom editor URL

string
referenceType

For reference fields: the target content type

string
allowMultiple

Whether multiple values are allowed

boolean
maxLength

Maximum character length

number
minValue

Minimum numeric value

number
maxValue

Maximum numeric value

number
referenceType

For reference fields: the target content type(s)

object
type

Referenced single asset type

string
types

Referenced multiple asset types

Array<string>
config

Rich text editor configuration (TinyMCE)

object
height

Editor height in pixels

number
Example
300
plugins

TinyMCE plugins to enable

Array<string>
toolbar

Toolbar configuration string

string
promotion

Show TinyMCE promotion

boolean
relative_urls

Use relative URLs

boolean
convert_urls

Convert URLs

boolean
linkRefTypes

Allowed link reference types for rich text

Array<string>
imgRefTypes

Allowed image reference types for rich text

Array<string>
options

Available options for select fields

Array<object>
object
name
required

Option display name

string
value
required

Option value

string
detailPagesOnly

Only show detail pages in site page picker

boolean
showTime

For datetime fields: capture hour and minute along with the date

boolean
isCustomJSONForm

Whether to use custom JSON form editor

boolean
customJSONFormDef

Custom JSON form definition (svelte-formly format)

string

Type updated successfully

Media typeapplication/json
object
id
required
string
Examplegenerated
{
"id": "example"
}

Invalid request or type is locked