All Products
Search
Document Center

Drive and Photo Service:DeleteFile

Last Updated:Aug 04, 2025

Deletes a file or folder.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

POST /v2/file/delete HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request parameters.

drive_idstringYes

The drive ID.

1
file_idstringYes

The file ID or folder ID.

9520943DC264

Response parameters

ParameterTypeDescriptionExample
object
domain_idstring

The domain ID.

bj1
drive_idstring

The drive ID.

1
file_idstring

The file ID.

9520943DC264
async_task_idstring

The ID of the asynchronous task. This parameter is returned only in asynchronous processing scenarios. You can call the GetAsyncTask operation to query the information about the asynchronous task based on the task ID.

000e89fb-cf8f-11e9-8ab4-b6e980803a3b

Examples

Sample success responses

JSONformat

{
  "domain_id": "bj1",
  "drive_id": 1,
  "file_id": "9520943DC264",
  "async_task_id": "000e89fb-cf8f-11e9-8ab4-b6e980803a3b"
}

Error codes

For a list of error codes, visit the Service error codes.