---
title: List content sources
slug: cms-13/api/list-content-sources
docTags: 
createdAt: 2026-08-28T15:24:16.532Z
---

{
  "id": "k7i0IkoV-6e_D-x2vr4JX",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "/_cms/v1/contentsources",
    "servers": [
      {
        "url": "/_cms/v1/contentsources",
        "description": "Optimizely CMS API"
      }
    ],
    "name": "List content sources",
    "description": "List content sources using the provided options.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "pageIndex",
          "type": "integer<int32>",
          "description": "Zero based index of the page that should be retrieved.",
          "format": "int32",
          "minimum": 0,
          "maximum": 10000
        },
        {
          "kind": "optional",
          "name": "pageSize",
          "type": "integer<int32>",
          "description": "The maximum items per page that should be retrieved.",
          "format": "int32",
          "minimum": 1,
          "maximum": 10000
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiAuth",
          "name": "apiAuth",
          "kind": "optional",
          "type": "oauth2",
          "description": "Use this scheme to generate an access token that can be used to access the API.",
          "oauth2Flows": {
            "clientCredentials": {
              "tokenUrl": "/_cms/v1/oauth/token",
              "scopes": {
                "api:admin": "Grants full administrative access to the API"
              }
            }
          },
          "requiredScopes": [
            "api:admin"
          ]
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>Represents a single page of items in a paged collection, including paging metadata such as the current page index, page size, and an estimated total item count.</p>",
            "customType": "ContentSourcePage",
            "schema": [
              {
                "name": "items",
                "kind": "optional",
                "type": "array",
                "readOnly": true,
                "description": "The items in this paged collection.",
                "modelRef": "#/components/schemas/ContentSource",
                "customType": "ContentSource[]",
                "schema": [
                  {
                    "name": "key",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>The unique identifier (key) of the resource.</p>",
                    "minLength": 2,
                    "maxLength": 255,
                    "pattern": "^[A-Za-z][_0-9A-Za-z]+$"
                  },
                  {
                    "name": "type",
                    "kind": "required",
                    "type": "string",
                    "description": "Specifies the type of source. For example 'graph' for a GraphQL content source.",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  {
                    "name": "sourceKey",
                    "kind": "required",
                    "type": "string",
                    "description": "The key of the source that this ContentSource relates to.",
                    "minLength": 1,
                    "maxLength": 50
                  },
                  {
                    "name": "sourceType",
                    "kind": "required",
                    "type": "string",
                    "description": "Specifies the source type of this source.",
                    "minLength": 2,
                    "maxLength": 255,
                    "pattern": "^[A-Za-z][_0-9A-Za-z]+$"
                  },
                  {
                    "name": "displayName",
                    "kind": "required",
                    "type": "string",
                    "description": "The display name of this ContentSource.",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  {
                    "name": "created",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "readOnly": true,
                    "description": "A timestamp indicating when this resource was first created.",
                    "format": "date-time"
                  },
                  {
                    "name": "createdBy",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The name of the user or application that created this resource."
                  },
                  {
                    "name": "lastModified",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "readOnly": true,
                    "description": "Indicates the last time this resource was modified.",
                    "format": "date-time"
                  },
                  {
                    "name": "lastModifiedBy",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The name of the user or application that last modified this resource."
                  },
                  {
                    "name": "baseType",
                    "kind": "required",
                    "type": "string<_page | _component | _media | _image | _video | _folder | _experience | _section | _element>",
                    "description": "Represents the base of the corresponding content type.",
                    "enum": [
                      "_page",
                      "_component",
                      "_media",
                      "_image",
                      "_video",
                      "_folder",
                      "_experience",
                      "_section",
                      "_element"
                    ]
                  },
                  {
                    "name": "propertyMappings",
                    "kind": "required",
                    "type": "object",
                    "description": " Represents a mapping between a property in an external source and its corresponding property in the CMS. Used to define how external properties are mapped to CMS property identifiers and names.",
                    "modelRef": "#/components/schemas/PropertyMappings",
                    "customType": "PropertyMappings",
                    "schema": [
                      {
                        "name": "key",
                        "kind": "optional",
                        "type": "string",
                        "description": "<p>The key to use for the item in the source. Required if the SourceType is not of type '_Item'.</p>",
                        "maxLength": 255
                      },
                      {
                        "name": "displayName",
                        "kind": "optional",
                        "type": "string",
                        "description": "<p>The key to use for the item in cms. Required if the SourceType is not of type '_Item'.</p>",
                        "maxLength": 255
                      },
                      {
                        "name": "keyFormat",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "Specifies the format of the source identifier key.",
                        "pattern": "^digits$|^digitsWithHyphens$|^digitsWithHyphensAndBraces$|^digitsWithHyphensAndParentheses$|^digitsWithThreeHyphens$|^undefined$"
                      }
                    ]
                  }
                ]
              },
              {
                "name": "pageIndex",
                "kind": "optional",
                "type": "integer<int32>",
                "readOnly": true,
                "description": "<p>The zero-based index of the current page.</p>",
                "format": "int32"
              },
              {
                "name": "pageSize",
                "kind": "optional",
                "type": "integer<int32>",
                "readOnly": true,
                "description": "The number of items in each page. Not necessarily the same as the number of items in this page.",
                "format": "int32"
              },
              {
                "name": "totalCount",
                "kind": "optional",
                "type": "integer<int32>",
                "readOnly": true,
                "nullable": true,
                "description": "The estimated total number of items in the collection. May be omitted if the total count is unknown.",
                "format": "int32"
              }
            ],
            "modelRef": "#/components/schemas/ContentSourcePage",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "-UH5Th8B7BHENtfX82xZD",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url /_cms/v1/contentsources \\\n     --header 'accept: application/json'"
        },
        {
          "id": "I6OPB1fElwQ5O9DAYQDgf",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/_cms/v1/contentsources\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "dhK5pfViBx3wPOAV-7HwO",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/_cms/v1/contentsources\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "elsfbjGQUTi2r6Bz9KV42",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/_cms/v1/contentsources\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "-UH5Th8B7BHENtfX82xZD"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"items\": [\n    {\n      \"key\": \"\",\n      \"type\": \"\",\n      \"sourceKey\": \"\",\n      \"sourceType\": \"\",\n      \"displayName\": \"\",\n      \"created\": \"\",\n      \"createdBy\": \"\",\n      \"lastModified\": \"\",\n      \"lastModifiedBy\": \"\",\n      \"baseType\": \"\",\n      \"propertyMappings\": {\n        \"key\": \"\",\n        \"displayName\": \"\",\n        \"keyFormat\": \"\"\n      }\n    }\n  ],\n  \"pageIndex\": \"\",\n  \"pageSize\": \"\",\n  \"totalCount\": \"\"\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Unauthorized\n"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "response-3-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}