Delete Storage File (v1)
Method & Path
DELETE /api/v1/workspace/:workspaceId/storage/files
Description
Delete a single file from workspace storage.
Authentication
Required: Workspace authentication. User must be authenticated as Workspace Owner or Staff with workspace permissions.
Headers
Authorization: Bearer <workspace_token>
Content-Type: application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
Request Body
{
"filePath": "sessions/session-id/attachment-123.webp"
}
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
filePath | string | Yes | File path in storage (min: 1 character) |
Response 200 OK
{
"success": true,
"message": "File deleted successfully"
}
Common Errors
400 Bad Request: Missing or invalid file path
401 Unauthorized: Missing or invalid authentication token
404 Not Found: Workspace or file not found
500 Internal Server Error: Server error occurred while processing the request
Notes
- This operation is permanent and cannot be undone
- Storage quota is updated after deletion
- File must belong to the workspace