# Get raw MIME message body

Streams the full raw RFC 5322 MIME message bytes directly from storage. Works for active messages and trash messages.

## `GET /api/v1/mailboxes/{mailboxId}/messages/{messageId}/raw`

### Path parameters

- `mailboxId` (string, required) — Mailbox ULID identifier
- `messageId` (string, required) — Message ULID identifier

### Header parameters

- `if-none-match` (string) — Revalidation ETag from previous response

### Responses

**200** — Raw RFC 5322 message stream

`message/rfc822` → string

**304** — Not modified — If-None-Match matched the stored blob's ETag

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

`application/json` → ErrorBody

**404** — Mailbox or message not found

`application/json` → ErrorBody

**500** — blob_missing — metadata exists but message storage blob read failed

`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}/messages/{messageId}/raw' \
  -H 'Authorization: Bearer oek_…'
```

## TypeScript SDK

[`openemail.messages.getRaw`](/docs/sdks/typescript/messages/get-raw)

```ts
const blob = await openemail.messages.getRaw(mailboxId, messageId)
```
