Skip to main content
POST
Send a push notification
Send a push notification to Sendrealm push devices, contacts, external IDs, email addresses, raw push tokens, or audiences.

Targeting

Use one Sendrealm targeting style per request:
  • tokens: raw Android FCM or iOS APNs push tokens with their platform.
  • web_subscriptions: raw browser PushSubscription.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.
Use 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

For direct browser sends, pass browser subscriptions separately from mobile tokens:
Use 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 with sendrealm_, 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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Push notification payload

app_id
string
required

Push app short ID.

tokens
object[]
required
Minimum array length: 1
notification
object
required
environment
enum<string>
default:production

Sendrealm push environment. Development sends only target devices registered in development mode.

Available options:
production,
development
web_subscriptions
object[]

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: 1
device_ids
string[]
Minimum array length: 1
contact_ids
string<uuid>[]
Minimum array length: 1
external_ids
string[]
Minimum array length: 1
emails
string<email>[]
Minimum array length: 1
audiences
string<uuid>[]
Minimum array length: 1
excluded_audiences
string<uuid>[]
Minimum array length: 1
platforms
enum<string>[]
Minimum array length: 1
Available options:
web,
android,
ios
scheduled_at
string<date-time>

Queue an audience send for a future time.

template_version_id
string<uuid>
messages
object[]
Minimum array length: 1
buttons
object[]
Maximum array length: 3
data
object
android
object
ios
object

Response

Push notification sent successfully

status
integer
required

HTTP response status code

data
object
required