---
title: POST /v3/multipart-uploads
slug: content-marketing-platform/api/post-v3multipart-uploads
docTags: 
createdAt: 2026-10-01T18:51:26.265Z
---

{
  "id": "Z3MPNt_MafO8HJhojW5RT",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.cmp.optimizely.com/v3/multipart-uploads",
    "servers": [
      {
        "url": "https://api.cmp.optimizely.com/v3/multipart-uploads",
        "description": "v3 version of Optimizely CMP Open API"
      }
    ],
    "name": "POST /v3/multipart-uploads",
    "description": "<p>Experimental Create pre-signed URLs for multipart upload of large files</p>",
    "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": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "file_size",
              "kind": "required",
              "type": "integer",
              "description": "Size of the file in bytes",
              "example": 104857600,
              "minimum": 1,
              "maximum": 5497558138880
            },
            {
              "name": "part_size",
              "kind": "optional",
              "type": "integer",
              "description": "<p>The size of each part of the file to be uploaded. The size of the last part can be smaller and hence can be ignored. <code>upload_part_count</code> is calculated based on <code>file_size</code> and <code>part_size</code>. <strong>The maximum allowed <code>upload_part_count</code> is 10000.</strong> So use larger <code>part_size</code> for larger files to keep <code>upload_part_count</code> under 10000.</p>",
              "example": 6000000,
              "default": 5242880,
              "minimum": 5242880,
              "maximum": 5368709120
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "OAuth2",
          "name": "OAuth2",
          "kind": "optional",
          "type": "oauth2",
          "oauth2Flows": {
            "clientCredentials": {
              "tokenUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/token",
              "scopes": {}
            },
            "authorizationCode": {
              "authorizationUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/auth",
              "tokenUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/token",
              "scopes": {
                "openid": "Grants the ability to receive a unique identifier for the user.",
                "profile": "Grants access to user profile information.",
                "offline_access": "Grants the ability to refresh access_token using the refresh token even when user is not present (not logged in)."
              }
            }
          },
          "requiredScopes": [
            "openid",
            "profile",
            "offline_access"
          ]
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Successful operation",
        "jsonExample": "",
        "isExpanded": true,
        "headers": [
          {
            "kind": "optional",
            "name": "Content-Encoding",
            "type": "string",
            "example": "gzip",
            "description": "Response is always gzip compressed",
            "enum": [
              "gzip"
            ]
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": "ID of the multipart upload",
                "example": "abcdef1234567890"
              },
              {
                "name": "expires_at",
                "kind": "required",
                "type": "string<date-time>",
                "description": "Expiration time of the upload URLs",
                "example": "2025-03-03T12:00:00Z",
                "format": "date-time"
              },
              {
                "name": "upload_part_count",
                "kind": "required",
                "type": "integer",
                "description": "Number of parts for the upload",
                "example": 10
              },
              {
                "name": "upload_part_urls",
                "kind": "required",
                "type": "array",
                "description": "<p>Array of pre-signed URLs for each part. <strong>Each file part must be uploaded to the URL using PUT requests following the order of the URLs</strong></p>",
                "example": "[\"https://s3.amazonaws.com/xyz/abcdef1234567890/0\",\"https://s3.amazonaws.com/xyz/abcdef1234567890/1\"]",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "links",
                "kind": "required",
                "type": "object",
                "description": "",
                "example": "",
                "schema": [
                  {
                    "name": "complete",
                    "kind": "required",
                    "type": "string<uri>",
                    "description": "URL to complete the upload",
                    "example": "https://api.cmp.optimizely.com/v3/multipart-uploads/abcdef1234567890/complete",
                    "format": "uri"
                  },
                  {
                    "name": "status",
                    "kind": "required",
                    "type": "string<uri>",
                    "description": "URL to check the upload status",
                    "example": "https://api.cmp.optimizely.com/v3/multipart-uploads/abcdef1234567890/status",
                    "format": "uri"
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Client error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Unsupported arguments: a,b,c\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Authorization error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Unauthorized\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Permission error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"You do not have the permission to perform this operation\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "Unprocessable entity error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Resource cannot be processed\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "tTvi850RCnalTnXqmr06g",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.cmp.optimizely.com/v3/multipart-uploads \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"file_size\": 104857600,\n     \"part_size\": 5242880\n     }'"
        },
        {
          "id": "GNFsddoBINavBHqWuOl4c",
          "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   \"file_size\": 104857600,\n   \"part_size\": 5242880\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.cmp.optimizely.com/v3/multipart-uploads\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "wC6R_ND5_Xs9TZrZPTnsM",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.cmp.optimizely.com/v3/multipart-uploads\")\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   \"file_size\": 104857600,\n   \"part_size\": 5242880\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "sEcQcEyl000qOdzzCO3gB",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.cmp.optimizely.com/v3/multipart-uploads\"\n\npayload = json.dumps({\n   \"file_size\": 104857600,\n   \"part_size\": 5242880\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": "tTvi850RCnalTnXqmr06g"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-201",
          "language": "201",
          "code": "// Successful operation\n{\n  \"id\": \"abcdef1234567890\",\n  \"expires_at\": \"2025-03-03T12:00:00Z\",\n  \"upload_part_count\": 10,\n  \"upload_part_urls\": [\n    \"\"\n  ],\n  \"links\": {\n    \"complete\": \"https://api.cmp.optimizely.com/v3/multipart-uploads/abcdef1234567890/complete\",\n    \"status\": \"https://api.cmp.optimizely.com/v3/multipart-uploads/abcdef1234567890/status\"\n  }\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Client error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Authorization error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Permission error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-4-422",
          "language": "422",
          "code": "// Unprocessable entity error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-201"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}