Skip to main content
POST
/
web-push
/
anonymous
/
subscribe
Subscribe for unknown user web push notifications
curl --request POST \
  --url https://push.platform.arb.inc/web-push/anonymous/subscribe \
  --header 'Content-Type: application/json' \
  --data '
{
  "vapidKey": "BEl62iUYgUivxIkv69yViEuiBIa-Ib27SDbQjfTbSAiJ-r7lJCndYzohTxb2L8yfWJrykPocwn0hzNnXxHGP0Qo",
  "subscription": {
    "endpoint": "https://fcm.googleapis.com/fcm/send/cyZ...",
    "keys": {
      "p256dh": "BEl62iUYgUivxIkv69yViEuiBIa-Ib27SDbQjfTbSAiJ-r7lJCndYzohTxb2L8yfWJrykPocwn0hzNnXxHGP0Qo",
      "auth": "53_d2d..."
    }
  }
}
'
{
  "subscriptionID": "123e4567-e89b-12d3-a456-426614174000"
}

Body

application/json

Subscription details and VAPID key.

vapidKey
string
required

The public VAPID key used for subscription.

Example:

"BEl62iUYgUivxIkv69yViEuiBIa-Ib27SDbQjfTbSAiJ-r7lJCndYzohTxb2L8yfWJrykPocwn0hzNnXxHGP0Qo"

subscription
object
required

The browser push subscription object.

Response

200 - application/json

Successfully subscribed to web push notifications.

subscriptionID
string
required

The ID of the created subscription.

Example:

"123e4567-e89b-12d3-a456-426614174000"