---
title: "Update a template"
method: PATCH
path: "/template"
tags: ["Template API"]
---

# Update a template

`PATCH /template`

## Request

- Base URL: `https://emailapi.netcorecloud.net/v5.1`
- URL: `https://emailapi.netcorecloud.net/v5.1/template`
- Auth: API key in header `api_key`

Update template name and/or template content stored in the Netcore CPaaS dashboard.

Pass the template_id and only the fields you want to change.

## Headers

- `api_key` string, required

## Request body

- object
  - `template_id` integer, required: Add the template ID you want to update.
  - `template_name` string: Add a new template name if you want to rename the template.
  - `content` object[]: Add updated content blocks to replace the existing template content.
    - `type` string: Choose content format — html or amp.
    - `value` string: Add the updated template body content.

## Response `200`

Template updated successfully

- object
  - `data` object
    - `template_id` integer
    - `template_name` string
  - `message` string
  - `status` string

## Other responses

- `400`: Bad request
- `401`: Unauthorized

---

[API](https://skmtc.dev/netcorecloud/apis/email-api-v5.md) - [All operations](https://skmtc.dev/netcorecloud/apis/email-api-v5/llms.txt) - [OpenAPI document](https://skmtc.dev/netcorecloud/apis/email-api-v5/revisions/7f81d8722ba3?raw)
