---
canonical_url: "https://docs.composio.dev/toolkits/push_alert"
markdown_url: "https://docs.composio.dev/toolkits/push_alert.md"
product: "platform"
version: null
last_updated: null
---

# PushAlert

Send and manage Web Push notifications, subscriber segments, attributes, and automation for a PushAlert website project.

- **Category:** notifications
- **Auth:** API_KEY
- **Composio-managed OAuth available?** N/A
- **Tools:** 9
- **Triggers:** 0
- **Slug:** `PUSH_ALERT`
- **Version:** 00000000_00

## Tools

### Add Subscribers to Segment

**Slug:** `PUSH_ALERT_ADD_SUBSCRIBERS_TO_SEGMENT`

Add one or more Web Push subscribers to an existing segment.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `segment_id` | integer | Yes | Target segment ID. |
| `subscriber_ids` | array | Yes | One or more PushAlert subscriber IDs to add. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Segment

**Slug:** `PUSH_ALERT_CREATE_SEGMENT`

Create a Web Push subscriber segment with a letters-and-digits name.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | Segment name containing only ASCII letters and digits, at most 32 characters. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Segment

**Slug:** `PUSH_ALERT_DELETE_SEGMENT`

Permanently delete a Web Push subscriber segment by ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `segment_id` | integer | Yes | ID of the segment to delete. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Notification Stats

**Slug:** `PUSH_ALERT_GET_NOTIFICATION_STATS`

Get attempted, delivered, clicked, and click-through-rate statistics for a Web Push notification.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `notification_id` | integer | Yes | Notification ID returned by a Web Push send operation. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Subscriber Attributes

**Slug:** `PUSH_ALERT_GET_SUBSCRIBER_ATTRIBUTES`

Get custom attributes for a Web Push subscriber.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `subscriber_id` | string | Yes | PushAlert subscriber ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Segments

**Slug:** `PUSH_ALERT_LIST_SEGMENTS`

List all Web Push subscriber segments and their subscriber counts.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Remove Subscribers from Segment

**Slug:** `PUSH_ALERT_REMOVE_SUBSCRIBERS_FROM_SEGMENT`

Remove one or more Web Push subscribers from an existing segment.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `segment_id` | integer | Yes | Target segment ID. |
| `subscriber_ids` | array | Yes | One or more PushAlert subscriber IDs to remove. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Send Web Push Notification

**Slug:** `PUSH_ALERT_SEND_WEB_PUSH_NOTIFICATION`

Send an irreversible Web Push notification to a saved segment, explicit subscriber IDs, or attribute-matched subscribers. If no targeting field is supplied, sends to every subscriber. Excludes paid rich-media, audience-creator, and scheduling options.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `url` | string | Yes | Destination URL opened when the notification is clicked. |
| `icon` | string | No | Optional HTTPS icon URL. |
| `title` | string | Yes | Notification title, at most 64 characters. |
| `message` | string | Yes | Notification message, at most 192 characters. |
| `attributes` | object | No | Exactly one subscriber attribute condition used for targeting. |
| `segment_id` | integer | No | Saved segment to notify. When set, subscriber and attribute targeting must be omitted. Omit all targeting fields to notify every subscriber. |
| `subscriber` | string | No | One PushAlert subscriber ID to notify; mutually exclusive with subscribers. Omit all targeting fields to notify every subscriber. |
| `expire_time` | integer | No | Notification expiry in seconds for non-segment sends; defaults to 86400. Omit when segment_id is set. |
| `subscribers` | array | No | Subscriber IDs to notify; mutually exclusive with subscriber. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Set Subscriber Attributes

**Slug:** `PUSH_ALERT_SET_SUBSCRIBER_ATTRIBUTES`

Add or update custom attributes for a Web Push subscriber.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `attributes` | object | Yes | Attribute key-value pairs; keys are at most 32 characters and values are at most 128 characters. |
| `subscriber_id` | string | Yes | PushAlert subscriber ID. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
