Assets

Update asset by public ID

POST
/v1_1/{cloud_name}/resources/{resource_type}/{type}/{public_id}

Updates one or more attributes of a specified resource (asset) identified by its public ID. Note that you can also update many attributes of an existing asset using the explicit method, which is not rate limited.

Authorization

AuthorizationBasic <token>

Basic authentication using Cloudinary API Key and API Secret.

In: header

Path Parameters

cloud_name*string

The cloud name of your product environment.

resource_type*string

The type of resource (image, video, or raw).

Value in

  • "image"
  • "video"
  • "raw"
type*|||||

The delivery type of the asset.

public_id*string

The public ID of the asset.

Request Body

application/json

The asset attributes to update.

The resource properties to update.

display_name?string

The display name of the resource.

unique_display_name?boolean

Whether to ensure the display name is unique across all resources. If false, the operation will fail if a resource with the same display name exists. Default: false

Defaultfalse
asset_folder?string

The folder where the asset should be placed.

tags?|array<string>

A comma-separated list of tag names, or an array of tag names.

context?context_param

A pipe-separated list of key-value pairs of general textual context metadata to attach to the asset (e.g., "alt=My image|caption=Nice photo"). A literal = or | inside a value must be escaped with a prepending backslash, and a literal backslash must be doubled. A double quote must not be escaped.

metadata?|

A pipe-separated list or a map of custom metadata fields (by external_id) and the values to assign to each of them. The = " and | characters can be supported as values when escaped with a prepended backslash (). For a multi-select field, you can set a maximum of 3000 different metadata values on an asset.

clear_invalid?boolean

Whether to clear invalid metadata fields. If false, invalid fields will be preserved. Default: false

Defaultfalse
face_coordinates?string

Face coordinates as comma-separated values, with multiple faces separated by pipes.

Match^(\d+,\d+,\d+,\d+)(\|\d+,\d+,\d+,\d+)*$
custom_coordinates?string

Custom coordinates as comma-separated values, with multiple coordinates separated by pipes.

Match^(\d+,\d+,\d+,\d+)(\|\d+,\d+,\d+,\d+)*$
regions?string

A JSON-encoded object of named groups of coordinate pairs representing regions. Each region name may contain only letters, numbers, or hyphens, and must have at least two coordinate pairs.

quality_override?string

Quality override value that will override any automatic quality transformations.

moderation_status?string

The moderation status of the resource.

Value in

  • "approved"
  • "rejected"
auto_tagging?number

Confidence threshold for auto-tagging.

Range0 <= value <= 1
detection?string

The type of detection to perform on the resource.

ocr?string

The type of OCR to perform on the resource. Set to adv_ocr, optionally with options (e.g., adv_ocr:document).

raw_convert?string

The conversion to apply for raw files (e.g., aspose, google_speech, extract_text).

categorization?string

The type of categorization to perform on the resource. Optionally append a language code suffix (e.g., google_tagging:fr).

visual_search?boolean

Whether to index the resource with visual search. If true, the resource will be indexed for visual search capabilities. Default: false

background_removal?string

The background removal provider to use for the resource. Optionally append a template suffix (e.g., cloudinary_ai:fine_edges).

access_control?array<>

Restricts access to the asset by specifying one or more access types. The asset is restricted unless at least one listed access type is valid.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1_1/my_cloud/resources/image/upload/sample" \  -H "Content-Type: application/json" \  -d '{}'
{  "asset_id": "bc71d3cedb739ed931be3706e94c413a",  "public_id": "qdi8r768kj5tticu8keh",  "format": "jpg",  "version": 1747134921,  "resource_type": "image",  "type": "upload",  "created_at": "2025-05-13T11:15:21Z",  "bytes": 206960,  "width": 400,  "height": 300,  "asset_folder": "",  "display_name": "qdi8r768kj5tticu8keh",  "url": "http://res.cloudinary.com/cloud-name/image/upload/v1747134921/qdi8r768kj5tticu8keh.jpg",  "secure_url": "https://res.cloudinary.com/cloud-name/image/upload/v1747134921/qdi8r768kj5tticu8keh.jpg",  "moderation_kind": "manual",  "moderation_status": "approved",  "moderation": [    {      "kind": "manual",      "status": "approved",      "updated_at": "2025-05-13T11:15:22Z"    }  ]}