---
title: Download content media file.
slug: cms-13/api/download-content-media-file
docTags: 
createdAt: 2026-08-28T15:24:16.532Z
---

{
  "id": "ccfY1YaFpsbULClAp3SaJ",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "/_cms/v1/content/{key}/versions/{version}/media",
    "servers": [
      {
        "url": "/_cms/v1/content/{key}/versions/{version}/media",
        "description": "Optimizely CMS API"
      }
    ],
    "name": "Download content media file.",
    "description": "Download the media file for a specific content item version.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "key",
          "type": "string",
          "description": "The key of the content item."
        },
        {
          "kind": "required",
          "name": "version",
          "type": "string",
          "description": "The version of the content item."
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "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
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "jJMr5MEVMv8zImq__FpsP",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url /_cms/v1/content/{key}/versions/{version}/media \\\n     --header 'accept: application/json'"
        },
        {
          "id": "xSjDbwX2cFUclUFOil6J_",
          "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/content/{key}/versions/{version}/media\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "CYDx-GjKuq1OzGale1_CD",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/_cms/v1/content/{key}/versions/{version}/media\")\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": "3oG6SGurq1P9x6xnHnZHC",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/_cms/v1/content/{key}/versions/{version}/media\"\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": "jJMr5MEVMv8zImq__FpsP"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Unauthorized\n"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// Not Found\n"
        },
        {
          "id": "response-4-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}