Skip to main content

Method

DELETE /v1/products/:id/media

Path Parameters

id
uuid
required
Product ID.

Query Parameters

mediaId
string
Media ID to delete.
assetId
string
Gallery asset ID to delete.
url
string
Media URL to delete.
You may also send these identifiers in the JSON request body. At least one identifier is required.

Headers

Authorization
string
Bearer token (requires products:write).
content-type
string
application/json (optional if using query parameters).

Request Example

curl -X DELETE "https://api.voyantcloud.com/v1/products/prod_123/media?mediaId=media_01J0E6V4ZBAVQ9PQJRTR6K9HQC" \
  -H "Authorization: Bearer $VOYANT_API_KEY"

Response Example

{
  "data": {
    "id": "media_01J0E6V4ZBAVQ9PQJRTR6K9HQC",
    "deleted": true
  }
}
The API validates workspace ownership before deletion (ProductOwnershipError). Ensure the media item belongs to the requesting workspace.