Actions26
- Upload Actions
- Transform Actions
- Generate Actions
- Asset Actions
- Widget Actions
- Library Actions
- Asset (Legacy, by Public ID) Actions
Asset → Update Asset Structured Metadata
AI-generatedSummary
Update an asset's structured metadata in Cloudinary by specifying the asset's immutable asset ID and providing the new metadata as a JSON object.
Inputs
- Asset ID (required) — The immutable asset_id of the asset to update.
- Structured Metadata (required) — Structured metadata to attach to the asset as JSON, for example: {"field1": "value1", "field2": "value2"}.
- Update Fields — Optional fields to modify update behavior, including whether to invalidate CDN cache copies of the asset (boolean 'Invalidate CDN').
Output shape
a single updated asset record including the updated structured metadata fields.
The operation returns the updated asset metadata. If 'Invalidate CDN' is set to true, the CDN cache copies of the asset are invalidated to reflect the update immediately.
Examples
Example 1: Update a photo asset with new structured metadata to add custom fields and invalidate CDN cache.
Set the Asset ID to the target asset's immutable ID; provide a JSON object with the desired metadata fields in Structured Metadata; optionally enable Invalidate CDN to true to clear cached copies.