---
title: "bird amb attachment"
description: "Download a message attachment"
canonical: "https://bird.com/docs/cli/reference/amb-attachment"
---

# `bird amb attachment`

## Usage

```bash
bird amb attachment <message-id> <index> [flags]
```

## Description

Download and decrypt one attachment from an Apple Messages for Business message.
&lt;index> is the attachment's zero-based position in the message's content.attachments
array; read the message with `bird amb get` to see its attachments. For a
received attachment, &lt;message-id> is the message.id of the amb.received webhook
event. Apple keeps attachments for 30 days, renewed when a reference is reused,
so download them on receipt.

The bytes are written to --output when set, otherwise to stdout:

bird amb attachment amb\_123 0 --output photo.jpg

## Examples

```bash
bird amb attachment <message-id> <index> --output photo.jpg
```

## Options

| Name           | Description                                    |
| -------------- | ---------------------------------------------- |
| `--output, -o` | Write the bytes to this file instead of stdout |

## Related

| Name                                                          | Description                             |
| ------------------------------------------------------------- | --------------------------------------- |
| [`bird amb get`](/docs/cli/reference/amb-get)                 | Get a message                           |
| [`bird amb list`](/docs/cli/reference/amb-list)               | List messages                           |
| [`bird amb list-events`](/docs/cli/reference/amb-list-events) | List events for a message               |
| [`bird amb send`](/docs/cli/reference/amb-send)               | Reply to an Apple Messages conversation |

## Related resources

- [Should I use a Bird SDK or call the API directly?](/explained/platform/should-i-use-an-sdk-or-call-the-api-directly) (answer)
- [Build your first integration](/learn/paths/integration) (course)
- [Send your first email](/docs/get-started/send-your-first-email) (docs)

[Get an implementation brief](/learn/workspace?topic=api-basics)
