Update a content type.
Security
Bearer
Input data with details of the content type to be updated.
Content type name. Letters, numbers, spaces, underscores, and hyphens only.
Example:"Promo"
Content type description.
Example:"Promo content type"
- Production serverhttps://edge-platform.sitecorecloud.io/authoring/api/v1/content-types/{modelId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- application/json
- text/json
- application/*+json
curl -i -X PATCH \
'https://edge-platform.sitecorecloud.io/authoring/api/v1/content-types/497f6eca-6276-4993-bfeb-53cbbbba6f08?environmentId=main' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Promo",
"description": "Promo content type",
"fieldGroups": [
{
"id": "db765e2c-d745-462c-aa7b-e6cb11c5da8f",
"name": "Data",
"sortOrder": 100,
"fields": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "PromoText",
"shared": true,
"type": "Single-Line Text",
"displayName": "Promo text",
"helperText": "Enter helper text for display",
"value": {
"title": "sample title"
},
"source": "/sitecore/content/Tenant/Site/Home",
"sortOrder": 100,
"validationRules": [
"59D4EE10-627C-4FD3-A964-61A88B092CBC",
"A76C1092-EE2E-4021-B9EE-21E541CDA1D7"
]
}
]
}
],
"baseContentTypes": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}'Successful operation
The base content types this content type inherits from.
Response
{ "description": "Promo content type", "baseContentTypes": [ { … } ], "fieldGroups": [ { … } ], "id": "d4e5f6a7-b8c9-0123-4567-89abcdef0123", "name": "Promo", "system": { "created": "2024-01-01T12:00:00Z", "createdBy": "sitecore\\admin", "updated": "2024-01-02T12:00:00Z", "updatedBy": "sitecore\\admin" } }