List WhatsApp messages
GET
/v1/whatsapp/messages
curl -X GET "https://us1.platform.bird.com/v1/whatsapp/messages" \
-H "Authorization: Bearer $TOKEN" \
--url-query "limit=25"Returns a paginated list of WhatsApp messages in the workspace, newest first.
Parâmetros de consulta
limit
integer
Maximum number of items to return per page.
starting_after
string
Cursor from the next_cursor field of a previous list response. Returns items immediately after the cursor position in the current sort order.
ending_before
string
Cursor from the prev_cursor field of a previous list response. Returns items immediately before the cursor position in the current sort order.
created_after
string
Return only resources created strictly after this timestamp. RFC 3339 / ISO 8601 with timezone.
created_before
string
Return only resources created strictly before this timestamp. RFC 3339 / ISO 8601 with timezone.
status
array
Filter by status. Repeat the parameter to match any of several statuses.
phone_number
string
Filter by contact phone number (E.164 exact match).
bsuid
string
Filter by business-scoped user ID (Meta identifier).
Payload de resposta
data
array of object
obrigatório
Page of WhatsApp message objects.
Mostrar atributos secundários
data.id
string
obrigatório
Message ID.
data.direction
string
obrigatório
Whether the message was sent by the business (outbound) or received from the contact (inbound).
data.business
object
obrigatório
Mostrar atributos secundários
data.business.phone_number
string
E.164 phone number of the WhatsApp business account that sent the message.
data.business.phone_number_id
string
The WhatsApp phone number identifier. Present only for account-owned numbers.
data.contact
object
obrigatório
Mostrar atributos secundários
data.contact.phone_number
string
Contact's phone number in E.164 format, when known.
data.contact.bsuid
string
Business-scoped user ID (Meta's WhatsApp identifier for this contact within the business account), when available.
data.template
object
The template the message was sent from. For authentication templates the filled-in values are not returned.
Mostrar atributos secundários
data.template.name
string
obrigatório
The template's stable handle (for example bird_otp).
data.template.category
object
obrigatório
Content classification applied to messages sent from this template.
data.template.language
string
obrigatório
The language code of the template variant that was sent (for example en).
data.template.components
array of object
obrigatório
The values that filled the template's placeholders. Empty for an authentication template, whose content is never returned.
Mostrar atributos secundários
data.template.components.type
string
obrigatório
Which part of the template this fills in.
data.template.components.parameters
array of object
The values that fill this part's placeholders, in order.
Mostrar atributos secundários
data.template.components.parameters.type
object
obrigatório
Parameter type.
data.template.components.parameters.text
string
obrigatório
Parameter value.
data.status
object
obrigatório
data.last_error
nullable object
Failure detail for a message that did not reach the recipient. Null when there is no failure.
Mostrar atributos secundários
data.last_error.code
string
obrigatório
Bird-stable 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 (e.g. not on WhatsApp, number 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.
data.last_error.description
string
obrigatório
Human-readable explanation of the failure.
data.last_error.occurred_at
string
obrigatório
When the failure occurred.
data.created_at
string
obrigatório
When the message was accepted for delivery.
data.sent_at
nullable string
When the message was handed to the WhatsApp network. Null until then.
data.delivered_at
nullable string
When delivery was confirmed. Null until then.
data.read_at
nullable string
When the message was read by the recipient. Null until then.
next_cursor
nullable string
obrigatório
Cursor for the next page. Pass back as starting_after to advance forward. Null when no next page exists.
prev_cursor
nullable string
obrigatório
Cursor for the previous page. Pass back as ending_before to step backward. Null when no previous page exists.
refresh_cursor
nullable string
obrigatório
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.