---
title: "Create a template"
method: POST
path: "/api/v1/templates"
tags: ["Templates"]
---

# Create a template

`POST /api/v1/templates`

## Request

- Base URL: `https://api.sendly.now`
- URL: `https://api.sendly.now/api/v1/templates`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `better-auth.session_token`
  - OAuth 2 (authorization code, authorization URL `https://app.sendly.now/api/auth/oauth2/authorize`, token URL `https://app.sendly.now/api/auth/oauth2/token`, scopes: `templates:write`)

Create a template. The `from` domain must already be a verified sending identity for this project — an unverified sender answers `403 forbidden` here rather than becoming a campaign that fails at send time.

Requires the `templates:write` scope — Create, edit, and delete your email templates.

## Request body

- TemplateV1Create: Body for POST /api/v1/templates.
  - `body` string, required
  - `description` string, nullable
  - `email_category` 'TRANSACTIONAL' | 'MARKETING' | 'SELF_MANAGED_UNSUBSCRIBE'
  - `from` string, email, required: Sender address. Its domain must be verified for this project.
  - `from_name` string, nullable
  - `name` string, required
  - `reply_to` string, email, nullable
  - `subject` string, required

## Response `201`

The created template

- TemplateV1: An email template as exposed on the v1 API.
  - `body` string, required
  - `created_at` string, date-time, required
  - `description` string, nullable, required
  - `email_category` 'TRANSACTIONAL' | 'MARKETING' | 'SELF_MANAGED_UNSUBSCRIBE', required
  - `from` string, required
  - `from_name` string, nullable, required
  - `id` string, uuid, required
  - `name` string, required
  - `reply_to` string, nullable, required
  - `subject` string, required
  - `updated_at` string, date-time, required
  - `version` integer, required

## Other responses

- `401`: `invalid_api_key` or `invalid_session` — missing or invalid credentials.
- `403`: `scope_missing`, `project_access_denied`, or `project_disabled`.
- `422`: `validation_error` — query, path, or body parameters did not match the schema.
- `429`: `rate_limited` — see `Retry-After` and the `RateLimit` headers.
- `500`: `internal_error`.

---

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