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

# Create template

`POST /templates`

Create a new template.

## Request body

- TemplateInput
  - `title` string, required
  - `bodyHtml` string — HTML body. At least one of bodyHtml or bodyText is required.
  - `bodyText` string — Plain text body. At least one of bodyHtml or bodyText is required.

## Response `201`

The template attributes

- TemplateDetail
  - `id` integer
  - `title` string
  - `bodyHtml` string
  - `bodyText` string
  - `createdOn` string
  - `updatedOn` string

## Other responses

- `400` — Bad request
- `401` — Unauthorized

---

[API](https://skmtc.net/cyberimpact/apis/cyberimpact-api.md) · [All operations](https://skmtc.net/cyberimpact/apis/cyberimpact-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cyberimpact/cyberimpact-api/revisions/bf0b51ee8e8a/schema)
