Passer à la navigation

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.

Authentification

x-api-keystring
Authentification par clé API via en-tête

Paramètres de chemin

idstringRequis
A unique identifier for an asset.

Requête

This endpoint expects an object.
namestringOptionnel
A new display name for the asset.
visibilityenumOptionnel
Update who can see the asset.
Valeurs autorisées:
durationSecondsdoubleOptionnel
Updated media duration in seconds.
sizelongOptionnel
Updated file size in bytes.
formatstringOptionnel
Updated file format or extension.
widthintegerOptionnel
Updated width in pixels.
heightintegerOptionnel
Updated height in pixels.

Réponse

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.
Valeurs autorisées:
visibilityenum
Visibility scope for the asset.
Valeurs autorisées:
namestringOptionnel
The filename of the asset.
urlstringOptionnel
The URL to access the asset media.
sizelongOptionnel
File size in bytes.
formatstringOptionnel

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

inputTypeenumOptionnel
The source type of the asset.
durationSecondsdoubleOptionnel

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

thumbnailUrlstringOptionnel
URL to the asset's thumbnail image.
widthintegerOptionnel

Width in pixels (for video/image).

heightintegerOptionnel

Height in pixels (for video/image).

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

Erreurs

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