Skip to main content
DELETE
/
api
/
v1
/
media
/
{id}
Delete media file
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

fetch('https://blackbox.dasha.ai/api/v1/media/{id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "type": "<string>",
  "title": "<string>",
  "status": 123,
  "detail": "<string>",
  "instance": "<string>"
}
This operation permanently deletes the media file and cannot be undone.

Cascade Deletion

The deletion process follows this sequence:
  1. Remove agent references: All agents using this media file are updated automatically
  2. Delete file: The media file is permanently removed

What Gets Updated

Agents are automatically updated if they use the media file for:
  • Warm transfer hold music
  • Cold transfer hold music
  • Ambient noise/background sounds

Error Handling

If removing agent references fails, the media file is NOT deleted to ensure data consistency. You can safely retry the operation.

Path Parameters

id
string<uuid>
required

Media file identifier

Response

Media file deleted and agent references removed successfully