Sign inGet Started

List messages in a WhatsApp conversation

GET
/v1/whatsapp/conversations/{conversation_id}/messages
const messages = await bird.whatsapp.conversations.listMessages("wacv_01krdgeqcxet5s7t44vh8rt9mg", {
  direction: "inbound",
});
for (const message of messages.data ?? []) {
  console.log(message.id, message.created_at);
}
प्रतिक्रिया200
{
  "data": [
    {
      "id": "wam_01krdgeqcxet5s7t44vh8rt9mh",
      "direction": "outbound",
      "from": {
        "phone_number": "+15550001234"
      },
      "to": {
        "phone_number": "+15550001111",
        "bsuid": "US.13491208655302741918"
      },
      "text": {
        "body": "Yes. Reply with the new address and we will update it."
      },
      "status": "delivered",
      "created_at": "2026-09-23T10:37:12Z",
      "sent_at": "2026-09-23T10:37:13Z",
      "delivered_at": "2026-09-23T10:37:14Z"
    },
    {
      "id": "wam_01krdgeqcxet5s7t44vh8rt9mg",
      "direction": "inbound",
      "from": {
        "phone_number": "+15550001111",
        "bsuid": "US.13491208655302741918",
        "display_name": "Jamie Rivera"
      },
      "to": {
        "phone_number": "+15550001234"
      },
      "text": {
        "body": "Can I change the delivery address on my order?"
      },
      "status": "received",
      "created_at": "2026-09-23T10:35:00Z"
    }
  ],
  "next_cursor": null,
  "prev_cursor": null,
  "refresh_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTA1LTI1VDE0OjAzOjEwWlwiIiwiaSI6IjAxOTJmM2IxLTRjN2UtN2EyYi05ZDYxLThmM2E1YzJlN2I0MCJ9"
}

Returns the messages in one conversation, newest first, as a cursor-paginated list. They are the same messages the WhatsApp message list returns, already narrowed to this conversation's number and contact, so each one carries the content object it was built from and its current delivery status.

Filter by direction to read only what the contact sent or only what was sent to them. Pass the response's next_cursor back as starting_after for the next page.

Messages are retained for 30 days. When a conversation's last message expires, the conversation and its events are deleted too, and the conversation returns 404. The contact's next message starts a new conversation with a new ID. There is no way to read messages older than the window.

पैरामीटर

conversation_idstring

Conversation identifier. Starts with wacv_.

Query पैरामीटर

directionstring

Return only messages the contact sent (inbound) or only messages sent to them (outbound). Omit for both.

Possible values: outbound, inbound

limitinteger

Maximum number of items to return per page.

starting_afterstring

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

ending_beforestring

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.

Response Payload

data
array of object
आवश्यक

Page of WhatsApp messages, newest first.

चाइल्ड एट्रिब्यूट दिखाएँ
data.id
string
आवश्यक

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

data.direction
string
आवश्यक

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

Possible values: outbound, inbound

data.from
object
आवश्यक

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

चाइल्ड एट्रिब्यूट दिखाएँ
data.to
object
आवश्यक

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

चाइल्ड एट्रिब्यूट दिखाएँ
data.template
object

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

चाइल्ड एट्रिब्यूट दिखाएँ
data.sticker
object

Sticker the message carried.

चाइल्ड एट्रिब्यूट दिखाएँ
data.document
object

Document the message carried.

चाइल्ड एट्रिब्यूट दिखाएँ
data.location
object

Location the message carried.

चाइल्ड एट्रिब्यूट दिखाएँ
data.contact_cards
array of object

Contact cards on this message: cards the contact shared, either by tapping a button that asked for their number or by sending one from their address book, or the cards this workspace sent.

चाइल्ड एट्रिब्यूट दिखाएँ
data.contact_cards.origin
string

Why the card arrived. contact_request means the contact tapped a button this workspace sent asking for their number, which is the only signal that the message answers that ask; other means they shared a card in the chat. Open enum: treat an unrecognized value as a way of sharing added since. Set on a card the contact shared; absent on one this workspace sent.

Possible values (may grow over time): contact_request, other

data.contact_cards.vcard
string

The contact's card in vCard format. WhatsApp sends it on a card shared in the chat and omits it on a button tap, which carries the number alone. Set on a card the contact shared; absent on one this workspace sent.

data.contact_cards.name
object

The contact's name, when the card carries one.

चाइल्ड एट्रिब्यूट दिखाएँ
data.contact_cards.org
object

Where the contact works, when the card carries it.

चाइल्ड एट्रिब्यूट दिखाएँ
data.contact_cards.birthday
string

The contact's birthday, which WhatsApp sends as YYYY-MM-DD. Passed through as text rather than typed as a date: the value comes off the contact's own device unvalidated, and a card we could not parse would otherwise have to lose the field or fail the whole read.

data.contact_cards.phone_numbers
array of object

The numbers on the card. A button tap carries the contact's own number here, which is the point of asking.

चाइल्ड एट्रिब्यूट दिखाएँ
data.contact_cards.addresses
array of object
चाइल्ड एट्रिब्यूट दिखाएँ
data.contact_cards.addresses.street
string
data.contact_cards.addresses.city
string
data.contact_cards.addresses.state
string
data.contact_cards.addresses.zip
string
data.contact_cards.addresses.country
string
data.contact_cards.addresses.country_code
string

The country as the card holds it, left exactly as WhatsApp sent it: it describes a postal address rather than a routing destination.

data.contact_cards.addresses.type
string

