---
title: "List Trash"
method: GET
path: "/v1/inboxes/{inbox_id}/trash"
tags: ["trash"]
---

# List Trash

`GET /v1/inboxes/{inbox_id}/trash`

## Request

- Base URL: `https://cherami.to`
- URL: `https://cherami.to/v1/inboxes/{inbox_id}/trash`
- Auth: HTTP bearer

Lists the inbox's deleted messages that can still be restored, most recently deleted first. `kind` (`received` or `sent`) picks the restore endpoint: [received](https://cherami.to/docs/api/trash/restore-message) or [sent](https://cherami.to/docs/api/trash/restore-sent-message). `restorable_until` is seven days after `deleted_at`; after it the message is gone for good. A deleted conversation appears as its separate messages. Mail deleted with its inbox never appears here.

## Path parameters

- `inbox_id` string, required

## Query parameters

- `limit` integer
- `cursor` string

## Response `200`

Success.

- object
  - `messages` TrashEntry[], required
    - union: A deleted message that can still be restored; kind picks the restore endpoint. from is null for a received message that never became ready.
      - object
        - `id` string, required: Cherami resource ID.
        - `kind` 'received', required
        - `inbox_id` string, required: Cherami resource ID.
        - `subject` string, nullable, required
        - `from` union, required: Mailbox or group from the message headers, written by the sender and not verified.
          - object
            - `name` string, required
            - `address` string, required
          - object
            - `name` string, required
            - `group` object[], required
              - …
        - `envelope_from` string, required: SMTP sender; can be a bounce address.
        - `deleted_at` string, date-time, required: UTC timestamp with milliseconds.
        - `restorable_until` string, date-time, required: Seven days after deleted_at; the message can't be restored after it.
      - object
        - `id` string, required: Cherami resource ID.
        - `kind` 'sent', required
        - `inbox_id` string, required: Cherami resource ID.
        - `subject` string, nullable, required
        - `to` Mailbox[], required
          - `address` string, required: Bare address such as alex@example.com: ASCII, at most 254 characters and 64 before the @.
          - `name` string: Optional name; blank means none. At most 256 UTF-8 bytes after trimming, without control characters.
        - `deleted_at` string, date-time, required: UTC timestamp with milliseconds.
        - `restorable_until` string, date-time, required: Seven days after deleted_at; the message can't be restored after it.
  - `next_cursor` string, nullable, required: Cursor for the next page, or null at the end. Send it with the same URL, filters and order.

## Other responses

- `400`: `invalid_limit`: Use an integer from 1 to 100. `invalid_cursor`: Send a cursor only to the listing, filters and order that returned it, or restart from the first page.
- `401`: `unauthorized`: Send a valid API key as `Authorization: Bearer <key>`. If the key stopped working, get a new one through [recovery](https://cherami.to/docs/guides/recovery).
- `404`: `not_found`: The resource does not exist or does not belong to this account. A reply or forward source must also be in the sending inbox.
- `500`: `internal_error`: The operation failed. Retry a read; after a write the change may have happened, so recover as [retry by operation](https://cherami.to/docs/api/errors#retry-by-operation) describes.
- `503`: `content_unavailable`: Stored content could not be read. Retry later.

---

[API](https://skmtc.dev/cherami/apis/cherami-http-api.md) · [All operations](https://skmtc.dev/cherami/apis/cherami-http-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cherami/apis/cherami-http-api/revisions/7bd993d538af?raw)
