Skip to main content
GET
/
publisher
/
{publisher_id}
/
static
/
service-worker.js
service-worker.js
curl --request GET \
  --url https://cds.thepublive.com/publisher/{publisher_id}/static/service-worker.js/ \
  --header 'Authorization: Basic <encoded-value>'
{
  "status": "ok",
  "data": {
    "content": "self.addEventListener('push', function(event) { ... });"
  }
}
Returns the service worker JavaScript file used to power web push notifications for the publisher’s website, served from S3.
This endpoint returns 404 if push notifications are not enabled for the publisher. Check publisher_config → widget_config_json → push_notification_config to determine availability before serving this file.
publisher_id
string
required
Your Publisher ID
{
  "status": "ok",
  "data": {
    "content": "self.addEventListener('push', function(event) { ... });"
  }
}
Last modified on May 29, 2026