---
title: "Create Web Push Template"
method: POST
path: "/v1/web-push-templates"
tags: ["web-push-templates"]
---

# Create Web Push Template

`POST /v1/web-push-templates`

## Request

- Base URL: `https://api.elaan.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.elaan.io/v1/web-push-templates`
- Auth: none declared

## Headers

- `authorization` string, nullable

## Request body

- CreateWebPushTemplateRequest
  - `title` string, required
  - `body` string
  - `icon` string
  - `badge` string
  - `url` string
  - `data` object
  - `language` string, nullable
  - `notification_type_key` string, required
  - `branding_key` string, nullable

## Response `201`

Successful Response

- WebPushTemplateResponse
  - `id` string, required
  - `notification_type_key` string, required
  - `branding_key` string, nullable, required
  - `language` string, nullable, required
  - `variables` string[], required
  - `title` string, required
  - `body` string, required
  - `icon` string, required
  - `badge` string, required
  - `url` string, required
  - `data` object, required

## Other responses

- `409`: A template for this notification type + brand already exists
- `422`: The keys are malformed, the notification type isn't live, the branding doesn't exist, or the content is empty

---

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