All Products
Search
Document Center

Drive and Photo Service:DeleteFile

Last Updated:May 27, 2026

Deletes a file or folder.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /v2/file/delete HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

domain_id

string

Yes

The domain ID.

body

object

No

The request body.

drive_id

string

Yes

The drive ID.

1

file_id

string

Yes

The file or folder ID.

9520943DC264

Response elements

Element

Type

Description

Example

object

domain_id

string

The domain ID.

bj1

drive_id

string

The drive ID.

1

file_id

string

The file ID.

9520943DC264

async_task_id

string

The asynchronous task ID. This parameter is returned only for asynchronous operations. Call GetAsyncTask with this ID to query the task status.

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

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.