Send a push notification
Push Notifications
Send Push Notification
Send a push notification to a direct device target or to contact aliases.
POST
Send a push notification
Send a push notification to Sendrealm push devices, contacts, external IDs,
email addresses, raw push tokens, or audiences.
For direct browser sends, pass browser subscriptions separately from mobile
tokens:
Use
Targeting
Use one Sendrealm targeting style per request:tokens: raw Android FCM or iOS APNs push tokens with their platform.web_subscriptions: raw browserPushSubscription.toJSON()objects for direct Web Push sends.device_ids: Sendrealm push device IDs created by the SDK.contact_ids: Sendrealm contact IDs.external_ids: stable IDs set with SDK login or the server API.emails: contact email addresses.audiences: audience IDs for queued or scheduled audience sends.
excluded_audiences with contact, external ID, email, or audience sends to
remove contacts that belong to specific audiences. Use platforms to limit
delivery to android, ios, or web. Web devices registered by the React SDK
can be targeted through device, contact, external ID, email, audience, or
platforms: ["web"] filters.
Set environment to development to target devices registered by development
SDK builds. Omit it, or set production, for production devices. This is
separate from iOS apns_environment.
Audience sends are queued through the push broadcast delivery pipeline. Direct
device, token, contact, external ID, and email sends are delivered immediately.
Body
buttons to attach up to three notification actions. Android renders the
button text directly. iOS sends Sendrealm’s default action category and includes
the button payload for SDK action tracking and deep-link handling.
For localized messages, send messages with locale codes:
Tags And Contact Properties
SDK tags are client-sourced key/value data used for app behavior, preferences, audience targeting, and personalization. They are useful for values the app can observe directly, such as onboarding status, selected interests, locale, or app version. Server contact properties are authoritative backend data. Use the Contacts API for account, billing, compliance, lifecycle, verified profile, and CRM values. SDK tag writes cannot overwrite server-owned or system-owned contact properties. Protected SDK tag keys include identity and Sendrealm/system fields. Keys that start withsendrealm_, sys_, billing_, security_, or account_ are
reserved. Audience properties are server-owned by default; set
sdk_writable: true on an audience property only when the mobile app is allowed
to manage that value.
Reporting
Each send records push notification rows and events for provider accepted sends, failures, opens, clicks, and SDK-tracked custom events. Provider accepted means the push provider accepted the request; it is not the same as confirmed display on the physical device.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Push notification payload
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Push app short ID.
Minimum array length:
1Sendrealm push environment. Development sends only target devices registered in development mode.
Available options:
production, development Direct browser Web Push subscriptions from PushSubscription.toJSON(). Use device, contact, external ID, email, audience, or platforms targeting for SDK-registered web devices.
Minimum array length:
1Minimum array length:
1Minimum array length:
1Minimum array length:
1Minimum array length:
1Minimum array length:
1Minimum array length:
1Minimum array length:
1Available options:
web, android, ios Queue an audience send for a future time.
Minimum array length:
1Maximum array length:
3- Option 1
- Option 2