Skip to content

Delete Files

Delete files at Zustack.

Learn how to delete files from your bucket using the Zustack API.

This action will permanently remove the file and its associated metadata from the Zustack network.


Before you begin, make sure you have:

  • A bucket created
  • A file already uploaded
  • The file ID of the file you want to delete
  • A JWT signed with your API Key with the scope claim set to delete.

ParameterTypeDescription
file_idstringThe ID of the file you want to delete.
bucket_idstringThe ID of the bucket associated with your file.

First, set your environment variables:

Terminal window
export FILE_ID=your_file_id
export BUCKET_ID=your_bucket_id
export JWT=your_jwt_token

Then make the DELETE request:

Terminal window
curl -X DELETE "https://zustack.com/files/${FILE_ID}/${BUCKET_ID}" \
-H "Authorization: Bearer ${JWT}"

If the deletion is successful, the server will return:

  • HTTP Status: 200 OK
  • The file will be removed from your bucket and no longer accessible.