The label attached to this value, for example CELL, Home or iPhone. Free text: WhatsApp defines no vocabulary. A label on a received card is lowercased; one this workspace sent reads back exactly as sent.

data.interactive
object

Interactive content the message carried. Outbound only: a contact cannot send one. A tap on a reply button or a list row reads back as interactive_reply on the contact's inbound message; a cta_url link sends nothing back, and the two request kinds are answered by an inbound location or contact_cards message.

चाइल्ड एट्रिब्यूट दिखाएँ
data.in_reply_to_message_id
string

The message this one answers. On an inbound message it is what WhatsApp reports as the reply's target: a tap on a button or a list row, and equally a text or media message the contact sent as a quoted reply. An outbound message echoes the in_reply_to_message_id it was sent with. Absent when the message answers nothing, and absent on an inbound message whose target we cannot match to a message we hold, which is the case for one sent before this workspace started recording them or one already past the 15-day window we keep provider ids for.

data.interactive_reply
object

What the contact tapped, on a message answering an interactive message or a template's quick-reply button. Inbound only.

चाइल्ड एट्रिब्यूट दिखाएँ
data.unsupported
object

Set when a message that did not come from a Bird send carries content we do not model, naming the WhatsApp content type so the message is not silently empty. Never on a message sent through Bird.

चाइल्ड एट्रिब्यूट दिखाएँ
data.reactions
array of object

Emoji reactions standing on this message right now, one per sender. Absent when the message has none. A reaction that was replaced by a different emoji, or taken back, is not listed; the message's reaction log keeps that history. WhatsApp accepts a reaction on a message up to 30 days old, and we keep provider ids for 15, so a reaction placed on a message older than that cannot be matched to it and does not appear here.

चाइल्ड एट्रिब्यूट दिखाएँ
data.status
string
आवश्यक

Delivery status:

  • accepted: Accepted and queued for sending.
  • sent: Handed to the WhatsApp network.
  • delivered: Confirmed as delivered to the recipient's device.
  • failed: Permanently failed.
  • rejected: Refused before sending and not charged.
  • received: Received as an inbound message.
  • scheduled: Reserved and not returned.
  • canceled: Reserved and not returned.

Read receipts appear in read_at and whatsapp.read events, in both directions: the recipient opening an outbound message, and the business acknowledging an inbound one.

Possible values: scheduled, accepted, sent, delivered, failed, rejected, canceled, received

data.origin
string

Where the message came from when it did not come through Bird live. Absent when your workspace sent the message through Bird, or the contact sent it to Bird.

Possible values (may grow over time): business_agent_echo, business_app_echo, history_sync

data.recipient_count
integer

How many recipients a group send was addressed to, taken when the send was accepted. It is the group's membership at that moment, not its membership now: someone joining through the invite link while the message is in flight does not receive it and does not change this count.

Absent on a one-to-one message, along with delivered_count and read_count. A message with one recipient has no fan-out to report, and its delivery is what status, delivered_at and read_at already say. Absent for the same reason on a group message sent before Bird recorded the count, and on a send to a group nobody had joined yet: there is no denominator to report, and none can be recovered after the fact, since membership has moved on. to.group_id is what tells a group message from a one-to-one one in every case, including those two. With no denominator to resolve against, status is read as stored, the way a one-to-one message's is: it reaches sent when the message is handed to WhatsApp and stops there, because delivery is confirmed per participant and a send with no participants collects no confirmations.

It is also the denominator status is resolved against: on a group message status reports the furthest point every recipient has reached, so it turns delivered only once delivered_count equals this number, and stays sent while some have confirmed and others have not. failed and rejected are never per recipient: there is one hand-off to the WhatsApp network and one way for that to be refused. delivered_at and read_at are the first recipient's, not the last.

data.delivered_count
integer

How many of the recipient_count recipients WhatsApp has confirmed the message reached. A recipient who reported only a read counts here too: WhatsApp skips the delivery receipt when someone is already looking at the chat, so waiting for one would leave that person uncounted for ever.

Absent on a one-to-one message, which has no fan-out to count, and on a group message with no recipient_count to count against.

data.read_count
integer

How many of the recipient_count recipients have opened the message. Read receipts do not move status, which has no read value; they surface here and in read_at.

Absent on a one-to-one message, which has no fan-out to count, and on a group message with no recipient_count to count against.

data.last_error
nullable object

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

चाइल्ड एट्रिब्यूट दिखाएँ
data.created_at
string
आवश्यक

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. On an outbound message this is the recipient opening it. On an inbound one it is when Bird acknowledged the message to WhatsApp for the business, which a read receipt sets. Null until then.

data.cost
nullable object

What the message cost, split into Bird's charge and any third-party fees passed through. Null on an inbound message, which is never priced, on an outbound message that has not been priced yet, and on one rejected before pricing. The rate depends on the message category and the recipient's country.

चाइल्ड एट्रिब्यूट दिखाएँ
data.tags
array of object

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

चाइल्ड एट्रिब्यूट दिखाएँ
data.metadata
object

Arbitrary JSON metadata stored on the message.

next_cursor
nullable string
आवश्यक

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

prev_cursor
nullable string
आवश्यक

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

refresh_cursor
nullable string
आवश्यक

Refresh anchor, the first row of this response. Pass back as ending_before to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-null whenever data is non-empty; null only on an empty page. Distinct from prev_cursor.

इस विषय के लिए दस्तावेज़, गाइड और उदाहरणों के साथ आगे बढ़ें।