Keep a browser's push subscription under your own id for the person
post/notify/push/subscriptions
Keep a browser's push subscription under your own id for the person. Only the browsers' push services are accepted as endpoints.
Before you call
- Credential
Authorization: Bearer $KEY- Scope
campaigns:write- Mcp
rivier_notify_push_subscribe- Graphql
Mutation.campaignsNotifyPushSubscribe- Sdk
campaigns.notifyPush.subscribe- Cli
campaigns notify push subscribe
Request bodyapplication/json, required
- userRefstringrequiredYour own id for the person; Rivier keeps it as given and never shows it to anyone else At most 200 characters.
- subscriptionobjectrequiredThe PushSubscription a page got from pushManager.subscribe, as its toJSON() gives it
- endpointstring (uri)requiredAt most 1000 characters.
- keysobjectrequired
- p256dhstringrequiredAt most 120 characters.
- authstringrequiredAt most 40 characters.
- p256dhstringrequired
- endpointstring (uri)required
- userAgentstringAt most 300 characters.
Responses
- 201application/jsonSuccess
- 400application/jsonThe request was malformed
- errorstringrequired
- messagestring
- 401application/jsonNo valid credential
- errorstringrequired
- messagestring
- 403application/jsonThe credential lacks the scope, origin or address
- errorstringrequired
- messagestring
- 429application/jsonOver the key's rate limit; see Retry-After
- errorstringrequired
- messagestring