Push Notifications
Send push notifications to your users' devices, triggered from your backend. This guide covers creating notification templates and sending notifications via the API.
How It Works
- You create notification templates inside a release — these define the structure of your notifications
- Your backend calls the NativeSuite API to send a notification, passing the template ID and variable values
- NativeSuite delivers the notification to the user's device
Creating Notification Templates
Notification templates belong to a release. To create one:
- Navigate to your app → Releases → select a release
- Go to the Notifications section
- Click Create Notification Template
Template Structure
Each template has:
- Title pattern — The notification title, with optional
- Body pattern — The notification body, with optional
Using Variables
Variables use double-brace syntax. When you send a notification, you provide the values:
Template:
Title: Order #{{order_id}} shipped
Body: {{item_count}} items on the way to {{city}}, {{country}}API call with values:
{
"templateSlug": "order-shipped",
"variables": {
"order_id": "4821",
"item_count": "3",
"city": "Berlin",
"country": "Germany"
},
"targetUsers": ["550e8400-e29b-41d4-a716-446655440000"]
}Result on the user's device:
Order #4821 shipped
3 items on the way to Berlin, GermanySending Notifications via API
To send a notification from your backend, make a POST request to the NativeSuite API:
curl -X POST https://api.staging.nativesuite.io/api/apps/{appId}/notifications/send \
-H "X-NativeSuite-Key: {your-app-secret}" \
-H "Content-Type: application/json" \
-d '{
"templateSlug": "order-shipped",
"variables": {
"order_id": "4821",
"item_count": "3",
"city": "Berlin",
"country": "Germany"
},
"targetUsers": ["550e8400-e29b-41d4-a716-446655440000"]
}'See the Send Notification API reference for the full specification.
Authentication
Requests to the NativeSuite API are authenticated using your app's App Secret via the X-NativeSuite-Key header. Find this in the dashboard under your app's Settings → Credentials.
Notification Lifecycle
Each notification goes through these states:
- Pending — Received by NativeSuite, queued for delivery
- Sent — Delivered to the user's device
- Failed — Delivery failed (e.g., invalid device token, user unsubscribed)
Per-Release Templates
Notification templates are scoped to a release. This means:
- Draft release — You can create and edit templates freely
- Live release — Templates are locked; create a new release to change them
- Different releases can have different templates
This gives you version control over your notification structure.
Best Practices
- Be concise — Notifications are cut off after ~100 characters on most devices
- Front-load important info — Put the key detail in the title, context in the body
- Don't over-notify — Respect your users' attention. Send notifications for events they care about
- Use variables wisely — Dynamic content makes notifications personal and actionable
- Test with real devices — Notification rendering varies by OS, device, and user settings