---
title: "Add one web push domain"
method: POST
path: "/api/v1/site/webpush/domain"
tags: ["Site"]
---

# Add one web push domain

`POST /api/v1/site/webpush/domain`

The method is used for adding one domain for web push notifications.

## Request body

- WebPushDomain — Web Push Domain
  - `domain` string, required — Site for web push integration (HTTPS only).
  - `serviceWorkerName` string, required — Web push service worker file name, in *.js format
  - `serviceWorkerPath` string, required — Relative path on site, where service worker will be stored. Must start and end with slash
  - `serviceWorkerScope` string, required — Relative path on site, where service worker will work. Usually is the same as serviceWorkerPath

## Response `200`

Domain is created/already registered in this organization

## Other responses

- `400` — The domain is registered in another organization

---

[API](https://skmtc.net/esputnik/apis/esputnik-com.md) · [All operations](https://skmtc.net/esputnik/apis/esputnik-com/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/esputnik/esputnik-com/revisions/1c4afd7ba72a/schema)
