Send a push to a list of registered indie ids with POST /api/indie/group/notification.
Required
Register your users with indie push registration before using this API.
Send to a group
POST https://app.nativenotify.com/api/indie/group/notification
{
"subIDs": ["user_8241", "user_9032", "user_1177"],
"appId": 12345,
"appToken": "yourAppToken",
"title": "Fresh bread at 7am",
"message": "The bakery opens early today.",
"pushData": { "url": "/specials" }
}
appId and appToken are in your Native Notify dashboard. pushData (an object or a JSON string), bigPictureURL and Expo's rich fields, such as subtitle, badge, ttl and sound, are optional: see Rich notifications.
Content-Type
Send JSON with Content-Type: application/json. fetch and server languages like Python must set it (axios does), or the server can't read appId and appToken and answers 401.
Response
| Status | Meaning |
|---|---|
201 with Success! | The push went out to the registered ids in the list. Unregistered ids are skipped without an error, so check them with Get one successfully registered ID when it matters. |
201 with an explanation | Nothing was sent: the free trial has ended, sending is paused for an unpaid invoice (see Plans & billing), or the membership doesn't include group pushes. Check that the body is exactly Success!. |
400 | subIDs missing or not an array, a missing title or message, an invalid rich field, or a payload over Expo's 4 KiB limit. |
401 | The appId and appToken pair doesn't match an app. |