Skip to main content

Push Notifications Overview

The platform delivers mobile push notifications via Firebase Cloud Messaging. The admin API exposes a small set of endpoints for registering devices and sending pushes; the rest is handled for you.

What you can do

EndpointPurpose
POST /api/push/registerRegister the caller's device
POST /api/push/deregisterDeregister one or more device tokens
POST /api/push/sendSend a push notification

All endpoints require a valid Auth0 bearer token.

Sending a push

The simplest call sends a push to your own registered devices:

curl -X POST https://bard-pms-api.elivaas.com/api/push/send \
-H "Authorization: Bearer $AUTH0_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Hello",
"body": "Test push",
"data": { "deepLink": "elivaas://home" }
}'

You can also target other users or raw device tokens:

{
"users": [{ "userId": "user_abc123" }],
"title": "New booking assigned",
"body": "BK-12345 needs your approval"
}
{
"tokens": ["fGxk...:APA91b..."],
"title": "Test"
}

tokens and users may be combined; duplicate devices are deduped automatically.

See Device Registration for the register / deregister flow.