---
title: "Get an attachment"
canonical: "https://bird.com/docs/api/reference/get-amb-attachment"
---

# Get an attachment

`GET /v1/amb/attachments/{attachment_id}`

Returns the metadata of an attachment by its `aat_` ID. `origin` says
whether a customer sent it, you sent it, or you uploaded it; a message
attachment carries its `message_id`. `expires_at` is Bird's estimate of
when Apple stops holding the attachment. A send within 24 hours of
`expires_at` is refused. An unknown ID returns `404`.

## Servers

- `https://{region}.platform.bird.com`: Regional API endpoint. Use the host for the region your organization is hosted in. Official Bird SDKs and the CLI select it automatically from your API key, so you rarely need to set it by hand.
  - `region`: `us1`, `eu1`. Default: `us1`. The region your organization's data is hosted in.
- `https://platform.bird.com`: Region-independent endpoint for authentication and account administration.
- `http://localhost:8080`: Local development.

## Authentication

Use one authentication option:

- `BearerAuth`: HTTP bearer authentication. Pass the API key as a bearer token in the `Authorization` header. Workspace
keys use `bk_{region}_*`; organization master keys use `bm_{region}_*`.
The prefix identifies the region and selects the
API endpoint. Official Bird SDKs and the CLI derive the region from the key.

- `CookieAuth`: Send `bird_session` in cookie. Session cookie set after signing in to the Bird dashboard. The cookie
value is an opaque session token; no session data is stored in the cookie
itself.

## Code samples

**CLI**

```sh
bird amb attachments get <attachment-id>
```

Examples: [CLI](/docs/api/reference/get-amb-attachment.cli.md) · [MCP](/docs/api/reference/get-amb-attachment.mcp.md) · [cURL](/docs/api/reference/get-amb-attachment.curl.md)

## Example response `200`

```json
{
  "id": "aat_01krdgeqcxet5s7t44vh8rt9mg",
  "business_account_id": "abz_01krdgeqcxet5s7t44vh8rt9mg",
  "origin": "received",
  "message_id": "amb_01krdgeqcxet5s7t44vh8rt9mg",
  "name": "receipt.pdf",
  "mime_type": "application/pdf"
}
```

## Path parameters

- `attachment_id` (string, required): Attachment identifier. Starts with `aat_`.

## Header parameters

- `X-Workspace-Id` (string, optional): Workspace context for the request. Required for dashboard authentication and master keys. Workspace keys and access tokens already identify their workspace; send that workspace or omit the header. A different one is rejected.
- `X-Organization-Id` (string, optional): Organization context for the request. Required for dashboard authentication. An API key or access token carries its own organization, so send either that organization or no header at all; a different one is rejected.

## Response body

- `id` (string, required): Send it as `attachment_id`.
- `business_account_id` (string, required): The business account Apple holds the attachment for.
- `origin` (string, required)

  How Bird obtained an attachment:

  - `received`: A customer sent it in a message.
  - `sent`: You sent it in a message by `source_url`.
  - `uploaded`: You uploaded it with createAMBAttachment.

  Possible values: `received`, `sent`, `uploaded`
- `message_id` (string): The message the attachment belongs to.
- `name` (string, required): Display filename. May be empty for an attachment stored before this release.
- `mime_type` (string, required): Media type of the attachment. May be empty for an attachment stored before this release.
- `size` (integer, required): Attachment size in bytes. May be 0 for an attachment stored before this release.
- `expires_at` (string, required): Bird's estimate of when Apple stops holding the attachment, 30 days after it was received, uploaded or last sent. A send within 24 hours of this time is refused.
- `created_at` (string, required): When Bird stored the attachment.

## 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)
