---
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`

## Request

- Base URL: `https://yespo.io` (the document declares no server; this is the origin it was published from)
- URL: `https://yespo.io/api/v1/site/webpush/domain`
- Auth: HTTP basic

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
  - `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`

OK

---

[API](https://skmtc.dev/yespo/apis/yespo-api.md) · [All operations](https://skmtc.dev/yespo/apis/yespo-api/llms.txt) · [OpenAPI document](https://skmtc.dev/yespo/apis/yespo-api/revisions/b662f92b6c40?raw)
