SDK — Overview
Notify Partners provides client SDKs for three platforms — Web, Android, and iOS. All SDKs implement a unified server communication protocol.
Supported Platforms
| Platform | Transport | Package / Dependency | Minimum OS Version |
|---|---|---|---|
| Web | Web Push API (VAPID) | Service Worker + @notify.partners/web-sdk (npm) | Chrome 50+, Firefox 44+ |
| Android | Firebase Cloud Messaging (FCM) | Maven Central partners.notify:notify-partners-sdk | Android 5.0+ (API 21) |
| iOS | Apple Push Notification service (APNs) | Swift Package Manager NotifyPartnersSDK | iOS 13.0+ |
Common SDK Flow
All three SDKs implement the same server communication protocol:
- Generate a device token — a unique installation identifier is created or restored from local storage
- Register the device on the Notify Partners server
- Obtain transport token — FCM (Android), APNs (iOS), or Web Push subscription (Web)
- Send device info — platform, language, timezone, tags, and the transport token
- Periodic updates — device info is refreshed at a server-defined interval
- Push event tracking —
deliveredandclickedevents are reported automatically - Lifecycle tracking —
onscreen,background,closedevents are sent to the server
Server API
- Base URL:
https://api.notify.partners/api/v3 - Authentication:
app_idin the URL path - Rate limit: 1000 QPS per
app_id
Quick Start
Web
import { NotifyPartnersSDK } from '@notify.partners/web-sdk';
NotifyPartnersSDK.initialize({
appId: 'YOUR_APP_ID',
vapidKey: 'YOUR_VAPID_KEY',
});See also: Web SDK
Android
// Application.onCreate()
NotifyPartnersSDK.initialize(
context = this,
appId = "YOUR_APP_ID"
)See also: Android SDK
iOS
// AppDelegate.didFinishLaunchingWithOptions
let config = NotifyPartnersConfig(appId: "YOUR_APP_ID")
NotifyPartnersSDK.shared.initialize(config: config)See also: iOS SDK
Server-Side Device Registration
If you want to register devices programmatically on the server (without a client SDK), use the SDK API directly via REST. This is useful for server-side applications, IoT devices, or cases where full control over the registration process is required.
Step 1 — create a device instance:
POST https://api.notify.partners/api/v3/apps/{app_id}/instances
Content-Type: application/json
{
"ic_token": "550e8400-e29b-41d4-a716-446655440000",
"ext_id": "user_123"
}Response: { "id": "456", "just_created": true } — the instance id to use in subsequent requests.
Step 2 — update device information:
PUT https://api.notify.partners/api/v3/apps/{app_id}/instances/{ic_id}/info
Content-Type: application/json
{
"platform_type": "android",
"transport_type": "fcm",
"transport_token": "FCM_TOKEN_HERE",
"lang": "en",
"country": "US",
"tz_sec": 10800
}The transport_type field must match the platform: fcm, apns, or webpush.
Step 3 — send a notification event (optional):
POST https://api.notify.partners/api/v3/apps/{app_id}/instances/{ic_id}/events/notification
Content-Type: application/json
{
"msg_id": "MSG_ID_FROM_PUSH",
"event": "delivered"
}Supported events: delivered, clicked.
ic_token is the unique device identifier in your system (a UUID or any string up to 255 characters). It must remain constant for the same device.