Skip to content
Console
Menu

Alerts and status pages

App store purchases

Credits

Knowledge

KV

Notifications

Organizations

Storage

Workflows

API reference

Getting Started

Authentication

KV Store

Register push device on a recipient

Atomically registers or renews one Web Push subscription.

Atomically registers or renews one Web Push subscription. Other devices remain registered. The sender and recipient must share an environment.

  • Path POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/recipients/recipient:registerPushDevice
  • Scope notify:write
  • Effect write — a successful call changes state.
  • Collection recipients

#Request

FieldTypeWhat it is
namestringThe recipient to register for. Required.
devicePushDeviceA browser subscription, with its configured sender. Required.

#PushDevice

FieldTypeWhat it is
platformPushPlatformThe platform. Required. One of apns, fcm, web_push.
device_tokenstringWrite-only. For web_push, the exact JSON string returned by a browser's PushSubscription.toJSON(): endpoint, optional expirationTime, and keys containing base64url p256dh and auth. APNs and FCM are not yet served. Required. Never returned again.
senderstringThe push Sender the token belongs to. Required.

#Response

FieldTypeWhat it is
registration_idstringIdentifies this recipient's device without revealing its subscription.
senderstringThe sender the registration was bound to.
application_server_keystringPublic applicationServerKey used by the browser subscription.
recipient_uidstringImmutable Notify Recipient UID; the application binds it to its own active authenticated principal before accepting notifications. Output only.
registration_generationint64Exact registration epoch, encoded as a decimal string in JSON. Output only.

#Errors

Every error arrives in the body Errors describes.

#Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/recipients/recipient:registerPushDevice" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"device":{"device_token":"…","platform":"apns","sender":"…"}}'