HTTP - Management
Removed from your favourites
Create a content type
Created by Contensis product team, last modified by zengenti on 29 Sep 2021
POST/api/management/projects/{projectId}/contenttypes/
Parameter
Name | Parameter type | Type | Description | Example | Required |
---|---|---|---|---|---|
projectId | path | string | The project identifier found in the project overview screen of the management console | movieDb | true |
Example
JSON
POST: /api/management/projects/movieDb/contenttypes/
{
"id": "movie",
"projectId": "movieDb",
"name": {
"en-GB": "Movie"
},
"description": {
"en-GB": "A movie type"
},
"entryTitleField": "title",
"entryDescriptionField": "overview",
"fields": [
{
"id": "title",
"name": {
"en-GB": "Title"
},
"dataType": "string",
"editor": {
"id": "text",
"instructions": {
"en-GB": "The title of the movie"
},
"properties": {
"placeholderText": {
"en-GB": "Enter the full title of the movie appropriate to the region"
}
}
}
},
{
"id": "tagline",
"name": {
"en-GB": "Tagline"
},
"dataType": "string",
},
{
"id": "overview",
"name": {
"en-GB": "Overview"
},
"dataType": "string",
"dataFormat": "html"
},
{
"id": "releaseDate",
"name": {
"en-GB": "Release Date"
},
"dataType": "dateTime",
"validations": null
},
{
"id": "actors",
"name": {
"en-GB": "Actors"
},
"dataType": "objectArray",
"dataFormat": "entry",
"validations": {
"allowedContentTypes": {
"contentTypes": [
"actor"
]
}
}
}
],
"defaultLanguage": "en-GB",
"supportedLanguages": [
"en-GB"
],
"workflowId": "contensisEntryBasic",
"dataFormat": "entry"
}
Remarks
If the defaultLanguage value is not included in the supportedLanguages array then it will be automatically added by the service when the project is created. Additionally, if the defaultLanguage is not specified then the project primaryLanguage will be automatically set as the value by the service.