Saltar a la navegación

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.

Autenticación

x-api-keystring
Autenticación con clave API vía encabezado

Parámetros de ruta

idstringRequerido
A unique identifier for an asset.

Solicitud

This endpoint expects an object.
namestringOpcional
A new display name for the asset.
visibilityenumOpcional
Update who can see the asset.
Valores permitidos:
durationSecondsdoubleOpcional
Updated media duration in seconds.
sizelongOpcional
Updated file size in bytes.
formatstringOpcional
Updated file format or extension.
widthintegerOpcional
Updated width in pixels.
heightintegerOpcional
Updated height in pixels.

Respuesta

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.
Valores permitidos:
visibilityenum
Visibility scope for the asset.
Valores permitidos:
namestringOpcional
The filename of the asset.
urlstringOpcional
The URL to access the asset media.
sizelongOpcional
File size in bytes.
formatstringOpcional

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

inputTypeenumOpcional
The source type of the asset.
durationSecondsdoubleOpcional

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

thumbnailUrlstringOpcional
URL to the asset's thumbnail image.
widthintegerOpcional

Width in pixels (for video/image).

heightintegerOpcional

Height in pixels (for video/image).

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

Errores

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