/developers
Developer docsAtom Files ↗
← API referenceOrganize · API access unavailable
API REFERENCE / ORGANIZE

POST /v1/items/{item_id}/trash

Move a visible file or folder to recoverable trash; this is not permanent deletion.

Request fields

LocationFieldTypeRequiredDescription
HeaderAuthorizationstringYesCredential scoped to the authorized resource.
HeaderContent-Typestring (media type)Yesapplication/json.
Pathitem_idstringYesStable file or folder ID.
HeaderIdempotency-KeystringYesStable retry identity.
Bodyexpected_revisionstringYesRevision observed before trashing.

Request example

Example request
POST /v1/items/file_789/trash
Authorization: Bearer <scoped token>
Idempotency-Key: trash-8427
Content-Type: application/json

{
  "expected_revision": "rev_008"
}

HTTP status codes

StatusMeaning
202 AcceptedSuccess response shown below.
401 UnauthorizedMissing, expired, or invalid credential.
403 ForbiddenCredential is valid but lacks the required scope or role.
404 Not FoundItem is not visible.
409 ConflictExpected revision changed or item cannot be trashed.
429 Too Many RequestsRate limit reached; honor Retry-After when provided.
503 Service UnavailableService temporarily unavailable; retry safely.

Response fields

FieldTypeExample
operation_idstringop_459
item_idstringfile_789
statusstringaccepted

Response example

Example response
202 Accepted
Content-Type: application/json

{
  "operation_id": "op_459",
  "item_id": "file_789",
  "status": "accepted"
}

How it works

An owner or appropriate writer must authorize the action. Existing shared recipients cannot delete the owner’s underlying bytes merely because they can read them. Retention and provider-specific behavior remain design decisions.