Request

Update a content type.

Security
Bearer
Path
modelIdstringrequired

The content type identifier.

Example:497f6eca-6276-4993-bfeb-53cbbbba6f08
Query
environmentIdstring

The environment identifier. Defaults to "main". Currently only "main" is supported.

Example:environmentId=main
Bodyrequired

Input data with details of the content type to be updated.

namestring or null, [ 0 .. 50 ] characters^(?![\s-])[a-zA-Z0-9_\s-]*(?<!\s)$

Content type name. Letters, numbers, spaces, underscores, and hyphens only.

Example:"Promo"
descriptionstring or null, [ 0 .. 100 ] characters

Content type description.

Example:"Promo content type"
fieldGroupsArray of objects or null(UpdateContentModelFieldGroupInput)

The list of field groups.

baseContentTypesArray of strings or null

The base content types from which this content model inherits fields and properties.

Example:
[ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ]
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"
    ]
  }'

Responses

Successful operation

Bodyapplication/json
descriptionstring or null

The content type description.

Example:"Promo content type"
baseContentTypesArray of objects or null(BaseContentModel)

The base content types this content type inherits from.

fieldGroupsArray of objects or null(FieldGroup)

The content type field groups.

idstring or null

The content type identifier.

Example:"d4e5f6a7-b8c9-0123-4567-89abcdef0123"
namestring or null

The content type name.

Example:"Promo"
systemobject(System)
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" } }