Media Library

Update a media asset

Rename, move, archive/unarchive, retag, re-file under another context.

patch/api/v1/media/{asset_id}

Path parameters

asset_idstring uuid required

Request body

filenamestring nullable
folderIdstring uuid nullable

null = move to root.

isArchivedboolean nullable
tagsstring[] nullable
originContextstring nullable

Re-file the asset under another context ('pwa.logo') or bare section ('uncategorized'); 'section' is re-derived from it. Validated against the registry served by GET /media/contexts.

Response

Successful Response

idstring uuid required
kind'image' | 'video' required
filenamestring required
urlstring required

Public URL of the original.

contentTypestring nullable

Sniffed content type, not client-declared.

sizeBytesinteger required
widthinteger nullable
heightinteger nullable
durationMsinteger nullable

Video duration; null in v1 (no ffmpeg).

lqipstring nullable

~20px blurred data-URI for next/image placeholder='blur'.

folderIdstring uuid nullable

null = library root.

originContextstring required

Full upload context, e.g. 'pwa.logo' or 'uncategorized'.

sectionstring required

Derived from originContext prefix; the picker's default facet.

tagsstring[]
isArchivedboolean
sourceAssetIdstring uuid nullable

Root/source asset for a crop or slice; null for uploads.

sourceOpobject nullable

Transform provenance, e.g. {'type':'crop','rect':{...}}.

createdAtstring date-time required
updatedAtstring date-time nullable

Changes

No recorded changes to this endpoint across all 1 revision of this API.