Create new type documents.

Use the /types end-point to create a new type document.

Example elements

Category element

{
   "key": "MyCategoryElement",
   "label": "My Category Element",
   "elementType": "category",
   "restrictedParents": ["63b5f83684cddba687cb41eca328a41a"],
      - Optional. Indicates that categories can only been chosen from the specified parent. Currently only supports a single entry.
   "searchKey": "string1" | "string2" | "string3" | "string4" | "sortableString1" | "sortableString2" | "sortableString3" | "sortableString4",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "helpText": "Please select a category from the list"
}

Date (Date and Time) element

{
   "key": "MyDateElement",
   "label": "My Date Element",
   "elementType": "datetime",
   "fieldType": "date-time",
   "searchKey": "date1" | "date2" | "sortableDate1" | "sortableDate2",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "allowMultipleValues": true,
   "minimumValues": 1,
   "maximumValues": 50,
   "fieldLabel": "Date",
   "helpText": "Please select a date and time"
}

Date (Date only) element

{
   "key": "MyDateElement",
   "label": "My Date Element",
   "elementType": "datetime",
   "fieldType": "date",
   "searchKey": "date1" | "date2" | "sortableDate1" | "sortableDate2",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "allowMultipleValues": true,
   "minimumValues": 1,
   "maximumValues": 50,
   "fieldLabel": "Date",
   "helpText": "Please select a date"
}

File element

{
   "key": "MyFileElement",
   "label": "My File Element",
   "elementType": "file",
   "acceptType": ["plain-text", "presentation", "rich-document", "spreadsheet", "pdf-document"],
      - Optional. Specifies the allowed file types.. with the above list comprising the allowed values.
   "searchKey": "string1" | "string2" | "string3" | "string4" | "sortableString1" | "sortableString2" | "sortableString3" | "sortableString4",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "allowMultipleValues": true,
   "minimumValues": 1,
   "maximumValues": 50,
   "fieldLabel": "File",
   "helpText": "Please select a file"
}

Formatted-Text element

{
   "key": "MyFormattedTextElement",
   "label": "My Formatted Text Element",
   "elementType": "formattedtext",
   "searchKey": "string1" | "string2" | "string3" | "string4" | "sortableString1" | "sortableString2" | "sortableString3" | "sortableString4",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "allowMultipleValues": true,
   "minimumValues": 1,
   "maximumValues": 50,
   "fieldLabel": "Text",
   "helpText": "Enter some text"
}

Group element

{
   "key": "MyGroupElement",
   "label": "My Group Element",
   "elementType": "group",
   "typeRef": {"id":"73b5f83684cddba687cb41eca328a41a"},
      - Must refer to an existing content-type whose `kind` attribute contains the value `embedded`
   "required": false,
   "allowMultipleValues": true,
   "minimumValues": 1,
   "maximumValues": 50,
   "fieldLabel": "Text",
   "helpText": "Please fill in these fields"
}

Image element

{
   "key": "MyImageElement",
   "label": "My Image Element",
   "elementType": "image",
   "acceptType": ["jpg", "jpeg", "png", "gif", "svg"],
      - Optional. Specifies the allowed image types.. with the above list comprising the allowed values.
   "imageProfileId": "83b5f83684cddba687cb41eca328a4567",
      - Optional. Specifies the ID of the image profile that this element is using. If an image profile is selected, then 'svg' is no longer allowed as an acceptType.
   "searchKey": "string1" | "string2" | "string3" | "string4" | "sortableString1" | "sortableString2" | "sortableString3" | "sortableString4",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "allowMultipleValues": true,
   "minimumValues": 1,
   "maximumValues": 50,
   "fieldLabel": "Image",
   "helpText": "Please select an image"
}

Link element

{
   "key": "MyLinkElement",
   "label": "My Link Element",
   "elementType": "link",
   "searchKey": "string1" | "string2" | "string3" | "string4" | "sortableString1" | "sortableString2" | "sortableString3" | "sortableString4",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "allowMultipleValues": true,
   "minimumValues": 1,
   "maximumValues": 50,
   "fieldLabel": "Link",
   "helpText": "Please select a link"
}

Location element

{
   "key": "MyLocationElement",
   "label": "My Location element",
   "elementType": "location",
   "searchKey": "location1",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "helpText": "Please select a location"
}

Number (Decimal) element

{
   "key": "MyNumberElement",
   "label": "My Number Element",
   "elementType": "number",
   "fieldType": "decimal",
   "minimum": 10.0,
      - Optional. Specifies the lowest accepted number.
   "maximum": 49.9,
      - Optional. Specifies the highest accepted number.
   "searchKey": "number1" | "number2" | "sortableNumber1" | "sortableNumber2",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "allowMultipleValues": true,
   "minimumValues": 1,
   "maximumValues": 50,
   "fieldLabel": "Number",
   "helpText": "Enter a number between 10.0 and 49.9"
}

Number (Integer) element

{
   "key": "MyNumberElement",
   "label": "My Number Element",
   "elementType": "number",
   "fieldType": "integer",
   "minimum": 10,
      - Optional. Specifies the lowest accepted number.
   "maximum": 49,
      - Optional. Specifies the highest accepted number.
   "searchKey": "number1" | "number2" | "sortableNumber1" | "sortableNumber2",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "allowMultipleValues": true,
   "minimumValues": 1,
   "maximumValues": 50,
   "fieldLabel": "Number",
   "helpText": "Enter a number between 10 and 49"
}

Option Selection element

