OneSignal
OneSignal is a multi-channel messaging platform for push notifications, in-app messages, email, and SMS, popular for high-volume consumer apps and web.
Why route OneSignal through Datafly Signal
- Profiles are updated from the server, not the browser. Events reach OneSignal even when a tracker blocker or a failed page unload would have dropped a client-side call, so the profile reflects what actually happened.
- One consent decision governs every destination. OneSignal is gated by the same consent state as the rest of your stack, so a withdrawal applies everywhere at once.
Prerequisites
Complete these steps in OneSignal before configuring Signal.
Access your OneSignal dashboard
Log in to onesignal.com/login.
Find your App ID
Navigate to Settings > Keys & IDs for your app. Copy the OneSignal App ID (UUID format).
Create a REST API Key
On the same Keys & IDs page, copy the REST API Key. Treat this as a secret — it grants full server-side access to your app.
The REST API Key is distinct from the (public) App ID. Never expose the REST API Key in browser code.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
app_id | string | Yes | Your OneSignal App ID (UUID). |
rest_api_key | secret | Yes | OneSignal REST API Key. Found in Settings > Keys & IDs. |
Signal Setup
Quick Setup
- Navigate to Integrations in the sidebar.
- Open the Integration Library tab.
- Find OneSignal under the Marketing Automation category.
- Click Install, and fill in the required fields.
- Click Install Integration.
API Setup
curl -X POST http://localhost:8084/v1/admin/integration-catalog/onesignal/install \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "OneSignal",
"variant": "default",
"config": {
"app_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"rest_api_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"delivery_mode": "server_side"
}'API endpoint
POST https://api.onesignal.com/apps/{{app_id}}/custom_eventsAllow egress to api.onesignal.com from the network your delivery workers run on.
Event Mapping
Blueprint 0.4.1, reviewed against the vendor’s documentation on 2026-09-23. Each preset maps the events below; every other event is dropped. Events use the canonical names from the event specs (transaction_id, value, items[], search_term); the legacy order_id, revenue and flat product fields are still read as a fallback.
Retail (ecommerce)
Product viewed, added to cart, checkout started and purchase, plus sign-up and login, as OneSignal custom events for cart and browse abandonment Journeys. Each event goes to the Custom Events API (POST /apps/{app_id}/custom_events) against the user’s External ID (the Signal user_id, required: OneSignal cannot place an event without it), with the event time and the Signal message ID as idempotency_key (as a bare UUID, without the df- prefix the Signal SDKs add). No email or phone is sent. Custom events enter users into Journeys and Wait Until steps.
| Datafly event | Vendor event / call | Fields |
|---|---|---|
sign_up | user_registered | method |
login | user_logged_in | method |
view_item | product_viewed | product_id, product_name, value, currency |
add_to_cart | added_to_cart | product_id, product_name, value, currency |
begin_checkout | checkout_started | value, currency |
purchase | purchase | order_id, value, currency |
Default (default)
Sign-up, login and purchase as OneSignal custom events. Each event goes to the Custom Events API (POST /apps/{app_id}/custom_events) against the user’s External ID (the Signal user_id, required: OneSignal cannot place an event without it), with the event time and the Signal message ID as idempotency_key (as a bare UUID, without the df- prefix the Signal SDKs add). No email or phone is sent. Custom events enter users into Journeys and Wait Until steps.
| Datafly event | Vendor event / call | Fields |
|---|---|---|
sign_up | user_registered | method |
login | user_logged_in | method |
purchase | purchase | order_id, value, currency |
B2B / SaaS (saas)
Sign-up, login, trial and subscription lifecycle as OneSignal custom events. Each event goes to the Custom Events API (POST /apps/{app_id}/custom_events) against the user’s External ID (the Signal user_id, required: OneSignal cannot place an event without it), with the event time and the Signal message ID as idempotency_key (as a bare UUID, without the df- prefix the Signal SDKs add). No email or phone is sent. Custom events enter users into Journeys and Wait Until steps.
| Datafly event | Vendor event / call | Fields |
|---|---|---|
sign_up | user_registered | method |
login | user_logged_in | method |
trial_started | trial_started | plan |
subscription_started | subscription_started | plan, value, currency |
subscription_cancelled | subscription_cancelled | plan |
Media / Publishing (media)
Content viewed, sign-up, login and subscription as OneSignal custom events for engagement Journeys. Each event goes to the Custom Events API (POST /apps/{app_id}/custom_events) against the user’s External ID (the Signal user_id, required: OneSignal cannot place an event without it), with the event time and the Signal message ID as idempotency_key (as a bare UUID, without the df- prefix the Signal SDKs add). No email or phone is sent. Custom events enter users into Journeys and Wait Until steps.
| Datafly event | Vendor event / call | Fields |
|---|---|---|
sign_up | user_registered | method |
login | user_logged_in | method |
content_viewed | content_viewed | content_id, content_type, content_category |
subscription_started | subscription_started | plan, value, currency |
An identified purchase (preset ecommerce) is delivered as:
POST https://api.onesignal.com/apps/8250eaf6-1a58-489e-b136-7c74a864b434/custom_events{
"events": [
{
"external_id": "crm-user-7",
"idempotency_key": "3f2b8c1e-9d4a-4e7b-8f6a-2c1d0e9b7a65",
"name": "purchase",
"properties": {
"currency": "GBP",
"order_id": "T-1001",
"value": 439.99
},
"timestamp": "2025-09-23T04:00:00Z"
}
]
}Identity
Server-side custom events for OneSignal (POST /apps/{app_id}/custom_events) against the user’s External ID (the Signal user_id), for Journey entry rules, Wait Until steps and personalisation. No email or phone is sent; events without a user_id are not sent.
| Field | Source | Notes |
|---|---|---|
events[].external_id | user_id | Required: OneSignal places the event on the user with this External ID. |
email / phone | not sent | Custom events need only the External ID. |
Consent
OneSignal events should be sent under the marketing consent category. OneSignal manages its own per-subscription opt-in records; custom events carry no consent field, so gate the integration on the marketing category in Signal.
Verify it’s working
- Trigger a test event from your website.
- In OneSignal, navigate to Audience > Users and look up the test user by external ID or email.
- View the user’s Activity and Tags to confirm Signal-delivered updates.
- In Signal, check Live Events to confirm delivery with a
200response status.
Troubleshooting
| Symptom | Possible Cause | Resolution |
|---|---|---|
401 Unauthorized | Invalid REST API key | Regenerate or verify the key in Settings > Keys & IDs. |
| User not found | external_id mismatch | OneSignal creates a new alias on first sight; check the external_id matches between identify and subsequent calls. |
| Tags not updating | Tag name conflict | OneSignal tags are case-sensitive. Confirm the tag name matches existing segment rules. |
| Outcomes not appearing in reports | Outcome name not registered | Create the outcome in Settings > Outcomes before sending events. |
Visit OneSignal REST API documentation for full reference.