# Send an agent a notification

`POST /v1/whatsapp/numbers/{number_id}/agent/notifications`

Tells the agent that something happened in your systems for one contact, such as a payment landing, an order shipping or an identity check passing. The agent decides whether and how to tell the contact, drawing on `description` and `payload`, and may write to them without waiting for their next message.

Bird takes the notification, hands it to WhatsApp in the background and keeps asking WhatsApp what became of it, so this answers `202` with the notification as you sent it at `status: accepted`. A read in the first moments after the `202` can answer `404` while the hand-off is still in flight. Read it back, or list the notifications, to see it settle: `success` when the agent acted on it, `skipped` with WhatsApp's reason when the agent chose to say nothing, or `failed` with what went wrong. The notification records whether the agent acted on it, not what the agent said to the contact. A number without an agent returns `404`, and one whose agent WhatsApp is still preparing returns `409`.

## Code samples

**TypeScript**

```ts
// The agent decides whether and how to tell the contact. The answer reads
// accepted; read it back to see whether the agent acted on it.
const notification = await bird.whatsapp.agents.notifications.create("wan_01krdgeqcxet5s7t44vh8rt9mg", {
  to: "+14155551234",
  name: "order_shipped",
  description: "Order 88213 left the warehouse and arrives on Thursday.",
  payload: JSON.stringify({ order_id: "88213", carrier: "ACME Courier" }),
});
console.log(notification.id, notification.status);
```

Examples: [TypeScript](/docs/api/reference/create-whatsapp-agent-notification.ts.md) · [Python](/docs/api/reference/create-whatsapp-agent-notification.py.md) · [Go](/docs/api/reference/create-whatsapp-agent-notification.go.md) · [PHP](/docs/api/reference/create-whatsapp-agent-notification.php.md) · [CLI](/docs/api/reference/create-whatsapp-agent-notification.cli.md) · [MCP](/docs/api/reference/create-whatsapp-agent-notification.mcp.md) · [cURL](/docs/api/reference/create-whatsapp-agent-notification.curl.md)

## Example response `202`

```json
{
  "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": "accepted",
  "created_at": "2026-10-01T08:00:00Z"
}
```

## Path parameters

- `number_id` (string): ID of the WhatsApp number (`wan_` prefix), as returned by the number list.

## Request body

- `to` (string, required): The contact the notification is about: a phone number in E.164 format (for example `+14155551234`), or the contact's business-scoped user ID (for example `US.13491208655302741918`), the same forms a message's `to` accepts. A phone number is normalized before the call reaches WhatsApp, so spacing does not matter. WhatsApp documents a phone number for this call; a business-scoped user ID is passed through as given.
- `name` (string, required): Your own name for what happened, such as `payment_received` or `order_shipped`. The agent reads it as the kind of thing that happened, so keep one name per kind. WhatsApp calls this the event type.
- `description` (string, required): What happened, in a sentence the agent can tell the contact.
- `payload` (string, required): Details the agent may draw on when it writes to the contact, as one JSON string. WhatsApp passes it to the agent unchanged and does not read it itself.

## Response body

- `id` (string, required): Unique identifier for the notification.
- `to` (object, required): 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.
- `to.phone_number` (string): Phone number in E.164 format, when known.
- `to.bsuid` (string): Business-scoped user ID, Meta's identifier for the WhatsApp user. Present only on the WhatsApp-user side of the message.
- `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.
- `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.
- `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.
- `name` (string, required): Your own name for what happened, as you sent it.
- `description` (string, required): What happened, as you sent it.
- `payload` (string, required): The data you attached, as you sent it.
- `status` (string, required): Where the notification stands. `accepted` from the moment Bird takes it, then one of the three final states once WhatsApp has answered.
- `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.
- `error` (object): Why the notification failed. Present only when `status` is `failed`.
- `error.description` (string, required): 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.
- `error.meta_error_code` (nullable string, required): 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.
- `created_at` (string, required): When Bird accepted the notification.

## Related resources

- [Should I use a Bird SDK or call the API directly?](/explained/platform/should-i-use-an-sdk-or-call-the-api-directly) (answer)
- [Build your first integration](/learn/paths/integration) (course)
- [Send your first email](/docs/get-started/send-your-first-email) (docs)

[Get an implementation brief](/learn/workspace?topic=api-basics)
