---
title: "Update Email Template"
method: PUT
path: "/mailagents/{mailagent-alias}/templates/{template-key}"
tags: ["email templates"]
---

# Update Email Template

`PUT /mailagents/{mailagent-alias}/templates/{template-key}`

## Request

- Base URL: `https://cpaas.zoho.com/v1.1`
- URL: `https://cpaas.zoho.com/v1.1/mailagents/{mailagent-alias}/templates/{template-key}`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://accounts.zoho.com/oauth/v2/auth`
    - Token URL: `https://accounts.zoho.com/oauth/v2/token` scopes: `Zeptomail.MailTemplates.UPDATE`
  - OAuth 2
    - Authorization code: `https://accounts.zoho.com/oauth/v2/auth`
    - Token URL: `https://accounts.zoho.com/oauth/v2/token` scopes: `Zeptomail.MailTemplates.ALL`

Update an existing email template in your CPaaS account.

## Path parameters

- `mailagent-alias` string, required
- `template-key` string, required

## Request body

- object
  - `htmlbody` string: HTML content of the email template.
  - `template_name` string: Display name of the email template.
  - `subject` string: Subject line of the email template.

## Response `200`

Template updated successfully.

- object
  - `data` object
    - `template_key` string
    - `template_name` string
  - `status` string

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/zoho/apis/zoho-cpaas.md) - [All operations](https://skmtc.dev/zoho/apis/zoho-cpaas/llms.txt) - [OpenAPI document](https://skmtc.dev/zoho/apis/zoho-cpaas/revisions/f0858a38e8b0?raw)
