# List the trash

`GET /v1/workspaces/{workspaceId}/trash`

Lists what is in a workspace's trash, newest first. A document deleted with its subtree is one item; restoring it restores the subtree.

Scope: `docs:read`.

## Request

```bash
curl "https://api.lydie.co/v1/workspaces/01JCQ3TZ0WJ8K4M2X7T9R6N1PA/trash" \
  -H "Authorization: Bearer $LYDIE_TOKEN"
```

## Path parameters

- `workspaceId` (string, required): (1–64 chars)

## Query parameters

- `limit` (integer, optional): Default: `100`. (1–500)

## Response

- `items` (TrashItem[], required)
  - `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
{
  "items": [
    {
      "kind": "document",
      "id": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
      "workspaceId": "01JCQ3TZ0WJ8K4M2X7T9R6N1PA",
      "title": "Meeting notes",
      "parentId": null,
      "deletedAt": "2026-11-12T09:30:00.000Z",
      "deletedBy": null,
      "descendantCount": 0
    }
  ]
}
```

Errors use the envelope described at https://developers.lydie.co/errors.md.
