# OneSignal User Auth

OneSignal is a customer engagement platform offering push notifications, email, SMS, and in-app messaging services.

- **Category:** notifications
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 12
- **Triggers:** 0
- **Slug:** `ONESIGNAL_USER_AUTH`
- **Version:** 20260312_00

## Tools

### Create or Update OneSignal User

**Slug:** `ONESIGNAL_USER_AUTH_CREATE_USER`

Tool to create a new user or modify the subscriptions associated with an existing user. Use when you need to register a user with OneSignal or update their subscriptions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `app_id` | string | Yes | Your OneSignal App ID in UUID v4 format. |
| `identity` | object | Yes | Defines identifiers for the user. The external_id must be used and should be unique across users. |
| `properties` | object | No | User profile data including tags, preferences, and other properties. |
| `subscriptions` | array | No | The subscriptions object allows for creating or transferring subscriptions to a specified user. |

#### 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 User Alias

**Slug:** `ONESIGNAL_USER_AUTH_DELETE_ALIAS`

Tool to remove an alias from a OneSignal user. Use when you need to delete a specific alias identifier from a user while preserving other aliases. The user is identified by one alias (alias_label/alias_id) and a different alias (alias_label_to_delete) is removed.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `app_id` | string | Yes | Your OneSignal App ID in UUID v4 format. See Keys & IDs documentation. |
| `alias_id` | string | Yes | The specific identifier for the given alias to identify the user. |
| `alias_label` | string | No | The alias name or key to locate the user. Most commonly set as 'external_id' but can be the 'onesignal_id' or a custom alias. |
| `alias_label_to_delete` | string | Yes | The name of the alias to remove from the user. |

#### 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 |

### Edit OneSignal Device

**Slug:** `ONESIGNAL_USER_AUTH_EDIT_DEVICE`

Tool to update an existing OneSignal device (player) record. Use when you have the player_id and need to modify device attributes.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `lat` | number | No | Device latitude. |
| `sdk` | string | No | Version of the OneSignal SDK. |
| `long` | number | No | Device longitude. |
| `tags` | object | No | Custom tags to set on the device. |
| `ad_id` | string | No | Advertising identifier (IDFA or AAID). |
| `app_id` | string | No | OneSignal App ID the device belongs to. |
| `country` | string | No | Country code (e.g., 'US'). |
| `language` | string | No | Locale code of the device (ISO 639-1). |
| `playtime` | integer | No | Seconds the player has been online. |
| `timezone` | integer | No | Offset in seconds from UTC (negative if behind). |
| `device_os` | string | No | Operating system version of the device. |
| `player_id` | string | Yes | Unique device (player) ID to update. |
| `created_at` | integer | No | Unix timestamp when the device was created. |
| `identifier` | string | No | Push token (e.g., FCM or APNS token) or email. |
| `badge_count` | integer | No | Current iOS badge count displayed on the app icon. |
| `last_active` | integer | No | Last active time as a Unix timestamp. |
| `amount_spent` | number | No | Total amount spent by the user. |
| `device_model` | string | No | Hardware model of the device. |
| `game_version` | string | No | App version of the device. |
| `session_count` | integer | No | Number of times the app has been opened. |
| `notification_types` | integer | No | 1 = subscribed, -2 = unsubscribed (iOS only). |

#### 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 |

### View OneSignal Segment

**Slug:** `ONESIGNAL_USER_AUTH_ONESIGNAL_VIEW_SEGMENT`

Tool to retrieve the subscriber count for a specific OneSignal segment. Use when you need to know how many subscribers are in a segment.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `app_id` | string | Yes | The OneSignal App ID to retrieve segment for. |
| `segment_id` | string | Yes | The OneSignal Segment ID to retrieve details for. |

#### 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 |

### Update Subscription By Token

**Slug:** `ONESIGNAL_USER_AUTH_UPDATE_SUBSCRIPTION_BY_TOKEN`

Tool to update properties on an existing subscription using its token. Use when you need to enable or disable subscription status when managing outside of the OneSignal SDK.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `token` | string | Yes | The push token, email address, or phone number associated with the subscription. Format must match the token_type (e.g., valid email for Email type, E.164 format for SMS, 64-char hex for iOS). |
| `app_id` | string | Yes | Your OneSignal App ID in UUID v4 format. |
| `token_type` | string ("Email" | "SMS" | "iOSPush" | "AndroidPush" | "HuaweiPush" | "FireOSPush" | "WindowsPush" | "macOSPush" | "ChromeExtensionPush" | "ChromePush" | "FirefoxPush" | "SafariPush") | Yes | The subscription channel type. Must match the format of the token. |
| `subscription` | object | Yes | The subscription properties to update. |

