---
title: Updates the content type at the current location or create a new one if it doesn't already exist.
slug: cms-12/api/updates-the-content-type-at-the-current-location-or-create-a-new-one-if-it-doesnt-already-exist
docTags: 
createdAt: 2026-08-28T13:16:06.833Z
---

{
  "id": "zIU45SgTPVEgQXLOqNkK2",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "/api/episerver/v3.0/contenttypes/{id}",
    "servers": [],
    "name": "Updates the content type at the current location or create a new one if it doesn't already exist.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "id",
          "type": "string<uuid>",
          "description": "The identifier of the content type.",
          "format": "uuid"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json",
            "application/problem+json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "allowedDowngrades",
          "type": "object",
          "description": "Defines which types of downgrades that are allowed.",
          "customType": "versionComponent",
          "schema": [],
          "modelRef": "#/components/schemas/versionComponent"
        },
        {
          "kind": "optional",
          "name": "allowedUpgrades",
          "type": "object",
          "description": "Defines which types of upgrades that are allowed.",
          "customType": "versionComponent",
          "schema": [],
          "modelRef": "#/components/schemas/versionComponent"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "The content type that should be created or updated.",
          "customType": "contentType",
          "schema": [
            {
              "name": "id",
              "kind": "optional",
              "type": "string<uuid>",
              "description": "The unique identifier of the content type.",
              "format": "uuid"
            },
            {
              "name": "name",
              "kind": "required",
              "type": "string",
              "description": "The name of the content type.",
              "maxLength": 50,
              "pattern": "[a-zA-Z][\\w]*"
            },
            {
              "name": "baseType",
              "kind": "required",
              "type": "string",
              "description": "The base type for this content type."
            },
            {
              "name": "version",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "The version of the content type.",
              "example": "2.1.0"
            },
            {
              "name": "supportedMediaExtensions",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "<p>A comma-separated list of supported media types for media content types.</p>",
              "example": "gif,bmp"
            },
            {
              "name": "editSettings",
              "kind": "optional",
              "type": "object",
              "description": "Defines settings for content type that affects how it is displayed when edited.",
              "modelRef": "#/components/schemas/contentTypeEditSettings",
              "customType": "contentTypeEditSettings",
              "schema": [
                {
                  "name": "displayName",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "The name that should be used when editing the content type.",
                  "maxLength": 50
                },
                {
                  "name": "description",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "The description that should be used when editing the content type.",
                  "maxLength": 255
                },
                {
                  "name": "available",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "Determines if the content type is available when editing."
                },
                {
                  "name": "sortOrder",
                  "kind": "optional",
                  "type": "integer<int32>",
                  "description": "The field order used for ordering the content types when editing.",
                  "format": "int32",
                  "minimum": 0,
                  "maximum": 2147483647
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/contentType",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "A content type definition describes the format of content items.",
            "customType": "contentType",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "The unique identifier of the content type.",
                "format": "uuid"
              },
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "The name of the content type.",
                "maxLength": 50,
                "pattern": "[a-zA-Z][\\w]*"
              },
              {
                "name": "baseType",
                "kind": "required",
                "type": "string",
                "description": "The base type for this content type."
              },
              {
                "name": "version",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "The version of the content type.",
                "example": "2.1.0"
              },
              {
                "name": "supportedMediaExtensions",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "<p>A comma-separated list of supported media types for media content types.</p>",
                "example": "gif,bmp"
              },
              {
                "name": "editSettings",
                "kind": "optional",
                "type": "object",
                "description": "Defines settings for content type that affects how it is displayed when edited.",
                "modelRef": "#/components/schemas/contentTypeEditSettings",
                "customType": "contentTypeEditSettings",
                "schema": [
                  {
                    "name": "displayName",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "The name that should be used when editing the content type.",
                    "maxLength": 50
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "The description that should be used when editing the content type.",
                    "maxLength": 255
                  },
                  {
                    "name": "available",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Determines if the content type is available when editing."
                  },
                  {
                    "name": "sortOrder",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "The field order used for ordering the content types when editing.",
                    "format": "int32",
                    "minimum": 0,
                    "maximum": 2147483647
                  }
                ]
              },
              {
                "name": "properties",
                "kind": "optional",
                "type": "array",
                "readOnly": true,
                "nullable": true,
                "description": "A list with the properties of this content type.",
                "modelRef": "#/components/schemas/contentTypeProperty",
                "customType": "contentTypeProperty[]",
                "schema": [
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": "The name of the property.",
                    "maxLength": 100,
                    "pattern": "[a-zA-Z][\\w]*"
                  },
                  {
                    "name": "dataType",
                    "kind": "required",
                    "type": "string",
                    "description": "The main data type name.",
                    "maxLength": 255,
                    "pattern": "[a-zA-Z][(\\w\\s*\\w?),\\.]*"
                  },
                  {
                    "name": "branchSpecific",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Indicates if the property has specific values for each content branch or if values are shared between all branches."
                  },
                  {
                    "name": "required",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Indicates if the property is required."
                  },
                  {
                    "name": "editSettings",
                    "kind": "optional",
                    "type": "object",
                    "description": "Defines settings for content type properties that affects how the property is displayed when edited.",
                    "modelRef": "#/components/schemas/propertyEditSettings",
                    "customType": "propertyEditSettings",
                    "schema": [
                      {
                        "name": "visibility",
                        "kind": "optional",
                        "type": "string",
                        "description": "Specifies the visibility status of a property in edit view.",
                        "modelRef": "#/components/schemas/visibilityStatus",
                        "customType": "visibilityStatus",
                        "schema": []
                      },
                      {
                        "name": "displayName",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The name that should be used when editing the property.",
                        "maxLength": 255
                      },
                      {
                        "name": "groupName",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "Name of the property group that this property should be displayed in.",
                        "maxLength": 100,
                        "pattern": "[a-zA-Z][\\w]*"
                      },
                      {
                        "name": "sortOrder",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "The field order used for ordering the properties when editing.",
                        "format": "int32",
                        "minimum": 0,
                        "maximum": 2147483647
                      },
                      {
                        "name": "helpText",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The text that should be used as help when editing the property.",
                        "maxLength": 2000
                      },
                      {
                        "name": "hint",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "A hint that will be used when resolving which editor that should be used when editing this property.",
                        "maxLength": 255
                      }
                    ]
                  },
                  {
                    "name": "imageDescriptor",
                    "kind": "optional",
                    "type": "object",
                    "description": "Defines a thumbnail image format.",
                    "modelRef": "#/components/schemas/propertyImageDescriptor",
                    "customType": "propertyImageDescriptor",
                    "schema": [
                      {
                        "name": "height",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "Thumbnail image height",
                        "format": "int32",
                        "minimum": 0,
                        "maximum": 2147483647
                      },
                      {
                        "name": "width",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "Thumbnail image width",
                        "format": "int32",
                        "minimum": 0,
                        "maximum": 2147483647
                      },
                      {
                        "name": "pregenerated",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "If the thumbnail should be pregenerated when a new image is uploaded rather than when first requested"
                      }
                    ]
                  },
                  {
                    "name": "validation",
                    "kind": "optional",
                    "type": "array",
                    "readOnly": true,
                    "nullable": true,
                    "description": "The validation settings of the property.",
                    "modelRef": "#/components/schemas/propertyValidationSettings",
                    "customType": "propertyValidationSettings[]",
                    "schema": [
                      {
                        "name": "name",
                        "kind": "required",
                        "type": "string",
                        "description": "The name of the validation type that should be performed."
                      },
                      {
                        "name": "severity",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "modelRef": "#/components/schemas/validationErrorSeverity",
                        "customType": "validationErrorSeverity",
                        "schema": []
                      },
                      {
                        "name": "errorMessage",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The error message to use for any validation error."
                      }
                    ]
                  },
                  {
                    "name": "itemType",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "The item type for cases when the 'dataType' is 'PropertyBlock'.",
                    "maxLength": 255,
                    "pattern": "[a-zA-Z][(\\w\\s*\\w?),\\.]*"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/contentType",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "201",
        "description": "Created",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "A content type definition describes the format of content items.",
            "customType": "contentType",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "The unique identifier of the content type.",
                "format": "uuid"
              },
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "The name of the content type.",
                "maxLength": 50,
                "pattern": "[a-zA-Z][\\w]*"
              },
              {
                "name": "baseType",
                "kind": "required",
                "type": "string",
                "description": "The base type for this content type."
              },
              {
                "name": "version",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "The version of the content type.",
                "example": "2.1.0"
              },
              {
                "name": "supportedMediaExtensions",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "<p>A comma-separated list of supported media types for media content types.</p>",
                "example": "gif,bmp"
              },
              {
                "name": "editSettings",
                "kind": "optional",
                "type": "object",
                "description": "Defines settings for content type that affects how it is displayed when edited.",
                "modelRef": "#/components/schemas/contentTypeEditSettings",
                "customType": "contentTypeEditSettings",
                "schema": [
                  {
                    "name": "displayName",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "The name that should be used when editing the content type.",
                    "maxLength": 50
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "The description that should be used when editing the content type.",
                    "maxLength": 255
                  },
                  {
                    "name": "available",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Determines if the content type is available when editing."
                  },
                  {
                    "name": "sortOrder",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "The field order used for ordering the content types when editing.",
                    "format": "int32",
                    "minimum": 0,
                    "maximum": 2147483647
                  }
                ]
              },
              {
                "name": "properties",
                "kind": "optional",
                "type": "array",
                "readOnly": true,
                "nullable": true,
                "description": "A list with the properties of this content type.",
                "modelRef": "#/components/schemas/contentTypeProperty",
                "customType": "contentTypeProperty[]",
                "schema": [
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": "The name of the property.",
                    "maxLength": 100,
                    "pattern": "[a-zA-Z][\\w]*"
                  },
                  {
                    "name": "dataType",
                    "kind": "required",
                    "type": "string",
                    "description": "The main data type name.",
                    "maxLength": 255,
                    "pattern": "[a-zA-Z][(\\w\\s*\\w?),\\.]*"
                  },
                  {
                    "name": "branchSpecific",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Indicates if the property has specific values for each content branch or if values are shared between all branches."
                  },
                  {
                    "name": "required",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Indicates if the property is required."
                  },
                  {
                    "name": "editSettings",
                    "kind": "optional",
                    "type": "object",
                    "description": "Defines settings for content type properties that affects how the property is displayed when edited.",
                    "modelRef": "#/components/schemas/propertyEditSettings",
                    "customType": "propertyEditSettings",
                    "schema": [
                      {
                        "name": "visibility",
                        "kind": "optional",
                        "type": "string",
                        "description": "Specifies the visibility status of a property in edit view.",
                        "modelRef": "#/components/schemas/visibilityStatus",
                        "customType": "visibilityStatus",
                        "schema": []
                      },
                      {
                        "name": "displayName",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The name that should be used when editing the property.",
                        "maxLength": 255
                      },
                      {
                        "name": "groupName",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "Name of the property group that this property should be displayed in.",
                        "maxLength": 100,
                        "pattern": "[a-zA-Z][\\w]*"
                      },
                      {
                        "name": "sortOrder",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "The field order used for ordering the properties when editing.",
                        "format": "int32",
                        "minimum": 0,
                        "maximum": 2147483647
                      },
                      {
                        "name": "helpText",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The text that should be used as help when editing the property.",
                        "maxLength": 2000
                      },
                      {
                        "name": "hint",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "A hint that will be used when resolving which editor that should be used when editing this property.",
                        "maxLength": 255
                      }
                    ]
                  },
                  {
                    "name": "imageDescriptor",
                    "kind": "optional",
                    "type": "object",
                    "description": "Defines a thumbnail image format.",
                    "modelRef": "#/components/schemas/propertyImageDescriptor",
                    "customType": "propertyImageDescriptor",
                    "schema": [
                      {
                        "name": "height",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "Thumbnail image height",
                        "format": "int32",
                        "minimum": 0,
                        "maximum": 2147483647
                      },
                      {
                        "name": "width",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "Thumbnail image width",
                        "format": "int32",
                        "minimum": 0,
                        "maximum": 2147483647
                      },
                      {
                        "name": "pregenerated",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "If the thumbnail should be pregenerated when a new image is uploaded rather than when first requested"
                      }
                    ]
                  },
                  {
                    "name": "validation",
                    "kind": "optional",
                    "type": "array",
                    "readOnly": true,
                    "nullable": true,
                    "description": "The validation settings of the property.",
                    "modelRef": "#/components/schemas/propertyValidationSettings",
                    "customType": "propertyValidationSettings[]",
                    "schema": [
                      {
                        "name": "name",
                        "kind": "required",
                        "type": "string",
                        "description": "The name of the validation type that should be performed."
                      },
                      {
                        "name": "severity",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "modelRef": "#/components/schemas/validationErrorSeverity",
                        "customType": "validationErrorSeverity",
                        "schema": []
                      },
                      {
                        "name": "errorMessage",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "The error message to use for any validation error."
                      }
                    ]
                  },
                  {
                    "name": "itemType",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "The item type for cases when the 'dataType' is 'PropertyBlock'.",
                    "maxLength": 255,
                    "pattern": "[a-zA-Z][(\\w\\s*\\w?),\\.]*"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/contentType",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "409",
        "description": "Conflict",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "vtk5ScFnEQsGCv_VT4ec8",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url '/api/episerver/v3.0/contenttypes/{id}?allowedDowngrades=object&allowedUpgrades=object' \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"name\": \"\",\n     \"baseType\": \"\"\n     }'"
        },
        {
          "id": "gSPSoi7m3S2XImUQWu9Pt",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"name\": \"\",\n   \"baseType\": \"\"\n});\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"/api/episerver/v3.0/contenttypes/{id}?allowedDowngrades=object&allowedUpgrades=object\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "4UgAKbCsyXNceDEW07HHC",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/api/episerver/v3.0/contenttypes/{id}?allowedDowngrades=object&allowedUpgrades=object\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"name\": \"\",\n   \"baseType\": \"\"\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "rRGfA5hGMqn4tUhk1EIUb",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/api/episerver/v3.0/contenttypes/{id}?allowedDowngrades=object&allowedUpgrades=object\"\n\npayload = json.dumps({\n   \"name\": \"\",\n   \"baseType\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "vtk5ScFnEQsGCv_VT4ec8"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"baseType\": \"\",\n  \"version\": \"2.1.0\",\n  \"supportedMediaExtensions\": \"gif,bmp\",\n  \"editSettings\": {\n    \"displayName\": \"\",\n    \"description\": \"\",\n    \"available\": false,\n    \"sortOrder\": \"\"\n  },\n  \"properties\": [\n    {\n      \"name\": \"\",\n      \"dataType\": \"\",\n      \"branchSpecific\": false,\n      \"required\": false,\n      \"editSettings\": {\n        \"visibility\": \"\",\n        \"displayName\": \"\",\n        \"groupName\": \"\",\n        \"sortOrder\": \"\",\n        \"helpText\": \"\",\n        \"hint\": \"\"\n      },\n      \"imageDescriptor\": {\n        \"height\": \"\",\n        \"width\": \"\",\n        \"pregenerated\": false\n      },\n      \"validation\": [\n        {\n          \"name\": \"\",\n          \"severity\": \"\",\n          \"errorMessage\": \"\"\n        }\n      ],\n      \"itemType\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "response-1-201",
          "language": "201",
          "code": "// Created\n{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"baseType\": \"\",\n  \"version\": \"2.1.0\",\n  \"supportedMediaExtensions\": \"gif,bmp\",\n  \"editSettings\": {\n    \"displayName\": \"\",\n    \"description\": \"\",\n    \"available\": false,\n    \"sortOrder\": \"\"\n  },\n  \"properties\": [\n    {\n      \"name\": \"\",\n      \"dataType\": \"\",\n      \"branchSpecific\": false,\n      \"required\": false,\n      \"editSettings\": {\n        \"visibility\": \"\",\n        \"displayName\": \"\",\n        \"groupName\": \"\",\n        \"sortOrder\": \"\",\n        \"helpText\": \"\",\n        \"hint\": \"\"\n      },\n      \"imageDescriptor\": {\n        \"height\": \"\",\n        \"width\": \"\",\n        \"pregenerated\": false\n      },\n      \"validation\": [\n        {\n          \"name\": \"\",\n          \"severity\": \"\",\n          \"errorMessage\": \"\"\n        }\n      ],\n      \"itemType\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "response-2-400",
          "language": "400",
          "code": "// Bad Request\n"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "response-4-409",
          "language": "409",
          "code": "// Conflict\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}