Delete Files
DELETE
/api/v1/media/filesDelete one or more files from your dedicated SpiderMedia bucket.
Request
keysarrayrequiredArray of file keys to delete (e.g., ["logos/old-logo.png", "images/temp.jpg"])
Response
successbooleanWhether the deletion succeeded
deletedarrayArray of successfully deleted file keys
failedarrayArray of file keys that failed to delete (if any)
Example
- cURL
- Python
curl -X DELETE "https://spideriq.ai/api/v1/media/files" \
-H "Authorization: Bearer cli_abc123:sk_xxx:secret_xxx" \
-H "Content-Type: application/json" \
-d '{"keys": ["logos/old-logo.png", "images/temp.jpg"]}'
import requests
url = "https://spideriq.ai/api/v1/media/files"
headers = {
"Authorization": "Bearer cli_abc123:sk_xxx:secret_xxx",
"Content-Type": "application/json"
}
data = {"keys": ["logos/old-logo.png", "images/temp.jpg"]}
response = requests.delete(url, headers=headers, json=data)
print(response.json())
Response Example
{
"success": true,
"deleted": ["logos/old-logo.png", "images/temp.jpg"],
"failed": []
}