#### 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 |

### View App

**Slug:** `ONESIGNAL_USER_AUTH_VIEW_APP`

Tool to retrieve details for a specific OneSignal app. Use after authenticating to inspect app settings.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `app_id` | string | Yes | The OneSignal App ID to retrieve details for. |

#### 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 |

### View Broadcasts

**Slug:** `ONESIGNAL_USER_AUTH_VIEW_BROADCASTS`

Tool to view inbox broadcasts for a OneSignal app. Returns broadcasts in descending order of creation. Use when retrieving in-app messages or inbox content for an app.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | The number of broadcasts to retrieve. Defaults to OneSignal default if omitted. |
| `app_id` | string | Yes | Your OneSignal App ID in UUID v4 format. See [Keys & IDs](/docs/keys-and-ids). |
| `last_broadcast_id` | string | No | The exclusive lower bound of broadcasts to retrieve. Pass in successive requests to page through results. |

#### 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 |

### View OneSignal Device

**Slug:** `ONESIGNAL_USER_AUTH_VIEW_DEVICE`

Tool to retrieve details for a specific device/player. Use when you have a player_id and optional app_id.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `app_id` | string | No | OneSignal App ID to scope the lookup. If omitted, uses the default app from authentication. |
| `player_id` | string | Yes | The OneSignal Player (device) ID to retrieve details for. |

#### 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 |

### View Outcomes

**Slug:** `ONESIGNAL_USER_AUTH_VIEW_OUTCOMES`

Tool to view all outcomes associated with a OneSignal app. Use to retrieve outcome metrics filtered by time range, platforms, and attribution type.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `app_id` | string | Yes | OneSignal App ID in UUID v4 format to retrieve outcomes for. |
| `outcome_names` | array | No | List of outcome names with aggregation type to fetch. Format: 'outcome_name.aggregation_type' (e.g., 'my_outcome.count' or 'my_outcome.sum'). For clicks use 'os__click.count', for confirmed deliveries use 'os__confirmed_delivery.count', for session duration use 'os__session_duration.count'. |
| `outcome_platforms` | string | No | Comma-separated list of platform device_type integers to include. Defaults to '0,1,2,5,8,11,14,17' if not specified. |
| `outcome_time_range` | string ("1h" | "1d" | "1mo") | No | Time range for outcome data. |
| `outcome_attribution` | string ("direct" | "influenced" | "unattributed" | "total") | No | Attribution type for outcomes. |

#### 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 |

### View Segments

**Slug:** `ONESIGNAL_USER_AUTH_VIEW_SEGMENTS`

Tool to list all segments for an app. Use after obtaining the app_id to retrieve a paginated list of segments.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Number of segments to return (1 to 300). Defaults to OneSignal default if omitted. |
| `app_id` | string | Yes | OneSignal App ID to list segments for |
| `offset` | integer | No | Offset for pagination (number of items to skip). |

#### 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 |

### View OneSignal User

**Slug:** `ONESIGNAL_USER_AUTH_VIEW_USER`

Tool to retrieve user details by alias label and ID. Use when you need to fetch user data including tags, subscriptions, and identity information.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `app_id` | string | Yes | Your OneSignal App ID in UUID v4 format. See [Keys & IDs](/docs/keys-and-ids). |
| `alias_id` | string | Yes | The specific identifier for the given alias to identify the user. |
| `alias_label` | string | Yes | The alias name or key to locate the user. Most commonly set as `external_id` but can be the `onesignal_id` or a custom alias. See [Aliases](/docs/aliases). |

#### 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 |

### View User Unread Message Count

**Slug:** `ONESIGNAL_USER_AUTH_VIEW_USER_UNREAD_MESSAGE_COUNT`

Tool to retrieve the unread message count for a specific user. Use when you need to check how many unread inbox messages a user has.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `app_id` | string | Yes | Your OneSignal App ID in UUID v4 format. See [Keys & IDs](/docs/keys-and-ids). |
| `alias_id` | string | Yes | The identifier or value set for the desired alias label. |
| `alias_label` | string | Yes | The alias name or key to locate the user. Most commonly set as `external_id` but can be the `onesignal_id` or a custom alias. |

#### 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 |
