---
title: "Get a message attachment"
method: GET
path: "/v1/amb/messages/{message_id}/attachments/{index}"
tags: ["amb-messages"]
---

# Get a message attachment

`GET /v1/amb/messages/{message_id}/attachments/{index}`

## Request

- Base URL: `https://us1.platform.bird.com`
- URL: `https://us1.platform.bird.com/v1/amb/messages/{message_id}/attachments/{index}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `bird_session`

Downloads the attachment at the zero-based `index` in a message's
`content.attachments` array and returns its decrypted bytes with the
media type the attachment declares. A declared PNG, JPEG, GIF or WebP
type is kept only when the bytes match it; a missing, malformed or
mismatched type returns `application/octet-stream`. The
`Content-Disposition` header carries the original filename.
Works for attachments a customer sent and for attachments
you sent. For a received attachment, `message_id` is the `message.id`
of the `amb.received` webhook event, and `index` is the attachment's
position in that message's `content.attachments` array.

Apple retains an attachment for 30 days, renewed each time its reference
is reused; availability after that period is not guaranteed, so download
an attachment when the message arrives rather than on demand later. An unknown message or
index returns `404`; an unavailable or expired Apple reference returns
`503`.

## Path parameters

- `message_id` string, required
- `index` integer, required

## Headers

- `X-Workspace-Id` string
- `X-Organization-Id` string

## Response `200`

The raw attachment bytes.

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Insufficient permissions
- `404`: Resource not found
- `422`: The request has invalid field values, violates a business rule, or carries a query parameter the endpoint does not declare. Field validation errors use `type: validation_error` and include the affected fields in `details`. Business-rule errors identify the failed rule in `type`.
- `429`: Rate limit exceeded
- `500`: Internal server error
- `503`: The service is temporarily unavailable. If `Retry-After` is present, wait for that delay before retrying; otherwise, retry with exponential backoff. Reuse the same idempotency key and request when retrying a mutation.

---

[API](https://skmtc.dev/messagebird/apis/bird-api.md) · [All operations](https://skmtc.dev/messagebird/apis/bird-api/llms.txt) · [OpenAPI document](https://skmtc.dev/messagebird/apis/bird-api/revisions/6dfce1179799?raw)
