bird whatsapp list
Usage
Code example
bird whatsapp list [flags]Description
List WhatsApp messages, newest first, as a cursor page ({data, next_cursor, …}). Each message carries the one content it was built from: a template, or free-form text, image, video, audio, sticker, document or location. Pass next_cursor back as starting_after to fetch the next page. Filter by direction, status, recipient (to), sender (from), business-scoped user ID (bsuid), template category, or tag. to and from each accept a phone number or a business-scoped user ID; pair either with direction to search a single side of the message. Use whatsapp_get for one message's current state.
Returns a paginated JSON envelope; narrow with the filters below and page with --limit and --starting-after.
Examples
Code example
bird whatsapp list
bird whatsapp list | jq -r '.data[].id'
bird whatsapp list --limit 50 --starting-after <cursor>Options
Filters
| Name | Description |
|---|---|
| --bsuid | Filter by business-scoped user ID (Meta identifier), matching the contact in either direction. to and from also accept one, but each matches a single end of the message. |
| --category | Filter by category. Known values: authentication, utility, marketing (others may exist). |
| --created-after | Limits the response to resources created at or after this timestamp. Combine it with created_before to select a time window. Use an RFC 3339 timestamp with a timezone offset. |
| --created-before | Limits the response to resources created before this timestamp. Combine it with created_after to select a time window. Use an RFC 3339 timestamp with a timezone offset. |
| --direction | Filter by whether the business sent the message (outbound) or received it from the contact (inbound). Possible values: outbound, inbound. |
| --from | Filter by sender, exact match. The sender is your business number on an outbound message and the contact on an inbound one, matching the from each message returns. Accepts an E.164 phone number, or a business-scoped user ID to name the contact. Only a contact is ever identified by a business-scoped user ID, so from=<business-scoped user ID> matches inbound messages only. |
| --phone-number | Deprecated: use to or from instead, which also match a business-scoped user ID. Filters by contact phone number (E.164 exact match), in either direction. |
| --response-schema | Print the fields this command returns, then exit |
| --status <v1,v2,…> | Filter by status. Repeat the parameter to match any of several statuses. Possible values: scheduled, accepted, sent, delivered, failed, rejected, canceled, received. |
| --tag <v1,v2,…> | Filter by tag. Accepts name to match any message carrying that tag name, or name:value to match a specific tag pair (for example category:welcome). Repeat the parameter to add more tags. A message must match every tag listed to be returned. |
| --to | Filter by recipient, exact match. The recipient is the contact on an outbound message and your business number on an inbound one, matching the to each message returns. Accepts an E.164 phone number, or a business-scoped user ID to name the contact. Only a contact is ever identified by a business-scoped user ID, so to=<business-scoped user ID> matches outbound messages only. |
Pagination
| Name | Description |
|---|---|
| --ending-before | Cursor from the prev_cursor field of a previous list response. Returns items immediately before the cursor position in the current sort order. |
| --limit <n> | Maximum number of items to return per page. |
| --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. |
Related
| Name | Description |
|---|---|
| bird whatsapp get | Get a WhatsApp message |
| bird whatsapp list-events | List events for a WhatsApp message |
| bird whatsapp send | Send a WhatsApp message to one recipient |