---
title: "Create an email template"
method: POST
path: "/templates/"
tags: ["Template"]
---

# Create an email template

`POST /templates/`

Create a new email template for the current user's tenant.

## Query parameters

- `tenant_id` integer
- `cookie_name` string, nullable

## Request body

- TemplateIn — Payload for creating or updating an email template.
  - `name` string, nullable — Human-readable label for the template. Max 100 characters.
  - `text_body` string, required — Plain-text body of the email.
  - `html_body` string, nullable — Optional HTML body of the email.

## Response `201`

Successful Response

- TemplateOut — Email template as returned by the API.
  - `id` integer, required — Unique identifier of the template.
  - `name` string, nullable, required — Human-readable label for the template.
  - `text_body` string, required — Plain-text body of the email.
  - `html_body` string, nullable, required — HTML body of the email, or null if none.

## Other responses

- `401` — Missing or invalid authentication.
- `403` — Admin privileges required.
- `422` — Validation Error

---

[API](https://skmtc.net/neulandai/apis/neuland-ai-hub-api.md) · [All operations](https://skmtc.net/neulandai/apis/neuland-ai-hub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/neulandai/neuland-ai-hub-api/versions/b53e89b98c2b/schema)
