Admin API
Server-to-server API for sending push notifications to users and topics. Requires an API key from the starti.app manager.
Base URL: https://api.starti.app/v1
Authentication
All requests must include an API key in the x-api-key header. You can obtain your API key from the starti.app manager.
curl -H "x-api-key: YOUR_API_KEY" https://api.starti.app/v1/...Send Push Notifications
POST /push-notifications/sendSend notifications or badge updates to users or topics. The request body is an array of notification objects, allowing you to send multiple notifications in a single request.
Each notification must target either userIds or topics, not both. The userIds correspond to the IDs registered via startiapp.User.registerId() on the client side.
Notification
Send a visible push notification with a title and body.
[
{
"userIds": ["user123", "user456"],
"title": "New Message",
"body": "You have received a new message",
"openToUrl": "https://example.com/message/123",
"badgeCount": 5
}
]Prop
Type
Either userIds or topics must be provided. title and body are required for notifications.
Badge update
Update the app badge count without showing a notification.
[
{
"userIds": ["user123"],
"badgeCount": 5
}
]Prop
Type
Examples
curl -X POST \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '[
{
"userIds": ["user123"],
"title": "New Message",
"body": "You have received a new message",
"openToUrl": "https://example.com/message/123"
},
{
"userIds": ["user456"],
"badgeCount": 5
}
]' \
https://api.starti.app/v1/push-notifications/sendcurl -X POST \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '[
{
"topics": ["general", "announcements"],
"title": "System Update",
"body": "The system will be updated tonight",
"openToUrl": "https://example.com/updates"
},
{
"topics": ["vip"],
"badgeCount": 3
}
]' \
https://api.starti.app/v1/push-notifications/sendResponses
User
Manage user identity within the app. Register a user ID to associate the current device with a known user, unregister on logout, and let users request account deletion. The user ID is persisted in localStorage so it survives page reloads.
Apple App Store
Set up your App Store Connect API key and publish your app to the Apple App Store