Permanently delete a file from your account.
Required. Include your API key in the Authorization header using the Bearer token format. You can only delete files that belong to your account.
Anonymous files: For anonymous uploads, you can also delete using the deletion token returned during upload: ?fileId=FILE_ID&token=DELETION_TOKEN
Delete a file by its ID. This action is permanent and cannot be undone.
# Delete a file with API key
curl -X DELETE "https://api.beecargo.net/files/delete?fileId=550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_KEY"
# Delete an anonymous file with deletion token (no API key needed)
curl -X DELETE "https://api.beecargo.net/files/delete?fileId=550e8400-e29b-41d4-a716-446655440000&token=YOUR_DELETION_TOKEN"| Parameter | Type | Required | Description |
|---|---|---|---|
| fileId | String (UUID) | Yes | The unique identifier of the file to delete |
| token | String | No* | Deletion token for anonymous files (alternative to API key) |
* The token parameter is only required when deleting anonymous files without an API key.
Common error responses:
DELETE https://api.beecargo.net/files/delete?fileId=FILE_IDAuthorization: Bearer YOUR_API_KEY{
"success": true,
"message": "File deleted successfully"
}// File not found
{
"success": false,
"error": "File not found"
}
// Unauthorized (not owner or invalid API key)
{
"success": false,
"error": "Unauthorized to delete this file"
}
// Missing file ID
{
"success": false,
"error": "File ID is required"
}