---
title: "Get a WhatsApp file"
canonical: "https://bird.com/docs/api/reference/get-whatsapp-file"
---

# Get a WhatsApp file

`GET /v1/whatsapp/files/{file_id}`

Returns a file stored for the workspace's WhatsApp messages with `POST /v1/whatsapp/files`, with the number it
can be sent from. An unknown ID, an ID from another workspace, the ID of media on a received message, a file
WhatsApp refused at upload, or a file past its 30-day expiry 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.

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

## Code samples

**TypeScript**

```ts
const file = await bird.whatsapp.files.get("waf_01kyb2m4xq7whs0d8n3prv6tez");
// Send it from file.from before expires_at, as file_id on a media send.
console.log(file.name, file.mime_type, file.from, file.expires_at);
```

Examples: [TypeScript](/docs/api/reference/get-whatsapp-file.ts.md) · [Python](/docs/api/reference/get-whatsapp-file.py.md) · [Go](/docs/api/reference/get-whatsapp-file.go.md) · [PHP](/docs/api/reference/get-whatsapp-file.php.md) · [CLI](/docs/api/reference/get-whatsapp-file.cli.md) · [MCP](/docs/api/reference/get-whatsapp-file.mcp.md) · [cURL](/docs/api/reference/get-whatsapp-file.curl.md)

## Example response `200`

```json
{
  "id": "waf_01krdgeqcxet5s7t44vh8rt9mg",
  "from": "+13124495648",
  "name": "receipt.pdf",
  "mime_type": "application/pdf",
  "size": 48213,
  "created_at": "2026-12-03T12:00:00Z",
  "expires_at": "2027-01-02T12:00:00Z"
}
```

## Path parameters

- `file_id` (string, required): ID of the WhatsApp file.

## 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): ID of the stored file, which a free-form media send or a template's media header accepts as `file_id`.
- `from` (string, required): The E.164 number the file was uploaded to WhatsApp with; only a message from this number can send it.
- `name` (string, required): Display filename.
- `mime_type` (string, required): Media type of the file.
- `size` (integer, required): File size in bytes.
- `created_at` (string, required): When the file was stored.
- `expires_at` (string, required): When the file is removed, 30 days after it was stored. A send within 24 hours of this time is refused.

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