How It Works
1
Configure a webhook URL in the dashboard
In your Sublay project dashboard, go to Settings → Webhooks and add a webhook URL pointing to your backend endpoint. Select the App Notification Created event.
2
Receive the event on your backend
When Sublay creates an app notification, it sends an HTTP POST to your webhook URL with a JSON payload describing the notification:
3
Look up the recipient's push token
Use
data.userId to look up the FCM or APNs token stored in your own database for that user.4
Send the push notification
Use your push provider (Firebase Admin SDK, APNs, Expo Push, etc.) to send a push notification to the device. Build the message text using
data.type and data.metadata from the webhook payload.Payload Fields
This page describes the bring-your-own-provider bridge: you store the push
tokens in your own backend and dispatch through your own provider. Sublay can
also do this for you — the
push bundle stores each
user’s registered devices per account and dispatches to APNs, FCM and Web Push
itself, in which case no webhook bridge is needed.
