Assets and media

Delete asset

Removes the asset and its file.

DELETE
/v1/assets/{assetId}

Removes the asset and its file in the storage. If a product, a variant, a marketplace product, or a variation still points to it, the answer is 409 asset_in_use: remove the media from there and try again.

Authorization

api_key
headerAuthorizationBearer <token>

API key (mk_...)

Path Parameters

assetId*string

Identifier of the asset.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

The asset and its file were deleted.

curl -X DELETE "https://example.com/v1/assets/4a7f2701-c5f7-477f-9658-5ce6be74ef80"
Empty