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

# Create a template

`POST /api/v1/templates`

## Request

- Base URL: `https://api.misar.io/mail`
- URL: `https://api.misar.io/mail/api/v1/templates`
- Auth: HTTP bearer

## Request body

- object
  - `name` string, required
  - `subject` string, required
  - `bodyHtml` string, required
  - `bodyText` string
  - `templateType` 'marketing' | 'transactional' | 'automation'
  - `variables` string[]

## Response `201`

Template created

---

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