# Fetch webhook attachment or raw message

Redeems a signed webhook token URL to download a large attachment or original raw MIME message. No bearer credential: the token in the path IS the credential (a signed, expiring capability minted into webhook payloads as `url` / `rawUrl`).

## `GET /api/v1/deliveries/fetch/{token}`

### Path parameters

- `token` (string, required) — Signed capability token from webhook payload

### Header parameters

- `if-none-match` (string) — Revalidation ETag from a previous response; on match the answer is 304

### Responses

**200** — Decoded attachment bytes or raw RFC 5322 message stream

`application/octet-stream` → string

**304** — Not modified (ETag match)

**403** — invalid_token — token is expired, invalid, or forged

`application/json` → ErrorBody

**404** — not_found — staged message expired or part section not found

`application/json` → ErrorBody

**413** — message_too_large: the staged message is over the part-walk ceiling, so a section cannot be extracted (the raw-message form of the token still works)

`application/json` → ErrorBody

**422** — unparseable_message — message structure cannot be parsed

`application/json` → ErrorBody

**503** — part_walk_busy: too many large messages are being read on this server at once; retry after Retry-After. Or 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/deliveries/fetch/{token}'
```

## TypeScript SDK

[`openemail.deliveries.download`](/docs/sdks/typescript/deliveries/download)

```ts
const blob = await openemail.deliveries.download(token)
```
