Skip to content

Register a push subscription (web push or APNs)

POST
/api/notifications/subscribe
Any of:
object
transport
string
default: web_push
Allowed values: web_push
endpoint
required
string format: uri
keys
required
object
p256dh
required
string
>= 1 characters
auth
required
string
>= 1 characters
deviceName
string

Subscription registered

object
ok
required
boolean
data
required
object
id
required
string
subscribed
required
boolean
transport
required
string
Allowed values: apns web_push

Invalid subscription data or no band membership

object
ok
required
boolean
error
required
string
code
string

Unauthenticated

object
ok
required
boolean
error
required
string
code
string

Forbidden / no permission

object
ok
required
boolean
error
required
string
code
string

Failed to save subscription

object
ok
required
boolean
error
required
string
code
string