# `bird whatsapp agents files list`

## Usage

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

## Description

List the files the agent on this WhatsApp number holds, as a cursor page. Each entry's `url` downloads its bytes.

Returns a paginated JSON envelope; narrow with the filters below and page with --limit and --starting-after.

## Examples

```bash
bird whatsapp agents files list <number-id>
bird whatsapp agents files list <number-id> | jq -r '.data[].id'
bird whatsapp agents files list <number-id> --limit 50 --starting-after <cursor>
```

## Options

#### Pagination

| Name               | Description                                                                                                                                                                                                                                                                                                                                             |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--ending-before`  | Cursor from the prev\_cursor or refresh\_cursor field of a previous list response. Returns items immediately before the cursor position in the current sort order. prev\_cursor returns the preceding page. refresh\_cursor anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since. |
| `--limit <n>`      | Maximum number of items to return per page. Allowed range: 1 to 100.                                                                                                                                                                                                                                                                                    |
| `--order`          | Sort direction. Defaults to desc, which sorts from newest to oldest or largest to smallest, depending on the selected sort field. Possible values: asc, desc.                                                                                                                                                                                           |
| `--sort`           | Field to sort by. Possible values: created\_at.                                                                                                                                                                                                                                                                                                         |
| `--starting-after` | Cursor from the next\_cursor field of a previous list response. Returns items immediately after the cursor position in the current sort order.                                                                                                                                                                                                          |

#### Filters

| Name                | Description                                      |
| ------------------- | ------------------------------------------------ |
| `--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 upload`](/docs/cli/reference/whatsapp-agents-files-upload)     | Upload a file to an agent        |

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