> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Web Push Notification

Send a W3C Web Push notification to a subscribed browser via VAPID. Each subscription represents a single device; create one per browser/profile that should receive the push. When the push service reports the subscription as gone (HTTP 404/410), the result returns `expired: true` so the workflow can clean it up. Ideal for: in-app browser alerts, deal closures, monitoring pages.

![Send Web Push Notification logo](https://ai-icon.b3.fun/logo/webpush)
Catalog action Messaging webpush

Send a W3C Web Push notification to a subscribed browser via VAPID. Each subscription represents a single device; create one per browser/profile that should receive the push. When the push service reports the subscription as gone (HTTP 404/410), the result returns `expired: true` so the workflow can clean it up. Ideal for: in-app browser alerts, deal closures, monitoring pages.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `send-web-push` |
| Category | Messaging |
| Connector | `webpush` |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `messaging`, `web-push`, `browser`, `notification`, `push`, `write` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `subscriptionId` | `string` | Yes | Web Push subscription ID \(per-device\) to deliver to. |
| `title` | `string` | Yes | Notification title shown to the user. |
| `body` | `string` | Yes | Notification body shown beneath the title. |
| `url` | `string` | No | Optional URL the service worker opens when the notification is clicked. |
| `icon` | `string` | No | Optional absolute URL of an icon image \(PNG/SVG, ~192px\) displayed with the notification. |
| `tag` | `string` | No | Tag used by the service worker to coalesce duplicate notifications. |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `statusCode` | `number` | Yes | HTTP status code returned by the push service \(typically 201 on success\). |
| `expired` | `boolean` | No | True when the push service reported the subscription as gone \(HTTP 404/410\); caller should delete it. |

## Examples

**Workflow node**

```json
{
  "type": "send-web-push",
  "payload": {
    "subscriptionId": "example-subscriptionId",
    "title": "example-title",
    "body": "example-body"
  },
  "children": [],
  "connector": {
    "type": "webpush",
    "id": "conn_webpush"
  }
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/send-web-push/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "subscriptionId": "example-subscriptionId",
    "title": "example-title",
    "body": "example-body"
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.