Cloudinary icon

Cloudinary

Upload images and videos, generate images with AI from text prompts or reference images, build optimized transformation and delivery URLs, generate video players, and manage, search, tag, and edit metadata in your Cloudinary media library

Asset → Update Asset Structured Metadata

AI-generated

Summary

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.

Links

Discussion