Register Device
Push Notification Endpoints
Register Device
Register a device to receive push notifications for the authenticated user
POST
Register Device
Registers a push device for the currently authenticated user. Re-registering the same physical device updates the existing record instead of creating a duplicate. If the device was previously registered by a different user (e.g. a shared device), it is reassigned to the calling user.
Requires end-user authentication (
Returned when
Returned when the
Authorization: Bearer <accessToken>). Service and master keys are explicitly rejected — this endpoint has no impersonation path by design (see Security note).
Requires the push bundle.
Body Parameters
The device platform. One of
"ios", "android", or "web".The APNs or FCM device token. Required when
platform is "ios" or "android".The Web Push subscription object. Required when
platform is "web".Response
Returns200 with an empty body on success.
Error Responses
Unauthorized — 401
Unauthorized — 401
Invalid Body — 400
Invalid Body — 400
platform is unrecognized, or when the required token / subscription field is missing for the given platform.Bundle Not Installed — 403
Bundle Not Installed — 403
push bundle is not installed for this project.Security note
Unlike most other write endpoints, this endpoint does not accept auserId body parameter and cannot be called with a service key. Allowing a backend to register an arbitrary token for an arbitrary user would let it redirect that user’s push notifications to an attacker-controlled device. Registration must always come from the end user’s own session.

