---
title: PATCH /images/{id}
slug: content-marketing-platform/api/patch-imagesid
docTags: 
createdAt: 2026-10-01T18:51:26.265Z
---

{
  "id": "w_A71jbF0hCCgLKegyAq1",
  "type": "api-oas-v2",
  "data": {
    "method": "PATCH",
    "url": "https://api.cmp.optimizely.com/v3/images/{id}",
    "servers": [
      {
        "url": "https://api.cmp.optimizely.com/v3/images/{id}",
        "description": "v3 version of Optimizely CMP Open API"
      }
    ],
    "name": "PATCH /images/{id}",
    "description": "Updates an image",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "id",
          "type": "string",
          "example": "5d7f910551b00a722e0418830cee6631",
          "description": "Unique identifier of the image"
        }
      ],
      "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": "Payload to update the image",
          "customType": "LibraryImageUpdateRequest",
          "schema": [
            {
              "name": "title",
              "kind": "optional",
              "type": "string",
              "nullable": false,
              "description": "Title of the image",
              "example": "cat.jpeg",
              "minLength": 1
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "nullable": false,
              "description": "Description of the image. Set an empty string to clear the description.",
              "example": "Image of a cute cat",
              "minLength": 0
            },
            {
              "name": "alt_text",
              "kind": "optional",
              "type": "string",
              "nullable": false,
              "description": "Alt text of the image. Set an empty string to clear the alt text.",
              "example": "Sample alt text",
              "minLength": 0
            },
            {
              "name": "attribution_text",
              "kind": "optional",
              "type": "string",
              "nullable": false,
              "description": "Attribution text of the image. Set an empty string to clear the attribution text.",
              "example": "Sample attribution text",
              "minLength": 0
            },
            {
              "name": "tags",
              "kind": "optional",
              "type": "array",
              "nullable": false,
              "description": "Tags of the image. Provided tags will replace the existing ones. Set an empty array to clear the existing tags.",
              "example": "[\"dhaka\",\"new york\",\"london\"]",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "is_public",
              "kind": "optional",
              "type": "boolean",
              "nullable": false,
              "description": "Whether the image URL should be public",
              "example": true
            },
            {
              "name": "is_archived",
              "kind": "optional",
              "type": "boolean",
              "nullable": false,
              "description": "Whether the image should be archived",
              "example": true
            },
            {
              "name": "allow_se_indexing",
              "kind": "optional",
              "type": "boolean",
              "nullable": false,
              "description": "Whether the image is allowed to be indexed by search engines",
              "example": true
            },
            {
              "name": "folder_id",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "ID of the folder containing the image in the library",
              "example": "6bb8db20a5b611ebae319b7c541b1a5a"
            },
            {
              "name": "expires_at",
              "kind": "optional",
              "type": "string<date-time>",
              "nullable": true,
              "description": "<p>Date and time when the image expires, in ISO 8601 UTC format</p>",
              "example": "2019-10-07T13:15:30Z",
              "format": "date-time"
            },
            {
              "name": "labels",
              "kind": "optional",
              "type": "array",
              "deprecated": true,
              "nullable": false,
              "description": "Warning: Deprecated\n<p>Please use <a href=\"https://docs.developers.optimizely.com/content-marketing-platform/reference/put_assets-asset-id-fields\" target=\"_blank\">PUT /assets/{asset_id}/fields</a> or  <a href=\"https://docs.developers.optimizely.com/content-marketing-platform/reference/put_assets-asset-id-fields-field-id\">PUT /assets/{asset_id}/fields/{field_id}</a>  API to update label type asset fields</p>",
              "modelRef": "#/components/schemas/ResourceLabelRequest",
              "customType": "ResourceLabelRequest[]",
              "schema": [
                {
                  "name": "group",
                  "kind": "required",
                  "type": "string",
                  "description": "Label group",
                  "example": "2467e583a60e23fda2b89db81a453cd2",
                  "minLength": 32,
                  "maxLength": 32
                },
                {
                  "name": "values",
                  "kind": "required",
                  "type": "array",
                  "description": "List of values of the label",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "71c378f3fee3d822759d1bdc2aab628c",
                  "itemDefault": ""
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/LibraryImageUpdateRequest",
          "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": "200",
        "description": "Updated Image",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "LibraryImage",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": "Unique identifier of the image",
                "example": "5d7f910551b00a722e0418830cee6632"
              },
              {
                "name": "title",
                "kind": "required",
                "type": "string",
                "description": "Title of the image",
                "example": "cat.jpeg"
              },
              {
                "name": "description",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "Description of the image",
                "example": "Very important image"
              },
              {
                "name": "mime_type",
                "kind": "required",
                "type": "string",
                "description": "MIME type of the image",
                "example": "image/jpeg"
              },
              {
                "name": "file_extension",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "File extension of the image file",
                "example": "jpg"
              },
              {
                "name": "created_at",
                "kind": "required",
                "type": "string<date-time>",
                "description": "<p>Date and time on which the image was created, in ISO 8601 UTC format (2020-02-10T10:40</p><div></div>)<p></p>",
                "example": "2019-10-06T13:15:30Z",
                "format": "date-time"
              },
              {
                "name": "modified_at",
                "kind": "required",
                "type": "string<date-time>",
                "description": "<p>Date and time of the most recent modification of the image, in ISO 8601 UTC format (2020-02-10T10:40</p><div></div>)<p></p>",
                "example": "2019-10-07T13:15:30Z",
                "format": "date-time"
              },
              {
                "name": "file_size",
                "kind": "required",
                "type": "integer",
                "description": "Size of the image in bytes",
                "example": 11244
              },
              {
                "name": "image_resolution",
                "kind": "required",
                "type": "object",
                "description": "Width and height of the image in pixels",
                "example": "",
                "schema": [
                  {
                    "name": "height",
                    "kind": "required",
                    "type": "integer",
                    "description": "Height of the image in pixels",
                    "example": 800
                  },
                  {
                    "name": "width",
                    "kind": "required",
                    "type": "integer",
                    "description": "Width of the image in pixels",
                    "example": 700
                  }
                ]
              },
              {
                "name": "folder_id",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "ID of the folder containing the image in the library",
                "example": "6bb8db20a5b611ebae319b7c541b1a5a"
              },
              {
                "name": "file_location",
                "kind": "required",
                "type": "string",
                "description": "Location of the folder containing the image in the library",
                "example": "/images/"
              },
              {
                "name": "is_archived",
                "kind": "required",
                "type": "boolean",
                "description": "Whether the image is archived or not",
                "example": true
              },
              {
                "name": "is_public",
                "kind": "required",
                "type": "boolean",
                "description": "Whether the image URL is public or not",
                "example": true
              },
              {
                "name": "allow_se_indexing",
                "kind": "required",
                "type": "boolean",
                "description": "Whether the image is allowed to be indexed by search engines",
                "example": true
              },
              {
                "name": "url",
                "kind": "required",
                "type": "string",
                "description": "Download the URL of the image",
                "example": "http://images.cmp.optimizely.com/Zz0xODQ3NDU3Y2Y2YmYzOTlmNjkyOTgyZDY3Y2I3YWM2OA=="
              },
              {
                "name": "labels",
                "kind": "required",
                "type": "array",
                "description": "Labels associated with the image",
                "modelRef": "#/components/schemas/ResourceLabelResponse",
                "customType": "ResourceLabelResponse[]",
                "schema": [
                  {
                    "name": "group",
                    "kind": "required",
                    "type": "object",
                    "description": "Label group",
                    "example": "",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "required",
                        "type": "string",
                        "description": "Identifier of the label group",
                        "example": "2467e583a60e23fda2b89db81a453cd2"
                      },
                      {
                        "name": "name",
                        "kind": "required",
                        "type": "string",
                        "description": "Name of the label group",
                        "example": "Content Format"
                      }
                    ]
                  },
                  {
                    "name": "values",
                    "kind": "required",
                    "type": "array",
                    "description": "List of values of the label",
                    "example": "",
                    "itemType": "object",
                    "customType": "object[]",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "required",
                        "type": "string",
                        "description": "Identifier of the label value",
                        "example": "71c378f3fee3d822759d1bdc2aab628c"
                      },
                      {
                        "name": "name",
                        "kind": "required",
                        "type": "string",
                        "description": "Name of the label value",
                        "example": "Photos"
                      }
                    ]
                  }
                ]
              },
              {
                "name": "owner_organization_id",
                "kind": "required",
                "type": "string",
                "nullable": false,
                "description": "ID of owner organization of the image",
                "example": "5108c3a9becac35915111191"
              },
              {
                "name": "expires_at",
                "kind": "required",
                "type": "string<date-time>",
                "nullable": true,
                "description": "<p>Date and time for the expiration of the image, in ISO 8601 UTC format (2020-02-10T10:40</p><div></div>)<p></p>",
                "example": "2019-10-07T13:15:30Z",
                "format": "date-time"
              },
              {
                "name": "thumbnail_url",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "URL of the thumbnail of the image",
                "example": "http://images.cmp.optimizely.com/Zz0xODQ3NDU3Y2Y2YmYzOTlmNjkyOTgyZDY3Y2I3YWM2OA=="
              },
              {
                "name": "version_number",
                "kind": "required",
                "type": "integer",
                "nullable": false,
                "description": "Version number of image",
                "example": 2
              },
              {
                "name": "version_id",
                "kind": "required",
                "type": "string",
                "nullable": false,
                "description": "Version id of image",
                "example": "5d7f910551b00a722e0418830cee6631"
              },
              {
                "name": "alt_text",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "Alternative text for image",
                "example": "image title"
              },
              {
                "name": "tags",
                "kind": "required",
                "type": "array",
                "description": "Tags for the image",
                "modelRef": "#/components/schemas/Tag",
                "customType": "Tag[]",
                "schema": [
                  {
                    "name": "guid",
                    "kind": "required",
                    "type": "string",
                    "description": "Unique identifier of the tag",
                    "example": "5d7f910551b00a722e0418830cee6633"
                  },
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": "Name of the tag",
                    "example": "Sample Tag"
                  }
                ]
              },
              {
                "name": "attribution_text",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "Attribution of Image",
                "example": "Nature"
              },
              {
                "name": "owner_id",
                "kind": "required",
                "type": "string",
                "nullable": false,
                "description": "ID of the image owner",
                "example": "5108c3a9becac35915111191"
              },
              {
                "name": "focal_point",
                "kind": "required",
                "type": "object",
                "nullable": true,
                "description": "Focal point of the image",
                "example": "",
                "schema": [
                  {
                    "name": "x",
                    "kind": "required",
                    "type": "integer",
                    "description": "X coordinate of the focal point",
                    "example": 35
                  },
                  {
                    "name": "y",
                    "kind": "required",
                    "type": "integer",
                    "description": "Y coordinate of the focal point",
                    "example": 75
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/LibraryImage",
            "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": "404",
        "description": "Not found error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Resource not found\"}",
            "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": "iVKWkCSeNpJI_3ice7t3u",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url https://api.cmp.optimizely.com/v3/images/{id} \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"labels\": [\n     {\n     \"group\": \"2467e583a60e23fda2b89db81a453cd2\",\n     \"values\": []\n     }\n     ]\n     }'"
        },
        {
          "id": "-gJ9TeCRec1EpsdrJNfV8",
          "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   \"labels\": [\n      {\n         \"group\": \"2467e583a60e23fda2b89db81a453cd2\",\n         \"values\": []\n      }\n   ]\n});\n\nvar requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.cmp.optimizely.com/v3/images/{id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "mN3OPHcH0zPciOvqvESym",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.cmp.optimizely.com/v3/images/{id}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"labels\": [\n      {\n         \"group\": \"2467e583a60e23fda2b89db81a453cd2\",\n         \"values\": []\n      }\n   ]\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "1Nja3m7G0_FBwi0SFMo0r",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.cmp.optimizely.com/v3/images/{id}\"\n\npayload = json.dumps({\n   \"labels\": [\n      {\n         \"group\": \"2467e583a60e23fda2b89db81a453cd2\",\n         \"values\": []\n      }\n   ]\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PATCH\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "iVKWkCSeNpJI_3ice7t3u"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Updated Image\n{\n  \"id\": \"5d7f910551b00a722e0418830cee6632\",\n  \"title\": \"cat.jpeg\",\n  \"description\": \"Very important image\",\n  \"mime_type\": \"image/jpeg\",\n  \"file_extension\": \"jpg\",\n  \"created_at\": \"2019-10-06T13:15:30Z\",\n  \"modified_at\": \"2019-10-07T13:15:30Z\",\n  \"file_size\": 11244,\n  \"image_resolution\": {\n    \"height\": 800,\n    \"width\": 700\n  },\n  \"folder_id\": \"6bb8db20a5b611ebae319b7c541b1a5a\",\n  \"file_location\": \"/images/\",\n  \"is_archived\": true,\n  \"is_public\": true,\n  \"allow_se_indexing\": true,\n  \"url\": \"http://images.cmp.optimizely.com/Zz0xODQ3NDU3Y2Y2YmYzOTlmNjkyOTgyZDY3Y2I3YWM2OA==\",\n  \"labels\": [\n    {\n      \"group\": {\n        \"id\": \"2467e583a60e23fda2b89db81a453cd2\",\n        \"name\": \"Content Format\"\n      },\n      \"values\": [\n        {\n          \"id\": \"71c378f3fee3d822759d1bdc2aab628c\",\n          \"name\": \"Photos\"\n        }\n      ]\n    }\n  ],\n  \"owner_organization_id\": \"5108c3a9becac35915111191\",\n  \"expires_at\": \"2019-10-07T13:15:30Z\",\n  \"thumbnail_url\": \"http://images.cmp.optimizely.com/Zz0xODQ3NDU3Y2Y2YmYzOTlmNjkyOTgyZDY3Y2I3YWM2OA==\",\n  \"version_number\": 2,\n  \"version_id\": \"5d7f910551b00a722e0418830cee6631\",\n  \"alt_text\": \"image title\",\n  \"tags\": [\n    {\n      \"guid\": \"5d7f910551b00a722e0418830cee6633\",\n      \"name\": \"Sample Tag\"\n    }\n  ],\n  \"attribution_text\": \"Nature\",\n  \"owner_id\": \"5108c3a9becac35915111191\",\n  \"focal_point\": {\n    \"x\": 35,\n    \"y\": 75\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-404",
          "language": "404",
          "code": "// Not found error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-5-422",
          "language": "422",
          "code": "// Unprocessable entity error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}