# `bird whatsapp agents files upload`

## Usage

```bash
bird whatsapp agents files upload <number-id> [flags]
```

## Description

Upload a file to an agent

Upload a document for the agent on this WhatsApp number to answer from, as multipart form data with `file_name` and `file` parts. Up to 100 MB; PDF, Word, PNG, JPEG, CSV or Excel.

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 agents files upload <number-id> --file-name <file-name> --file ./document.pdf --dry-run

# upload it
bird whatsapp agents files upload <number-id> --file-name <file-name> --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                                                                                                                                                  |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--file-name`       | The name to file the document under. WhatsApp lists the file by it, and so does this API. (required)                                                         |
| `--file`            | The document itself, up to 100 MB. WhatsApp accepts PDF, Word (.doc, .docx), PNG, JPEG, CSV and Excel (.xlsx); anything else is refused with 422. (required) |
| `--response-schema` | Print the fields this command returns, then exit                                                                                                             |

## Related

| Name                                                                                        | Description                      |
| ------------------------------------------------------------------------------------------- | -------------------------------- |
| [`bird whatsapp agents files delete`](/docs/cli/reference/whatsapp-agents-files-delete)     | Remove one of an agent's files   |
| [`bird whatsapp agents files download`](/docs/cli/reference/whatsapp-agents-files-download) | Download one of an agent's files |
| [`bird whatsapp agents files get`](/docs/cli/reference/whatsapp-agents-files-get)           | Get one of an agent's files      |
| [`bird whatsapp agents files list`](/docs/cli/reference/whatsapp-agents-files-list)         | List an agent's files            |

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