---
title: "trash File or Directory"
method: POST
path: "/api/assets/trash"
tags: ["Assets"]
---

# trash File or Directory

`POST /api/assets/trash`

## Request body

- TrashFileOrDirDto
  - `source` string, required — The source path of the file or directory to be thrashed

## Response `200`

Successfully trash the file or directory.

## Other responses

- `400` — Failed to trash the file or directory.

## Changes

- **2026-06-13** `ad1934145230` — 1 info
  - api operation id `AssetsController_TrashFileOrDir` removed and replaced with `AssetsController_trashFileOrDir`
- **2026-06-13** `5090ff5674b4` — 1 info
  - endpoint added
- **2023-10-20** `bbfe1dbc457f` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/openwebgal/apis/webgal-terre-api/changes/api/assets/trash/post.md)

---

[API](https://skmtc.dev/openwebgal/apis/webgal-terre-api.md) · [All operations](https://skmtc.dev/openwebgal/apis/webgal-terre-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openwebgal/webgal-terre-api/revisions/ebcacb42f932/schema)