{
   "key": "MyOptionSelectionElement",
   "label": "My Option Selection Element",
   "elementType": "optionselection",
   "options": [{"label":"Option 1", "selection": "Value 1"}, {"label":"Option 2", "selection": "Value 2"}],
   "searchKey": "string1" | "string2" | "string3" | "string4" | "sortableString1" | "sortableString2" | "sortableString3" | "sortableString4",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "allowMultipleValues": true,
   "minimumValues": 1,
   "maximumValues": 50,
   "helpText": "Enter make a selection"
}

Reference element

{
   "key": "MyReferenceElement",
   "label": "My Reference Element",
   "elementType": "reference",
   "restrictTypes": [{"id":"23b5f83684cddba687cb41eca328a1234"}, {"id":"23fhf83684cddba687cb41eca328a6789"}],
      - Optional. Restricts the allowed content items, to only those from the specified content-types.
   "searchKey": "string1" | "string2" | "string3" | "string4" | "sortableString1" | "sortableString2" | "sortableString3" | "sortableString4",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "allowMultipleValues": true,
   "minimumValues": 1,
   "maximumValues": 50,
   "fieldLabel": "Reference",
   "helpText": "Please select an item"
}

Text (Single Line) element

{
   "key": "MyTextElement",
   "label": "My Text Element",
   "elementType": "text",
   "minLength": 5,
      - Optional. Specifies the lowest number of accepted characters. Default is 0.
   "maxLength": 50,
      - Optional. Specifies the highest number of accepted characters. Default is 10000.
   "displayType": "singleLine",
   "displayWidth": 20,
      - Optional. Specifies the width of the text editor in characters.
   "searchKey": "string1" | "string2" | "string3" | "string4" | "sortableString1" | "sortableString2" | "sortableString3" | "sortableString4",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "allowMultipleValues": true,
   "minimumValues": 1,
   "maximumValues": 50,
   "fieldLabel": "Text",
   "helpText": "Enter some text between 5 and 50 characters"
}

Text (Multi Line) element

{
   "key": "MyTextElement",
   "label": "My Text Element",
   "elementType": "text",
   "minLength": 5,
      - Optional. Specifies the lowest number of accepted characters. Default is 0.
   "maxLength": 50,
      - Optional. Specifies the highest number of accepted characters. Default is 10000.
   "displayType": "multiLine",
   "displayWidth": 20,
      - Optional. Specifies the width of the text editor in characters.
   "displayHeight": 10,
      - Optional. Specifies the number of lines shown within the text editor.
   "searchKey": "string1" | "string2" | "string3" | "string4" | "sortableString1" | "sortableString2" | "sortableString3" | "sortableString4",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "allowMultipleValues": true,
   "minimumValues": 1,
   "maximumValues": 50,
   "fieldLabel": "Text",
   "helpText": "Enter some text between 5 and 50 characters"
}

Toggle element

{
   "key": "MyToggleElement",
   "label": "My Toggle element",
   "elementType": "toggle",
   "statement": "Lead in question",
      - Optional. Specifies the text (typically a question) to show with the toggle
   "searchKey": "boolean1" | "boolean2",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "helpText": "Please make a selection"
}

Video element

{
   "key": "MyVideoElement",
   "label": "My Video Element",
   "elementType": "video",
   "acceptType": ["mp4"],
      - Optional. Specifies the allowed video types.. with the above list comprising the allowed values.
   "searchKey": "string1" | "string2" | "string3" | "string4" | "sortableString1" | "sortableString2" | "sortableString3" | "sortableString4",
      - Optional. Indicates that the value of this element will be searchable under the specified key
   "required": false,
   "allowMultipleValues": true,
   "minimumValues": 1,
   "maximumValues": 50,
   "fieldLabel": "Video",
   "helpText": "Please select a video"
}

Note: Use the /types/new end-point to return a blank document instead of creating a new type document from scratch. To add an element to a type document, merge the element-fragment section from the element definition into the element section of the type document.

User roles: admin, manager

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Provide all the type fields that are needed to create the new content type.

An new type document.

string
required
length ≥ 1

The name of the type document.

string
required

The description of the type document.

string
enum
required

the type document classification.

Allowed:
kind
array of strings

Identifies the sub-classification of the type document.
Valid values include:

  • custom-ui: This type document has a custom user interface defined
  • embedded: This type document can be included within another type document
  • standalone: This type document can be used to create normal content items
  • page: This type document can be used to create site pages
  • landing-page: This type document can be used to create landing pages
  • email: This type document can be used to create email messages
  • site: This type document can be used to create sites
kind
Allowed:
contentThumbnail
object

The thumbnail settings for content using this type.

date-time

Optional creation date of this type document in ISO 8601 with the format YYYY-MM-DDThh:mm:ss.sssZ. Value is ignored if set in the future.

string

Optional path to associate with this type document. Must be unique. Will default to filesystem friendly version of /[NAME].

tags
array of strings
required
tags*
thumbnail
object

The reference to the asset that should act as the thumbnail of this type.
The thumbnail can be referred to by either id or path.

string
enum
required

the workflow status.

Allowed:
uiExtensions
object

Specifies any user interface extensions registered on this type document.

icon
array of strings

Specifies the type of icon to show for this type document within the Type user interface's element palette
Only used when the type document has a kind that includes 'embedded'

icon
elements
array of objects
required

Represents the elements present on this Type document.

elements*
boolean
Defaults to false

Indicates whether this item is a 'system item' or not.

Responses

409

A content type document with the same name or path exists in the database. Provide a new name or path for this content type.

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json