All Products
Search
Document Center

Drive and Photo Service:TrashFile

Last Updated:Apr 28, 2026

Moves a file or folder to the trash.

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/recyclebin/trash HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

domain_id

string

Yes

The domain ID.

body

object

No

The request body parameters.

drive_id

string

Yes

The drive ID.

1

file_id

string

Yes

The file or folder ID.

4221bf6e6ab43c255edc4463bf3a6f5f5d317406

Response elements

Element

Type

Description

Example

object

The response data.

domain_id

string

The domain ID.

bj1

drive_id

string

The drive ID.

1

file_id

string

The file or folder ID.

4221bf6e6ab43c255edc4463bf3a6f5f5d317406

async_task_id

string

The asynchronous task ID.

An empty string indicates that the operation completed synchronously.

A non-empty string indicates that the operation is asynchronous. Call the GetAsyncTask operation with this ID to query the task status.

13ebd3a24dba4166b1527add676ef2866051b4d5dele16

Examples

Success response

JSON format

{
  "domain_id": "bj1",
  "drive_id": "1",
  "file_id": "4221bf6e6ab43c255edc4463bf3a6f5f5d317406",
  "async_task_id": "13ebd3a24dba4166b1527add676ef2866051b4d5dele16"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.