---
title: "Add an email template"
method: POST
path: "/template/add"
tags: ["TEMPLATES"]
---

# Add an email template

`POST /template/add`

Adds a new email template that you can use to format your emails.

## Request body

- object
  - `template_name` string, required — The name of the email template. Min length: 1 Character. Max length: 64 Characters.
  - `id` string, required — The case-sensitive ID of the email template. Min length: 5 Character. Max length: 24 Characters.
  - `subject` string, required — The subject of the email template.
  - `html_body` string, required — The HTML body of the email template.
  - `text_body` string, required — The Plain Text body of the email template.
  - `template_variables` object — The variables to use within this email template in the format `{"variable1": "value1", "variable2": "value2"}`
  - `tags` string[] — The list of Tags to associate to this email template

## Response `200`

Template added

- object
  - `request_id` string
  - `data` object
    - `id` string, required
    - `name` string — This parameter is only returned in 'search' response
    - `template_name` string — This parameter is not present in 'search' response
    - `subject` string, required
    - `tags` string[], required
    - `last_updated` string — A timestamp indicating when this template was last updated

## Other responses

- `400` — 400

---

[API](https://skmtc.net/smtp2go/apis/smtp2go-api-v3-0-4.md) · [All operations](https://skmtc.net/smtp2go/apis/smtp2go-api-v3-0-4/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smtp2go/smtp2go-api-v3-0-4/versions/1ba6b25eebb9/schema)
