# List vanished (expunged) message UIDs

Returns UIDs of messages expunged from the label since a specified change sequence (MODSEQ) number.

## `GET /api/v1/mailboxes/{mailboxId}/labels/{label}/vanished`

### Path parameters

- `mailboxId` (string, required) — Mailbox ULID identifier
- `label` (string, required) — Label or folder name (e.g. INBOX, Archive, custom)

### Query parameters

- `changedSince` (integer | null, ≥ 0) — Find UIDs expunged after this MODSEQ change sequence number
- `limit` (integer, ≥ 1, ≤ 2000) — Maximum UIDs to return per page (max 2000)
- `cursor` (string) — Pagination cursor for next page

### Responses

**200** — List of vanished UIDs and current highest change sequence number

`application/json` → VanishedResult

- `highestModseq` (integer <int64>, required) — Current RFC 7162 HIGHESTMODSEQ of the label
- `vanished` (integer <int64>[], required) — List of expunged UIDs since the requested modseq
- `nextCursor` (string) — Opaque cursor for the next page; absent on the last page

**400** — validation_failed — malformed query

`application/json` → ErrorOrValidation

**401** — unauthorized: the bearer credential is missing, malformed, expired, or revoked. Carries a `WWW-Authenticate: Bearer` challenge

`application/json` → ErrorBody

**404** — Mailbox or label not found

`application/json` → ErrorBody

**410** — cannot_calculate_changes — requested modseq predates change tracking window

`application/json` → ErrorBody

**503** — temporary_failure: the platform's storage could not answer just now; retry after the Retry-After window. Any operation can answer this. A write that got it may have been applied, so retry it with the same idempotency key where it takes one, or read the state back first (see Transient failures in the API description)

`application/json` → ErrorBody

### Example request

```bash
curl -X GET 'https://api.open.email/api/v1/mailboxes/{mailboxId}/labels/{label}/vanished' \
  -H 'Authorization: Bearer oek_…'
```

## TypeScript SDK

[`openemail.labels.listVanished`](/docs/sdks/typescript/labels/list-vanished)

```ts
for await (const result of openemail.labels.listVanished(mailboxId, label)) {
  // every item of every page (await the call instead for one page)
}
```
