# Get specific message MIME part

Streams a single decoded MIME part or raw encoded slice from message storage by section number.

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

### Path parameters

- `mailboxId` (string, required) — Mailbox ULID identifier
- `messageId` (string, required) — Message ULID identifier
- `section` (string, required) — IMAP section number (e.g. 1, 2, 3.1) from /content attachments[].section

### Query parameters

- `raw` ("true" | "false") — Set to 'true' to return raw undecoded transfer bytes instead of decoded content

### Header parameters

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

### Responses

**200** — MIME part content bytes

`application/octet-stream` → string

**304** — Not modified — If-None-Match matched part ETag

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

`application/json` → ErrorBody

**404** — Mailbox, message, or MIME section not found

`application/json` → ErrorBody

**413** — message_too_large

`application/json` → ErrorBody

**422** — unparseable_message or message_too_complex

`application/json` → ErrorBody

**500** — blob_missing

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

## TypeScript SDK

[`openemail.messages.getPart`](/docs/sdks/typescript/messages/get-part)

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