---
title: Sync content types
slug: graph/api/sync-content-types
docTags: 
createdAt: 2026-08-28T18:28:55.472Z
---

{
  "id": "TVSiAbjKixWmW984G8uK4",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://cg.optimizely.com/api/content/v2/types",
    "servers": [
      {
        "url": "https://cg.optimizely.com/api/content/v2/types"
      }
    ],
    "name": "Sync content types",
    "description": "<p>Warning: Deprecated\nSynchronize content types from one source</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "example": "{\"languages\":[\"en\"],\"links\":{},\"contentTypes\":[{\"name\":\"IContent\",\"contentType\":[],\"properties\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"Name\",\"type\":\"string\"}]},{\"name\":\"StartPage\",\"contentType\":[\"IContent\"],\"properties\":[{\"name\":\"MainBody\",\"type\":\"string\"},{\"name\":\"MainContentArea\",\"type\":\"string\"}]}],\"propertyTypes\":[]}",
          "description": "",
          "customType": "ContentSource_V2",
          "schema": [
            {
              "name": "useTypedFieldNames",
              "kind": "optional",
              "type": "boolean",
              "description": ""
            },
            {
              "name": "languages",
              "kind": "optional",
              "type": "array",
              "description": "",
              "example": "",
              "default": [],
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "links",
              "kind": "optional",
              "type": "object",
              "description": "",
              "modelRef": "#/components/schemas/LinkMap",
              "customType": "LinkMap",
              "schema": []
            },
            {
              "name": "contentTypes",
              "kind": "optional",
              "type": "array",
              "description": "",
              "modelRef": "#/components/schemas/ContentType_V2",
              "customType": "ContentType_V2[]",
              "schema": [
                {
                  "name": "properties",
                  "kind": "required",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/ContentTypeProperty_V2",
                  "customType": "ContentTypeProperty_V2[]",
                  "schema": [],
                  "complexType": "allOf",
                  "complexItems": [
                    {
                      "name": "Property_V2",
                      "description": "",
                      "modelRef": "#/components/schemas/Property_V2",
                      "schema": [
                        {
                          "name": "index",
                          "kind": "optional",
                          "type": "boolean",
                          "description": ""
                        },
                        {
                          "name": "searchable",
                          "kind": "optional",
                          "type": "boolean",
                          "description": ""
                        },
                        {
                          "name": "type",
                          "kind": "required",
                          "type": "string",
                          "description": ""
                        },
                        {
                          "name": "name",
                          "kind": "required",
                          "type": "string",
                          "description": ""
                        }
                      ]
                    },
                    {
                      "name": "object",
                      "description": "",
                      "schema": [
                        {
                          "name": "helpText",
                          "kind": "optional",
                          "type": "string",
                          "nullable": true,
                          "description": "",
                          "modelRef": "#/components/schemas/Optional_string_",
                          "customType": "Optional_string_",
                          "schema": []
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "abstract",
                  "kind": "optional",
                  "type": "boolean",
                  "description": ""
                },
                {
                  "name": "base",
                  "kind": "optional",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "description",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "",
                  "modelRef": "#/components/schemas/Optional_string_",
                  "customType": "Optional_string_",
                  "schema": []
                },
                {
                  "name": "sortOrder",
                  "kind": "optional",
                  "type": "number<double>",
                  "description": "",
                  "format": "double"
                },
                {
                  "name": "displayName",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "",
                  "modelRef": "#/components/schemas/Optional_string_",
                  "customType": "Optional_string_",
                  "schema": []
                },
                {
                  "name": "contentType",
                  "kind": "required",
                  "type": "array",
                  "description": "",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": ""
                }
              ]
            },
            {
              "name": "propertyTypes",
              "kind": "optional",
              "type": "array",
              "description": "",
              "modelRef": "#/components/schemas/PropertyType_V2",
              "customType": "PropertyType_V2[]",
              "schema": [
                {
                  "name": "properties",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "modelRef": "#/components/schemas/Property_V2",
                  "customType": "Property_V2[]",
                  "schema": [
                    {
                      "name": "index",
                      "kind": "optional",
                      "type": "boolean",
                      "description": ""
                    },
                    {
                      "name": "searchable",
                      "kind": "optional",
                      "type": "boolean",
                      "description": ""
                    },
                    {
                      "name": "type",
                      "kind": "required",
                      "type": "string",
                      "description": ""
                    },
                    {
                      "name": "name",
                      "kind": "required",
                      "type": "string",
                      "description": ""
                    }
                  ]
                },
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": ""
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/ContentSource_V2",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "epi-hmac",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>HMAC authentication (<code>epi-hmac xxx</code>)</p>",
          "in": "header"
        },
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "description": "JWT token",
          "scheme": "bearer"
        },
        {
          "id": "Basic",
          "name": "Basic",
          "kind": "optional",
          "type": "http",
          "description": "HMAC credentials",
          "scheme": "basic"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successfully updated content type",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "Content type languages could not be updated",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "deprecated": true,
    "examples": {
      "languages": [
        {
          "id": "ofnIX9TvoHphbxZCu8xQx",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://cg.optimizely.com/api/content/v2/types \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"languages\": [],\n     \"contentTypes\": [\n     {\n     \"properties\": {\n     \"type\": \"\",\n     \"name\": \"\"\n     },\n     \"contentType\": [],\n     \"name\": \"\"\n     }\n     ],\n     \"propertyTypes\": [\n     {\n     \"properties\": [\n     {\n     \"type\": \"\",\n     \"name\": \"\"\n     }\n     ],\n     \"name\": \"\"\n     }\n     ]\n     }'"
        },
        {
          "id": "y9WswLaSShZN2M8yeXUhj",
          "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   \"languages\": [],\n   \"contentTypes\": [\n      {\n         \"properties\": {\n            \"type\": \"\",\n            \"name\": \"\"\n         },\n         \"contentType\": [],\n         \"name\": \"\"\n      }\n   ],\n   \"propertyTypes\": [\n      {\n         \"properties\": [\n            {\n               \"type\": \"\",\n               \"name\": \"\"\n            }\n         ],\n         \"name\": \"\"\n      }\n   ]\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://cg.optimizely.com/api/content/v2/types\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "1C6Nr6w4jaH0SCoHmadNS",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://cg.optimizely.com/api/content/v2/types\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"languages\": [],\n   \"contentTypes\": [\n      {\n         \"properties\": {\n            \"type\": \"\",\n            \"name\": \"\"\n         },\n         \"contentType\": [],\n         \"name\": \"\"\n      }\n   ],\n   \"propertyTypes\": [\n      {\n         \"properties\": [\n            {\n               \"type\": \"\",\n               \"name\": \"\"\n            }\n         ],\n         \"name\": \"\"\n      }\n   ]\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "kT7h7hx9rv7LdoR4-1XWF",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://cg.optimizely.com/api/content/v2/types\"\n\npayload = json.dumps({\n   \"languages\": [],\n   \"contentTypes\": [\n      {\n         \"properties\": {\n            \"type\": \"\",\n            \"name\": \"\"\n         },\n         \"contentType\": [],\n         \"name\": \"\"\n      }\n   ],\n   \"propertyTypes\": [\n      {\n         \"properties\": [\n            {\n               \"type\": \"\",\n               \"name\": \"\"\n            }\n         ],\n         \"name\": \"\"\n      }\n   ]\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "ofnIX9TvoHphbxZCu8xQx"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successfully updated content type\n"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Content type languages could not be updated\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}