---
title: "bird whatsapp files upload"
description: "Upload a WhatsApp file"
canonical: "https://bird.com/docs/cli/reference/whatsapp-files-upload"
---

# `bird whatsapp files upload`

## Usage

```bash
bird whatsapp files upload [flags]
```

## Description

Upload a WhatsApp file

Stores a file for your WhatsApp messages for 30 days, hands it to WhatsApp for the number in `from`, and returns a `waf_` file ID to send as a free-form message's `image`, `video`, `audio`, `sticker` or `document` `file_id`, or as a template's media header, from that number, so the same file can be sent to several recipients with one upload.

Pass the file with --file ("-" reads stdin); any other fields are
flags. Run --dry-run to print the parts that would be sent, including the
file's path and size, without uploading it.

## Examples

```bash
# check what would be sent, without sending it
bird whatsapp files upload --from <from> --file ./document.pdf --dry-run

# upload it
bird whatsapp files upload --from <from> --file ./document.pdf
```

## Options

#### Request

| Name                | Description                                                  |
| ------------------- | ------------------------------------------------------------ |
| `--dry-run`         | Print the resolved request without sending it, then exit     |
| `--idempotency-key` | Deduplication key; a retry with the same key won't act twice |

#### Options

| Name                | Description                                                                                                                                                                          |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--from`            | Connected E.164 number owned by this workspace that the file is uploaded to WhatsApp with. Only a message sent from this number can send the file. (required)                        |
| `--name`            | Display filename. Defaults to the uploaded filename.                                                                                                                                 |
| `--mime-type`       | Media type of the file. Defaults to the type we detect from the contents; send it for a type detection cannot tell apart, such as an Office document or AAC, AMR, M4A or 3GPP media. |
| `--file`            | The file, at most 100 MB, as the last part of the form. Its filename becomes the file's name unless name is given. (required)                                                        |
| `--response-schema` | Print the fields this command returns, then exit                                                                                                                                     |

## Related

| Name                                                                          | Description                        |
| ----------------------------------------------------------------------------- | ---------------------------------- |
| [`bird whatsapp files download`](/docs/cli/reference/whatsapp-files-download) | Download an uploaded WhatsApp file |
| [`bird whatsapp files get`](/docs/cli/reference/whatsapp-files-get)           | Get a WhatsApp file                |

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