Skip to main content
DELETE
Delete Media

Request

Headers

string
required
Your API key in the format: Bearer imperial_live_xxxxxxxxxxxxx

Path Parameters

string
required
The unique identifier of the media to delete

Response

string
Confirmation message

Example Requests

Example Response

What Gets Deleted

When you delete media, the following are removed:
  • The media file from Cloudflare R2 storage
  • Video thumbnails (if applicable)
  • Database records associated with the upload
  • Storage quota is freed up for new uploads
Deletion is permanent and cannot be undone. The CDN URL will stop working immediately.

Operations Count

Deleting media counts as 1 operation towards your monthly limit. This ensures accurate tracking of all API activity.

Bulk Deletion

To delete multiple files, make separate DELETE requests for each item:
Node.js

Error Responses

Not Found

Unauthorized

Forbidden

If you try to delete media that doesn’t belong to you:

Storage Recovery

After deletion, your storage quota is immediately updated. You can verify this by checking your account statistics:

Best Practices

Storage Management: Regularly delete unused media to free up storage space for new uploads.
External Links: If you’ve shared CDN URLs externally (in websites, apps, etc.), deleting the media will break those links.
Dashboard: You can also delete media through the Dashboard interface with bulk selection support.