---
title: "Update template"
method: PATCH
path: "/3.0/templates/{template_id}"
tags: ["templates"]
---

# Update template

`PATCH /3.0/templates/{template_id}`

## Request

- Base URL: `https://api.mailchimp.com`
- URL: `https://api.mailchimp.com/3.0/templates/{template_id}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://login.mailchimp.com/oauth2/authorize`
    - Token URL: `https://login.mailchimp.com/oauth2/token`
- TypeScript: <https://skmtc.dev/mailchimp/apis/mailchimp-api/docs/3.0/templates/:template_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update the name, HTML, or `folder_id` of an existing template.

## Path parameters

- `template_id` string, required

## Request body

- object: Information about a specific template.
  - `folder_id` string: The id of the folder the template is currently in.
  - `html` string: The raw HTML for the template. We support the Mailchimp [Template Language](https://mailchimp.com/help/getting-started-with-mailchimps-template-language/) in any HTML code passed via the API.
  - `name` string: The name of the template.

## Response `200`

- object: Information about a specific template.
  - `_links` object[]: A list of link types and descriptions for the API schema documents.
    - `href` string: This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
    - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD': The HTTP method that should be used when accessing the URL defined in 'href'.
    - `rel` string: As with an HTML 'rel' attribute, this describes the type of link.
    - `schema` string: For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
    - `targetSchema` string: For GETs, this is a URL representing the schema that the response should conform to.
  - `active` boolean: User templates are not 'deleted,' but rather marked as 'inactive.' Returns whether the template is still active.
  - `category` string: If available, the category the template is listed in.
  - `content_type` 'template' | 'multichannel' | 'html': How the template's content is put together.
  - `created_by` string: The login name for template's creator.
  - `date_created` string, date-time: The date and time the template was created in ISO 8601 format.
  - `date_edited` string, date-time: The date and time the template was edited in ISO 8601 format.
  - `drag_and_drop` boolean: Whether the template uses the drag and drop editor.
  - `edited_by` string: The login name who last edited the template.
  - `folder_id` string: The id of the folder the template is currently in.
  - `id` integer: The individual id for the template.
  - `name` string: The name of the template.
  - `responsive` boolean: Whether the template contains media queries to make it responsive.
  - `share_url` string: The URL used for [template sharing](https://mailchimp.com/help/share-a-template/).
  - `thumbnail` string: If available, the URL for a thumbnail of the template.
  - `type` string: The type of template (user, base, or gallery).

## Other responses

- `default`: An error generated by the Mailchimp API.

---

[API](https://skmtc.dev/mailchimp/apis/mailchimp-api.md) - [All operations](https://skmtc.dev/mailchimp/apis/mailchimp-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mailchimp/apis/mailchimp-api/revisions/53bf4b156855?raw)
