---
title: "Utwórz szablon"
method: POST
path: "/v1/templates"
tags: ["Szablony"]
---

# Utwórz szablon

`POST /v1/templates`

## Request

- Base URL: `https://api.przypominamy.com`
- URL: `https://api.przypominamy.com/v1/templates`
- Auth: HTTP bearer

Zapisuje szablon z placeholderami `{{klucz}}` (klucz: litery, cyfry, podkreślenie). `type` domyślnie `sms`; dla `mms` w `body` podaj dokument SMIL, a temat w `subject`; `vms` to szablon wiadomości głosowej. Wymaga zakresu `manage`.

## Request body

- TemplateInput
  - `name` string, required
  - `type` 'sms' | 'mms' | 'vms': Domyślnie `sms`
  - `body` string, required: Treść z placeholderami `{{klucz}}`
  - `subject` string, nullable: Temat (tylko MMS)

## Response `201`

Utworzono

- Template
  - `id` string
  - `name` string
  - `type` 'sms' | 'mms' | 'vms': Kanał, do którego pasuje szablon - musi zgadzać się z endpointem wysyłki
  - `body` string: Treść z placeholderami `{{klucz}}` (dla MMS - dokument SMIL)
  - `subject` string, nullable: Temat (tylko MMS)
  - `placeholders` string[]: Placeholdery znalezione w `body`, małymi literami
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400`: Błąd walidacji
- `401`: Brak lub nieprawidłowy klucz API
- `403`: Klucz bez wymaganego zakresu (albo konto zawieszone / testowe wysyła na niezweryfikowany numer)

---

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