Sign inGet Started

List the notifications sent to an agent

GET
/v1/whatsapp/numbers/{number_id}/agent/notifications
const notifications = await bird.whatsapp.agents.notifications.list("wan_01krdgeqcxet5s7t44vh8rt9mg", {
  status: "skipped",
});
for (const notification of notifications.data ?? []) {
  console.log(notification.name, notification.skipped_reason);
}
响应200
{
  "data": [
    {
      "id": "waan_01krdgeqcxet5s7t44vh8rt9m7",
      "to": {
        "phone_number": "+14155551234"
      },
      "name": "order_shipped",
      "description": "Order 88213 left the warehouse and arrives on Thursday.",
      "payload": "{\"order_id\":\"88213\",\"carrier\":\"ACME Courier\",\"eta\":\"2026-10-02\"}",
      "status": "skipped",
      "skipped_reason": "The contact's conversation is currently held by the business.",
      "created_at": "2026-10-01T08:00:00Z"
    },
    {
      "id": "waan_01krdgeqcxet5s7t44vh8rt9m6",
      "to": {
        "phone_number": "+14155559876"
      },
      "name": "payment_received",
      "description": "Payment of $42.00 for order 88190 was received.",
      "payload": "{\"order_id\":\"88190\",\"amount\":\"42.00\",\"currency\":\"USD\"}",
      "status": "success",
      "created_at": "2026-10-01T07:30:00Z"
    }
  ],
  "next_cursor": null,
  "prev_cursor": null,
  "refresh_cursor": "eyJ2IjoxLCJzIjoiXCIyMDI2LTEwLTAxVDA4OjAwOjAwWlwiIiwiaSI6IndhYW5fMDFrcmRnZXFjeGV0NXM3dDQ0dmg4cnQ5bTcifQ"
}

Returns the notifications you have sent the agent, newest first, each with what came of it. Filter by status to find the ones the agent skipped or WhatsApp refused, or by to to follow one contact. A notification still in flight to WhatsApp is not listed yet.

A number without an agent returns 404. Page through the full set with the response cursors.

参数

number_idstring

ID of the WhatsApp number (wan_ prefix), as returned by the number list.

查询参数

statusstring

Return only notifications in this state.

Possible values: accepted, success, skipped, failed

tostring

Return only notifications about this contact, a phone number in E.164 format or a business-scoped user ID. A phone number is normalized before matching, so spacing does not matter.

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.

响应载荷

data
array of object
必填

A page of the notifications sent to the agent.

显示子属性
data.id
string
必填

Unique identifier for the notification.

data.to
object
必填

The contact the notification was about: the phone number or business-scoped user ID you addressed it to, in the same shape a message's to uses.

显示子属性
data.to.phone_number
string

Phone number in E.164 format, when known.

data.to.bsuid
string

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

data.to.group_id
string

The group this address was addressed as, or reached through. It appears on a message's to and nowhere else: never on from, and never on an event's recipient. Outbound, it stands in for the recipient, because a group send names no single phone number. Inbound, it qualifies one: to carries the business phone_number that received the message and the group it arrived through, while from stays the participant who wrote it. Its presence on to is what tells a group message from a one-to-one one, in either direction.

data.to.username
string

Present only on a message received from a WhatsApp user, on from; never on an outbound send's to, where the profile is not known. Absent when the contact has not adopted one, and on a message received before this workspace started recording them. Same form as a number's own username (WhatsAppNumberProfile.username), without a leading @; a message cannot be addressed by it.

data.to.display_name
string

Present only on a message received from a WhatsApp user, on from; never on an outbound send's to, where the profile is not known. Absent when the message carries no profile, and on a message received before this workspace started recording them.

data.name
string
必填

Your own name for what happened, as you sent it.

data.description
string
必填

What happened, as you sent it.

data.payload
string
必填

The data you attached, as you sent it.

data.status
string
必填

Where the notification stands. accepted from the moment Bird takes it, then one of the three final states once WhatsApp has answered.

data.skipped_reason
string

WhatsApp's own account of why the agent chose to say nothing, passed through. Present only when status is skipped. Show it to the person who sent the notification; never match on its text.

data.error
object

Why the notification failed. Present only when status is failed.

显示子属性
data.error.description
string
必填

WhatsApp's own explanation, passed through: what it said when it refused the notification, or its failure summary once it had worked on it. Show it to the person who sent the notification; never match on its text. Carries Bird's own words instead when the failure was Bird's verdict, such as no outcome arriving within a day.

data.error.meta_error_code
nullable string
必填

WhatsApp's most specific code when it refused the notification outright: its error subcode where it sent one, otherwise its top-level code. Treat it as an opaque string. Null when WhatsApp took the notification and reported the failure later, which carries no code, and when the failure was Bird's own verdict.

data.created_at
string
必填

When Bird accepted the notification.

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.