<Intro>

<EndpointHeader />

<Description>

Returns the workspace's WhatsApp messages as a cursor-paginated list, newest first. Filter by status, contact phone number, business-scoped user ID, tag, or creation time; pass the response's `next_cursor` back as `starting_after` to fetch the next page. To follow a single message's delivery, use [Get a WhatsApp message](/docs/api/reference/get-whats-app-message) instead.

</Description>

</Intro>

<Parameters in="query">

<Parameter name="limit" type="integer">

<Description>

Maximum number of items to return per page.

</Description>

</Parameter>

<Parameter name="starting_after" type="string">

<Description>

Cursor from the `next_cursor` field of a previous list response. Returns items immediately after the cursor position in the current sort order.

</Description>

</Parameter>

<Parameter name="ending_before" type="string">

<Description>

Cursor from the `prev_cursor` field of a previous list response. Returns items immediately before the cursor position in the current sort order.

</Description>

</Parameter>

<Parameter name="created_after" type="string">

<Description>

Return only resources created at or after this timestamp (inclusive lower bound). Combine with `created_before` to filter to a time window. RFC 3339 / ISO 8601 with timezone.

</Description>

</Parameter>

<Parameter name="created_before" type="string">

<Description>

Return only resources created strictly before this timestamp (exclusive upper bound). Combine with `created_after` to filter to a time window. RFC 3339 / ISO 8601 with timezone.

</Description>

</Parameter>

<Parameter name="status" type="array">

<Description>

Filter by status. Repeat the parameter to match any of several statuses.

</Description>

</Parameter>

<Parameter name="phone_number" type="string">

<Description>

Filter by contact phone number (E.164 exact match).

</Description>

</Parameter>

<Parameter name="bsuid" type="string">

<Description>

Filter by business-scoped user ID (Meta identifier).

</Description>

</Parameter>

<Parameter name="tag" type="array">

<Description>

Filter by tag. Accepts `name` to match any message carrying that tag name, or `name:value` to match a specific tag pair (e.g. `category:welcome`). Repeat the parameter to AND-combine several tag filters.

</Description>

</Parameter>

</Parameters>

<Payload kind="response">

<Field name="data" type="array of object" required>

<Description>

Page of WhatsApp messages, newest first.

</Description>

<FieldChildren kind="response">

<Field name="id" type="string" prefix="data." required>

<Description>

ID of the message (`wam_`-prefixed), assigned when the send is accepted. Pass it as `message_id` to the get-message and list-events endpoints.

</Description>

</Field>

<Field name="direction" type="string" prefix="data." required>

<Description>

Whether the message was sent by the business (`outbound`) or received from the contact (`inbound`).

</Description>

<Description>

Possible values: `outbound`, `inbound`

</Description>

</Field>

<Field name="from" type="object" prefix="data." required>

<Description>

Sender of the message. On outbound messages, the business number it was sent from; on inbound, the WhatsApp contact.

</Description>

<FieldChildren kind="response">

<Field name="phone_number" type="string" prefix="data.from.">

<Description>

Phone number in E.164 format, when known.

</Description>

</Field>

<Field name="bsuid" type="string" prefix="data.from.">

<Description>

Business-scoped user ID, Meta's identifier for the WhatsApp user. Present only on the WhatsApp-user side of the message.

</Description>

</Field>

</FieldChildren>

</Field>

<Field name="to" type="object" prefix="data." required>

<Description>

Recipient of the message. On outbound messages, the WhatsApp contact; on inbound, the business number.

</Description>

<FieldChildren kind="response">

<Field name="phone_number" type="string" prefix="data.to.">

<Description>

Phone number in E.164 format, when known.

</Description>

</Field>

<Field name="bsuid" type="string" prefix="data.to.">

<Description>

Business-scoped user ID, Meta's identifier for the WhatsApp user. Present only on the WhatsApp-user side of the message.

</Description>

</Field>

</FieldChildren>

</Field>

<Field name="template" type="object" prefix="data.">

<Description>

The template the message was sent from. For authentication templates the filled-in values are not returned.

</Description>

<FieldChildren kind="response">

<Field name="name" type="object" prefix="data.template." required>

<Description>

The template's stable handle (for example `bird_otp`).

</Description>

</Field>

<Field name="category" type="object" prefix="data.template." required>

<Description>

Content classification applied to messages sent from this template.

</Description>

</Field>

<Field name="language" type="string" prefix="data.template." required>

<Description>

The language code of the template variant that was sent (for example `en`).

</Description>

</Field>

<Field name="components" type="array of object" prefix="data.template." required>

<Description>

The values that filled the template's placeholders. Empty for an authentication template, whose content is never returned.

</Description>

<FieldChildren kind="response">

<Field name="type" type="string" prefix="data.template.components." required>

<Description>

