Delete files (bulk)

You can programmatically delete multiple files uploaded in the media library using bulk file delete API.

If a file or specific transformation has been requested in the past, then the response is cached. Deleting a file does not purge the cache. You can purge the cache using purge API.

Bulk file delete API


Deletes multiple files and their versions from the media library.





base64 encoding of your_private_api_key:

Note the colon in the end.

Request Body




Each value should be a unique fileId of the uploaded file. fileId is returned in list files API and upload API.

    "successfullyDeletedFileIds": [

Response structure and status code

In case of an error, you will get an error code along with the error message. On success, you will receive a 200 status code with JSON encoded response containing information about successfully deleted fileIds.


Here is the example request to understand the API usage.

# Array of the unique fileId of the uploaded files. fileId is returned in response of list files API and upload API.
curl -X POST "" \
-H 'Content-Type: application/json' \
-u your_private_key: -d '
	"fileIds" : ["file_id_1", "file_id_2"]

Last updated