Ask about anything in DailyStory Developer Documentation

Type a question in your own words below. Answers are written from our published articles and cite the ones they came from.

Recently updated

    ↑↓ select · ↵ open · esc close
    Dashboard
    Edit Article Logout

    Create or Update Web Push Opt-in


    Creates or updates the tenant's web push opt-in prompt configuration. The opt-in prompt is the UI shown to browser visitors asking them to subscribe to push notifications. A tenant has at most one opt-in configuration; posting replaces the existing one.

    Use Get Web Push Opt-in to read the current configuration.

    HTTP Request Examples
    { "title": "Get updates from Example", "body": "We'll send you notifications for new posts and offers.", "logo": "https://cdn.example.com/logo.png", "serviceworker_url": "https://www.example.com/sw.js", "placement": 0 }
    HTTP Request Parameters
    titlestringrequired
    Title displayed on the opt-in prompt.
    bodystringrequired
    Body text displayed on the opt-in prompt.
    logostring
    URL of the logo shown on the opt-in prompt.
    serviceworker_urlstring
    URL of the service worker script used to register the browser subscription.
    placementnumberrequired
    Placement of the prompt. 0 = TopRight, 10 = TopLeft, 20 = TopCenter.
    HTTP Response Examples
    200
    { "Status": true, "Message": "", "Response": {} }

    How helpful was this article?

    👍 or 👎

    Related Articles

    Markdown Version