---
title: "Update an email template"
method: PUT
path: "/smtp/templates/{templateId}"
tags: ["Transactional emails"]
---

# Update an email template

`PUT /smtp/templates/{templateId}`

## Path parameters

- `templateId` integer, required

## Request body

- UpdateSmtpTemplate
  - `tag` string — Tag of the template
  - `sender` UpdateSmtpTemplateSender — Sender details including id or email and name (optional). Only one of either Sender's email or Sender's ID shall be passed in one request at a time. For example `{"name":"xyz", "email":"example@abc.com"}` , `{"name":"xyz", "id":123}`
    - `name` string — Name of the sender
    - `email` string, email — Email of the sender
    - `id` integer — Select the sender for the template on the basis of sender id. In order to select a sender with specific pool of IP’s, dedicated ip users shall pass id (instead of email).
  - `templateName` string — Name of the template
  - `htmlContent` string — Required if htmlUrl is empty. If the template is designed using Drag & Drop editor via HTML content, then the design page will not have Drag & Drop editor access for that template. Body of the message (HTML must have more than 10 characters)
  - `htmlUrl` string, url — Required if htmlContent is empty. URL to the body of the email (HTML)
  - `subject` string — Subject of the email
  - `replyTo` string, email — Email on which campaign recipients will be able to reply to
  - `toField` string — To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your Brevo account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization
  - `attachmentUrl` string, url — Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps
  - `isActive` boolean — Status of the template. isActive = false means template is inactive, isActive = true means template is active

## Response `204`

transactional email template updated

## Other responses

- `400` — bad request
- `404` — Template ID not found

---

[API](https://skmtc.net/getbrevo/apis/brevo-api.md) · [All operations](https://skmtc.net/getbrevo/apis/brevo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbrevo/brevo-api/versions/2aec3cf66501/schema)
