Zur Navigation springen

Update Asset

Update an asset’s name or visibility. With API-key auth the asset must be owned by the key owner; organization-shared assets can only be updated from an admin/owner session. An asset you can view but not edit returns a 403 with errorCode asset_forbidden; an unknown id returns a 404 with errorCode asset_not_found.

Authentifizierung

x-api-keystring
API-Key-Authentifizierung via Header

Pfadparameter

idstringErforderlich
A unique identifier for an asset.

Anfrage

This endpoint expects an object.
namestringOptional
A new display name for the asset.
visibilityenumOptional
Update who can see the asset.
Erlaubte Werte:
durationSecondsdoubleOptional
Updated media duration in seconds.
sizelongOptional
Updated file size in bytes.
formatstringOptional
Updated file format or extension.
widthintegerOptional
Updated width in pixels.
heightintegerOptional
Updated height in pixels.

Antwort

Asset updated successfully
idstring
A unique identifier for an asset.
createdAtdatetime
The date and time the asset was created.
updatedAtdatetime
The date and time the asset was last updated.
typeenum
The type of asset file.
Erlaubte Werte:
visibilityenum
Visibility scope for the asset.
Erlaubte Werte:
namestringOptional
The filename of the asset.
urlstringOptional
The URL to access the asset media.
sizelongOptional
File size in bytes.
formatstringOptional

File format/extension (e.g., "mp4", "wav").

inputTypeenumOptional
The source type of the asset.
durationSecondsdoubleOptional

Duration of the media in seconds (for audio/video).

thumbnailUrlstringOptional
URL to the asset's thumbnail image.
widthintegerOptional

Width in pixels (for video/image).

heightintegerOptional

Height in pixels (for video/image).

projectIdstringOptional
The id of the project this asset is attached to, or null when it belongs to no project.
proxyPathstring or nullOptional
Stable API proxy path for authenticated media playback.

Fehler

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
500
Internal Server Error