Which part of the template this fills in: `body` for the main text, `button` for a button's variable, `header` for the header. Bird manages header values itself, so a `header` entry supplied on a send is ignored.

</Description>

<Description>

Possible values (may grow over time): `header`, `body`, `button`

</Description>

</Field>

<Field name="parameters" type="array of object" prefix="data.template.components.">

<Description>

The values that fill this part's placeholders, in `{{n}}` placeholder order.

</Description>

<FieldChildren kind="response">

<Field name="type" type="object" prefix="data.template.components.parameters." required>

<Description>

The kind of value this parameter carries. `text` is the only kind today.

</Description>

</Field>

<Field name="text" type="string" prefix="data.template.components.parameters." required>

<Description>

The value substituted into the placeholder, as a plain string.

</Description>

</Field>

<Field name="name" type="string" prefix="data.template.components.parameters.">

<Description>

For named-parameter templates: the placeholder this value fills (for example `first_name`). Omit for positional templates.

</Description>

</Field>

</FieldChildren>

</Field>

</FieldChildren>

</Field>

</FieldChildren>

</Field>

<Field name="status" type="object" prefix="data." required />

<Field name="last_error" type="nullable object" prefix="data.">

<Description>

Failure detail for a message that did not reach the recipient. Present only when the message failed.

</Description>

<FieldChildren kind="response">

<Field name="code" type="string" prefix="data.last_error." required>

<Description>

Failure reason, uniform whether the failure happened internally or was reported by the WhatsApp network. `insufficient_balance`: the workspace could not afford the send. `price_not_found`: no price was configured for this destination/template combination. `internal_error`: an unexpected Bird-side failure. `undeliverable`: the recipient could not be reached (for example not on WhatsApp, or the number is invalid). `service_window_expired`: the 24-hour customer care window has closed and a free-form message cannot be sent; send a template instead. `rate_limited`: the send was throttled. `recipient_suppressed`: the recipient is on the workspace's suppression list; the message was rejected before sending. Open enum: new codes may be added over time, so treat any unrecognized value as a future code rather than an error.

</Description>

<Description>

Possible values (may grow over time): `insufficient_balance`, `price_not_found`, `internal_error`, `undeliverable`, `service_window_expired`, `rate_limited`, `recipient_suppressed`

</Description>

</Field>

<Field name="description" type="string" prefix="data.last_error." required>

<Description>

Human-readable explanation of the failure.

</Description>

</Field>

<Field name="meta_error_code" type="nullable string" prefix="data.last_error.">

<Description>

Raw error code from the WhatsApp Cloud API, when available, for low-level debugging.

</Description>

</Field>

<Field name="occurred_at" type="string" prefix="data.last_error." required>

<Description>

When the failure occurred.

</Description>

</Field>

</FieldChildren>

</Field>

<Field name="created_at" type="string" prefix="data." required>

<Description>

When the message was accepted for delivery.

</Description>

</Field>

<Field name="sent_at" type="nullable string" prefix="data.">

<Description>

When the message was handed to the WhatsApp network. Null until then.

</Description>

</Field>

<Field name="delivered_at" type="nullable string" prefix="data.">

<Description>

When delivery was confirmed. Null until then.

</Description>

</Field>

<Field name="read_at" type="nullable string" prefix="data.">

<Description>

When the message was read by the recipient. Null until then.

</Description>

</Field>

<Field name="tags" type="array of object" prefix="data.">

<Description>

Structured `{name, value}` filter labels applied to this message.

</Description>

<FieldChildren kind="response">

<Field name="name" type="string" prefix="data.tags." required>

<Description>

Tag name. ASCII letters, digits, underscore, and hyphen only. Case-sensitive. Maximum 32 characters.

</Description>

</Field>

<Field name="value" type="string" prefix="data.tags." required>

<Description>

Tag value. ASCII letters, digits, underscore, and hyphen only. Case-sensitive. Maximum 64 characters.

</Description>

</Field>

</FieldChildren>

</Field>

<Field name="metadata" type="object" prefix="data.">

<Description>

Arbitrary JSON metadata stored on the message.

</Description>

</Field>

</FieldChildren>

</Field>

<Field name="next_cursor" type="nullable string" required>

<Description>

Cursor for the next page. Pass back as `starting_after` to advance forward. Null when no next page exists.

</Description>

</Field>

<Field name="prev_cursor" type="nullable string" required>

<Description>

Cursor for the previous page. Pass back as `ending_before` to step backward. Null when no previous page exists.

</Description>

</Field>

<Field name="refresh_cursor" type="nullable string" required>

<Description>

Refresh anchor. Pass back as `ending_before` later to fetch items that have appeared since this response. Non-null whenever `data` is non-empty; null only on an empty page. Distinct from `prev_cursor`.

</Description>

</Field>

</Payload>