PushizoDocs
SDK guides

SDK overview

Client (Web, iOS, Android, Flutter and bridges) and server (Node, PHP, Python, Go, Java, .NET, Ruby) SDKs; shared concepts and end-to-end verification.

All client SDKs expose the same conceptual API (almost one-to-one with the legacy provider's v5): initialize → login → User.addTags → Notifications.requestPermission → Session.sendEvent. Server SDKs wrap the entire public REST API as resource × method.

Availability

The installation paths you can use today do not require a package registry; ready-made snippets are on Dashboard → SDK Setup:

  • Web script tag: PushizoSDK.js and PushizoSDKWorker.js are served by your API server under /sdk-web/ (Web SDK → Script tag).
  • Google Tag Manager: the same script tag as a Custom HTML tag (the GTM template is also available).
  • WordPress: a script tag snippet added to your theme's functions.php (the WordPress plugin is also available).
  • Server-side REST API: the /v1 endpoints from any language with cURL or an HTTP client (API reference, Quickstart).
  • Go: go get github.com/pushizo/pushizo-go (Go).
  • iOS (Swift Package Manager): https://github.com/pushizo/pushizo-ios (iOS).

npm (@pushizo/web, @pushizo/node, @pushizo/react, @pushizo/vue, @pushizo/angular, @pushizo/react-native, @pushizo/capacitor, @pushizo/cli, cordova-plugin-pushizo), Maven Central (com.pushizo:pushizo-java, com.pushizo:pushizo-android, com.pushizo:pushizo-android-hms), NuGet (Pushizo), Packagist (pushizo/pushizo-php), pub.dev (pushizo_flutter), PyPI (pushizo), RubyGems (pushizo), crates.io (pushizo) and OpenUPM (com.pushizo.unity) are published as 0.1.0; CocoaPods Pushizo as 0.1.2. The NuGet Pushizo.Maui release is in preparation.

Client SDKs

PlatformPackageGuideExample
Web (browser)@pushizo/web, PushizoSDK.js (API /sdk-web/)Webexamples/web-vanilla, examples/web-nextjs
React / Next.js@pushizo/reactReactexamples/web-nextjs
Vue 3 / 2.7, Nuxt@pushizo/vueVue—
Angular 17+@pushizo/angularAngular—
iOSPushizo (SPM / CocoaPods) + PushizoExtensioniOSexamples/ios-swiftui
Androidcom.pushizo:pushizo-androidAndroidexamples/android-kotlin
Flutterpushizo_flutterFlutterexamples/flutter-app
React Native@pushizo/react-native (includes an Expo config plugin)React Nativeexamples/react-native
Capacitor (Ionic)@pushizo/capacitor (delegates to @pushizo/web on the web)Capacitorexamples/ionic-capacitor
Cordovacordova-plugin-pushizoCordovaexamples/cordova
.NET MAUIPushizo.Maui.NET MAUIexamples/maui-app
Unitycom.pushizo.unity (UPM)Unitysdk/unity/Samples~/Demo (UPM sample)
Kotlin Multiplatformcom.pushizo:pushizo-kmp (Android; iOS and Maven release in preparation)Kotlin Multiplatformexamples/kmp-app

Bridge SDKs (React Native, Capacitor, Cordova, MAUI, Unity) wrap the native Android/iOS SDKs; the queue, sessions, delivery feedback, in-app rendering and trigger evaluation run on the native side. The web framework packages (@pushizo/react, @pushizo/vue, @pushizo/angular) wrap @pushizo/web: React, Vue, Angular.

Server SDKs

LanguagePackageGuide
Node.js ≥ 20@pushizo/nodeNode
PHP ≥ 8.1pushizo/pushizo-phpPHP
Python ≥ 3.9pushizo (PyPI)Python
Go ≥ 1.23github.com/pushizo/pushizo-goGo
Java ≥ 17com.pushizo:pushizo-javaJava
.NET 8Pushizo (NuGet).NET
Ruby ≥ 3.0pushizo (RubyGems)Ruby
Rust ≥ 1.71pushizo (crates.io)Rust

The Python, Go, Java, .NET, Ruby and Rust SDKs are generated from api/openapi.yaml (npm run sdk:generate); authentication, retries, idempotency, pagination and webhook signature verification live in a hand-written layer. All of them use the same resource/method names (adapted to each language's conventions).

Shared concepts

  • App ID (app_…): Dashboard → App settings. Client SDKs work with the App ID alone; no secret key is needed.
  • API key (hs_live_…): server SDKs only; never embed it in a client.
  • external_id: your user ID. login(externalId) links the anonymous device to this user; multiple devices merge into the same user. logout() moves the device to a new anonymous user.
  • Identity verification: when it is enforced in App settings, login is accepted only with an identity_hash = HMAC-SHA256(sdk_secret, external_id) generated by your server (server SDKs provide identityHash / identity_hash helpers).
  • Privacy consent: while requiresPrivacyConsent is on, no network calls are made until setConsentGiven(true) is called (KVKK (Turkish data protection law)/GDPR).
  • Offline queue: tags, properties, events, aliases, email/SMS additions and delivery feedback are queued on the device and sent in order, idempotently, once a connection is available.
  • Delivery tracking: received is recorded when a push arrives (Android onMessageReceived, iOS Notification Service Extension, web service worker) and opened (+ button_id) when it is tapped; the timeline appears in Dashboard → Message Tracking.
  • Email / SMS subscription: User.addEmail / User.addSms normalize the address (ayse@pushizo.com, +905321234567) and create a subscription linked to the device's user.
  • Preferences: User.getPreferences() / setPreferences([...]) for the message categories defined in the dashboard (user × channel opt-in).
  • In-app messages: InAppMessages.addTrigger / setScreen / paused, events via Session.sendEvent; trigger rules are identical across all SDKs (shared vectors in sdk/testdata/messaging-vectors.json).
  • Regional API URL (data residency, ADR-0032 §4): if apiUrl is omitted or set to the global root (https://api.pushizo.com), client SDKs learn the regional root (api_url) from the app configuration, store it and send all requests there; a custom apiUrl is preserved. On a 421 HS_WRONG_CELL response for an org in another region, the SDK switches to the details.api_url root and retries the request once (one redirect per request, no loops). Only valid https URLs are accepted (user info, query and fragment are rejected; loopback http is allowed for local development); shared vectors are in sdk/testdata/cell-routing-vectors.json.
  • Notification inbox: Inbox.list / markRead / markAllRead / archive / unreadCount; messages with add_to_inbox: true.

End-to-end verification (every platform)

  1. Enable the relevant channel in the dashboard (Channels → Web Push / Android Push / iOS Push); use the simulation provider if you have no real provider.
  2. Run the example app and tap Request notification permission.
  3. Dashboard → Subscriptions: the device registration appears; mark it as a Test device.
  4. Dashboard → Messages → Send test push. The notification arrives; tapping it opens the app/page.
  5. Dashboard → Message Tracking: queued → sent → received → opened.

In local development the API runs at http://localhost:4000; from the Android emulator use http://10.0.2.2:4000, and from a physical device use your machine's LAN IP. Dashboard helpers: Getting Started (/<org>/getting-started), SDK Setup (/<org>/sdk-setup), Test Devices, API Explorer, Logs (Developer menu).

On this page