Delete File
Permanently deletes one or more files from the system. Only the file owner can delete files. Once deleted, files cannot be recovered.
Delete File
Permanently deletes one or more files from the system. Only the file owner can delete files. Once deleted, files cannot be recovered.
API Endpoint
POST /analysis/file/delete
HTTP Headers
- Content-Type:
application/json
- X-Cursed-Api-Token: API token for authentication
Request Method
POST
Parameters
Request Body (JSON):
Parameter | Type | Required | Description |
---|---|---|---|
ids | array | Yes | Array of file UUIDs to delete |
Request Body Schema
{
"ids": ["string (UUID)", "string (UUID)", ...]
}
Response Format
Success Response (200 OK):
{
"message": "File deleted successfully"
}
Error Response (400 Bad Request):
{
"error": "Invalid file ID format"
}
Error Response (401 Unauthorized):
{
"error": "Unauthorized"
}
Error Response (404 Not Found):
{
"error": "File not found"
}
Error Codes
HTTP Status | Description |
---|---|
200 | Success - File(s) deleted successfully |
400 | Bad Request - Invalid file ID format |
401 | Unauthorized - Missing or invalid authentication |
404 | Not Found - File not found or user doesn't have access |
500 | Internal Server Error - Server processing error |
Example cURL Command
Delete Single File
curl -X POST https://api.cursedtools.com/analysis/file/delete \
-H "Content-Type: application/json" \
-H "X-Cursed-Api-Token: your_api_token" \
-d '{
"ids": ["123e4567-e89b-12d3-a456-426614174000"]
}'
Delete Multiple Files
curl -X POST https://api.cursedtools.com/analysis/file/delete \
-H "Content-Type: application/json" \
-H "X-Cursed-Api-Token: your_api_token" \
-d '{
"ids": [
"123e4567-e89b-12d3-a456-426614174000",
"456e7890-e89b-12d3-a456-426614174001",
"789e0123-e89b-12d3-a456-426614174002"
]
}'
Notes
- Only authenticated users can delete files
- Only the file owner can delete their files
- Files are permanently deleted and cannot be recovered
- Both encrypted and unencrypted files can be deleted
- The endpoint accepts multiple file IDs for bulk deletion
- If any file in the list fails to delete, the entire operation may fail