---
title: "Update an email template"
method: POST
path: "/template/edit"
tags: ["TEMPLATES"]
---

# Update an email template

`POST /template/edit`

Changes details of an existing email template.

## Request body

- object
  - `id` string, required — The ID of the email template that you wish to change
  - `new_id` string — If provided, will update the email template ID
  - `template_name` string — If provided, will update the email template name
  - `subject` string — If provided, will update the email template subject
  - `html_body` string — If provided, will update the email template HTML body
  - `text_body` string — If provided, will update the email template Plain Text body
  - `template_variables` object — The pass-through values required by the template in the format `{"variable1": "value1", "variable2": "value2"}` (When template_id is provided)
  - `tags` string[] — If provided, will update the email template tags

## Response `200`

Template updated

- 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)
