# Trash

Deleted documents and attachments stay in the trash until they are restored or purged.

## Endpoints

- [List the trash](https://developers.lydie.co/api/trash/list-the-trash.md): `GET /v1/workspaces/{workspaceId}/trash`
- [Empty the trash](https://developers.lydie.co/api/trash/empty-the-trash.md): `DELETE /v1/workspaces/{workspaceId}/trash`

## The TrashItem object

- `kind` (string, required): One of: `document`, `attachment`.
- `id` (ULID, required)
- `workspaceId` (string, required): (1–64 chars)
- `title` (string, required): Document title or attachment filename.
- `parentId` (ULID, required, nullable): Where a document goes back to on restore, if still there.
- `deletedAt` (timestamp, required)
- `deletedBy` (string, required, nullable): (≥ 1 chars)
- `descendantCount` (integer, required): Documents trashed together with it.

```json
{
  "kind": "document",
  "id": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
  "workspaceId": "01JCQ3TZ0WJ8K4M2X7T9R6N1PA",
  "title": "Meeting notes",
  "parentId": null,
  "deletedAt": "2026-11-12T09:30:00.000Z",
  "deletedBy": null,
  "descendantCount": 0
}
```
