For the complete documentation index, see llms.txt. This page is also available as Markdown.

Delete File

Removes a specific file from the storage system by its unique ID. This operation performs a soft delete, marking the file as deleted while potentially retaining it in the system for audit purposes.

Endpoint

DELETE/v2/storage/file/{id}

Link

Request

Path Parameters

Parameter

Type

Description

Required

Example

id

string

File unique ID to delete.

Yes

"file_78901"

Query Parameters

Parameter

Type

Description

Required

Example

customerId

string

Customer ID for additional authorization context.

No

"cust_12345"

Headers

Key

Value

Required

Authorization

123

Yes

Accept

application/json

Yes


Response (200 OK)

Returns a success status and message confirming the file deletion.

Response Fields

Field

Type

Description

Example

success

boolean

Deletion status.

true

message

string

Operation result message.

"File deleted successfully"


Examples

Request (Delete File)

bash

Response

json

Request (Delete File with Customer Context)

bash

Response

json

Request (Delete Non-Existent File)

bash

Response (Error)

json


Error Responses

  1. File Not Found:

    json

  2. File Locked:

    json

  3. Access Denied:

    json

  4. Unauthorized:

    json

  5. Customer Mismatch:

    json


Notes

  • Soft Delete: Files are typically marked as deleted rather than permanently removed

  • Audit Trail: Deletion is logged for compliance and tracking purposes

  • Access Control: Files can only be deleted by authorized users with proper permissions

  • Locked Files: Files with isLock=true cannot be deleted

  • Customer Context: Providing customerId adds an additional security layer

  • Idempotent: Deleting an already deleted file returns success

Common Use Cases:

  • Removing outdated customer documents

  • Cleaning up temporary uploads

  • Compliance with data retention policies

  • User-initiated file management

  • Administrative file cleanup

Security Considerations:

  • Files are only deletable by users with appropriate permissions

  • Customer context validation prevents cross-customer file access

  • Locked files require administrative override

  • Deletion operations are logged for audit purposes

Last updated