Rivier/ Reference/ campaigns

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

  • userRefstringrequired
    Your own id for the person; Rivier keeps it as given and never shows it to anyone else At most 200 characters.
  • subscriptionobjectrequired
    The PushSubscription a page got from pushManager.subscribe, as its toJSON() gives it
    • endpointstring (uri)required
      At most 1000 characters.
    • keysobjectrequired
      • p256dhstringrequired
        At most 120 characters.
      • authstringrequired
        At most 40 characters.
  • userAgentstring
    At most 300 characters.

Responses

  • 201application/json
    Success
    • 400application/json
      The request was malformed
      • errorstringrequired
      • messagestring
    • 401application/json
      No valid credential
      • errorstringrequired
      • messagestring
    • 403application/json
      The credential lacks the scope, origin or address
      • errorstringrequired
      • messagestring
    • 429application/json
      Over the key's rate limit; see Retry-After
      • errorstringrequired
      • messagestring

    This page as Markdown