Email Notification Templates
Email notification templates set the subject and body of the email Zendesk sends when an AI agent comments on a ticket. Each account has one default template. Additional templates can be assigned to active brands, and a brand can belong to only one template.
These endpoints are available to admins when the email AI agents feature is available.
An account can store 50 templates. The subject is limited to 255 characters and the body to 5000 characters. Subject and body text can include Zendesk placeholders, such as {{ticket.title}} and {{ticket.latest_comment_html}}. Write requests are limited to 40 per minute for each account.
JSON format
Email Notification Templates are represented as JSON objects with the following properties:
| Name | Type | Read-only | Mandatory | Description |
|---|---|---|---|---|
| body | string | false | false | Email body. Maximum 5000 characters. May include Zendesk placeholders. |
| brand_ids | array | false | false | Active brand ids assigned to this template, returned as strings. A brand can belong to only one template. The default template is not assigned to brands. |
| created_at | string | true | false | When this template was created |
| default | boolean | true | false | Whether this template is the account default |
| default_body | string | true | false | The built-in default email body, before any customization. Present only on the default template. Use it to pre-fill a new template. |
| default_subject | string | true | false | The built-in default email subject, before any customization. Present only on the default template. Use it to pre-fill a new template. |
| id | string | true | false | The template id. The unsaved account default uses 0. After the default is saved, requests to id 0 still address that template, and the response id is the saved template's id. |
| subject | string | false | false | Email subject. Maximum 255 characters. May include Zendesk placeholders. |
| template_name | string | false | false | Display name of the template |
| updated_at | string | true | false | When this template was last updated |
| url | string | true | false | The API URL of this email notification template |
Example
{"body": "{{ticket.latest_comment_html}}","brand_ids": ["123456"],"created_at": "2026-09-03T23:25:19Z","default": false,"id": "01HQ6Z3DE28F34XBFCYH0SRM95","subject": "Re: {{ticket.title}}","template_name": "Brand AI Agent template","updated_at": "2026-09-03T23:25:19Z","url": "https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM95.json"}
List Email Notification Templates
GET /api/v2/email_notification_templates
Lists the account's email notification templates.
The unsaved default template, id 0, is included on the first page unless a saved template is already the default. Filtering by brand still includes that unsaved default when no saved default exists. When a saved default exists, it is omitted from a brand filter that does not match it, and id 0 is not added.
Saved templates are ordered by created_at descending unless sort says otherwise. Pages contain up to 100 saved templates. The unsaved default is not part of the cursor page, so the first page can contain one more record than page[size]. Later pages omit it.
meta and links are included when the request sends page[size], page[after], or page[before].
Pagination
Cursor pagination only. page[after] and page[before] cannot be used together. page[size] must be from 1 to 100.
Sorting
created_at, -created_at (default), updated_at, or -updated_at. Any other value uses the default order.
Allowed For
- Admins
Requires the "read" OAuth scope.
Returns 404 when the email AI agents feature is not available.
OAuth2 scopes
If using OAuth, requires one of the following OAuth scopes:
read
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| filter | object | Query | false | Limits the saved templates to those assigned to the given brands. |
| page | object | Query | false | Cursor pagination parameters. * page[size] — number of saved templates per page, from 1 to 100 * page[after] — cursor from a previous meta.after_cursor * page[before] — cursor from a previous meta.before_cursor |
| sort | string | Query | false | Sort field. Prefix with - for descending order. Supported values are created_at, -created_at, updated_at, and -updated_at. Allowed values are "created_at", "-created_at", "updated_at", or "-updated_at". |
Code Samples
curl
curl "https://{subdomain}.zendesk.com/api/v2/email_notification_templates?filter[brand_ids]=123456" \-H "Authorization: Bearer {access_token}"
Go
import ("fmt""io""net/http")func main() {url := "https://example.zendesk.com/api/v2/email_notification_templates?filter=&page=&sort=-created_at"method := "GET"req, err := http.NewRequest(method, url, nil)if err != nil {fmt.Println(err)return}req.Header.Add("Authorization", "Bearer ${authToken}")req.Header.Add("Content-Type", "application/json")client := &http.Client {}res, err := client.Do(req)if err != nil {fmt.Println(err)return}defer res.Body.Close()body, err := io.ReadAll(res.Body)if err != nil {fmt.Println(err)return}fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/email_notification_templates").newBuilder().addQueryParameter("filter", "").addQueryParameter("page", "").addQueryParameter("sort", "-created_at");Request request = new Request.Builder().url(urlBuilder.build()).method("GET", null).addHeader("Authorization", "Bearer ${authToken}").addHeader("Content-Type", "application/json").build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'GET',url: 'https://example.zendesk.com/api/v2/email_notification_templates',headers: {'Authorization': 'Bearer ${authToken}','Content-Type': 'application/json',},params: {'filter': '','page': '','sort': '-created_at',},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsurl = "https://example.zendesk.com/api/v2/email_notification_templates?filter=&page=&sort=-created_at"headers = {"Authorization": "Bearer ${authToken}","Content-Type": "application/json",}response = requests.request("GET",url,headers=headers)print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/email_notification_templates")uri.query = URI.encode_www_form("filter": "", "page": "", "sort": "-created_at")request = Net::HTTP::Get.new(uri, "Authorization": "Bearer ${authToken}", "Content-Type": "application/json")response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
Example response(s)
200 OK
// Status 200 OK{"email_notification_templates": [{"body": "{{ticket.latest_comment_html}}","brand_ids": [],"created_at": "2026-09-03T23:25:19Z","default": true,"default_body": "{{ticket.latest_comment_html}}","default_subject": "[{{ticket.account}}] Re: {{ticket.title}}","id": "0","subject": "[{{ticket.account}}] Re: {{ticket.title}}","template_name": "Default AI Agent template","updated_at": "2026-09-03T23:25:19Z","url": "https://example.zendesk.com/api/v2/email_notification_templates/0.json"},{"body": "{{ticket.latest_comment_html}}","brand_ids": ["123456"],"created_at": "2026-09-03T23:25:19Z","default": false,"id": "01HY1GPZVDQAQK3CKWD3MFPX7Z","subject": "Re: {{ticket.title}}","template_name": "Brand AI Agent template","updated_at": "2026-09-03T23:25:19Z","url": "https://example.zendesk.com/api/v2/email_notification_templates/01HY1GPZVDQAQK3CKWD3MFPX7Z.json"}]}
400 Bad Request
// Status 400 Bad Request{"description": "page[size] must be between 1 and 100","error": "InvalidPaginationParameter"}
404 Not Found
// Status 404 Not Found{"error": {"message": "You’ve reached this page because what you were looking for does not exist or there’s been an error.","title": "Not Found"}}
Show Email Notification Template
GET /api/v2/email_notification_templates/{email_notification_template_id}
Returns one email notification template.
Allowed For
- Admins
Requires the "read" OAuth scope.
A missing id returns 404 with an empty body. When the email AI agents feature is not available, the response includes an error object.
OAuth2 scopes
If using OAuth, requires one of the following OAuth scopes:
read
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| email_notification_template_id | string | Path | true | The template id. Use 0 for the account default. Before the default is saved, 0 returns the built-in template and the response id is 0. After it is saved, 0 still addresses that template and the response id is the saved template's id. |
Code Samples
curl
curl https://{subdomain}.zendesk.com/api/v2/email_notification_templates/{email_notification_template_id} \-H "Authorization: Bearer {access_token}"
Go
import ("fmt""io""net/http")func main() {url := "https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94"method := "GET"req, err := http.NewRequest(method, url, nil)if err != nil {fmt.Println(err)return}req.Header.Add("Authorization", "Bearer ${authToken}")req.Header.Add("Content-Type", "application/json")client := &http.Client {}res, err := client.Do(req)if err != nil {fmt.Println(err)return}defer res.Body.Close()body, err := io.ReadAll(res.Body)if err != nil {fmt.Println(err)return}fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94").newBuilder();Request request = new Request.Builder().url(urlBuilder.build()).method("GET", null).addHeader("Authorization", "Bearer ${authToken}").addHeader("Content-Type", "application/json").build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'GET',url: 'https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94',headers: {'Authorization': 'Bearer ${authToken}','Content-Type': 'application/json',},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsurl = "https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94"headers = {"Authorization": "Bearer ${authToken}","Content-Type": "application/json",}response = requests.request("GET",url,headers=headers)print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94")request = Net::HTTP::Get.new(uri, "Authorization": "Bearer ${authToken}", "Content-Type": "application/json")response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
Example response(s)
200 OK
// Status 200 OK{"email_notification_template": {"body": "{{ticket.latest_comment_html}}","brand_ids": ["123456"],"created_at": "2026-09-03T23:25:19Z","default": false,"id": "01HQ6Z3DE28F34XBFCYH0SRM95","subject": "Re: {{ticket.title}}","template_name": "Brand AI Agent template","updated_at": "2026-09-04T15:10:00Z","url": "https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM95.json"}}
404 Not Found
// Status 404 Not Found{"error": {"message": "You’ve reached this page because what you were looking for does not exist or there’s been an error.","title": "Not Found"}}
Show Many Email Notification Templates
GET /api/v2/email_notification_templates/show_many
Returns saved email notification templates by id or by brand id.
Send ids or brand_ids. When both are present, ids is used. This endpoint does not add the unsaved default template.
Pagination
Cursor pagination only. page[after] and page[before] cannot be used together. page[size] must be from 1 to 100. Saved templates are ordered by created_at descending unless sort says otherwise.
meta and links are included when the request sends page[size], page[after], or page[before].
Allowed For
- Admins
Requires the "read" OAuth scope.
Returns 404 when the email AI agents feature is not available.
OAuth2 scopes
If using OAuth, requires one of the following OAuth scopes:
read
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| brand_ids | string | Query | false | Comma-separated brand ids. Required when ids is omitted. |
| ids | string | Query | false | Comma-separated template ids. Required when brand_ids is omitted. Takes precedence when both are sent. |
| page | object | Query | false | Cursor pagination parameters. * page[size] — number of templates per page, from 1 to 100 * page[after] — cursor from a previous meta.after_cursor * page[before] — cursor from a previous meta.before_cursor |
| sort | string | Query | false | Sort field. Prefix with - for descending order. Supported values are created_at, -created_at, updated_at, and -updated_at. Allowed values are "created_at", "-created_at", "updated_at", or "-updated_at". |
Code Samples
curl
curl "https://{subdomain}.zendesk.com/api/v2/email_notification_templates/show_many?ids=01HQ6Z3DE28F34XBFCYH0SRM95" \-H "Authorization: Bearer {access_token}"
Go
import ("fmt""io""net/http")func main() {url := "https://example.zendesk.com/api/v2/email_notification_templates/show_many?brand_ids=123456%2C654321&ids=01HQ6Z3DE28F34XBFCYH0SRM95%2C01HY1GPZVDQAQK3CKWD3MFPX7Z&page=&sort=-created_at"method := "GET"req, err := http.NewRequest(method, url, nil)if err != nil {fmt.Println(err)return}req.Header.Add("Authorization", "Bearer ${authToken}")req.Header.Add("Content-Type", "application/json")client := &http.Client {}res, err := client.Do(req)if err != nil {fmt.Println(err)return}defer res.Body.Close()body, err := io.ReadAll(res.Body)if err != nil {fmt.Println(err)return}fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/email_notification_templates/show_many").newBuilder().addQueryParameter("brand_ids", "123456,654321").addQueryParameter("ids", "01HQ6Z3DE28F34XBFCYH0SRM95,01HY1GPZVDQAQK3CKWD3MFPX7Z").addQueryParameter("page", "").addQueryParameter("sort", "-created_at");Request request = new Request.Builder().url(urlBuilder.build()).method("GET", null).addHeader("Authorization", "Bearer ${authToken}").addHeader("Content-Type", "application/json").build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'GET',url: 'https://example.zendesk.com/api/v2/email_notification_templates/show_many',headers: {'Authorization': 'Bearer ${authToken}','Content-Type': 'application/json',},params: {'brand_ids': '123456%2C654321','ids': '01HQ6Z3DE28F34XBFCYH0SRM95%2C01HY1GPZVDQAQK3CKWD3MFPX7Z','page': '','sort': '-created_at',},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsurl = "https://example.zendesk.com/api/v2/email_notification_templates/show_many?brand_ids=123456%2C654321&ids=01HQ6Z3DE28F34XBFCYH0SRM95%2C01HY1GPZVDQAQK3CKWD3MFPX7Z&page=&sort=-created_at"headers = {"Authorization": "Bearer ${authToken}","Content-Type": "application/json",}response = requests.request("GET",url,headers=headers)print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/email_notification_templates/show_many")uri.query = URI.encode_www_form("brand_ids": "123456,654321", "ids": "01HQ6Z3DE28F34XBFCYH0SRM95,01HY1GPZVDQAQK3CKWD3MFPX7Z", "page": "", "sort": "-created_at")request = Net::HTTP::Get.new(uri, "Authorization": "Bearer ${authToken}", "Content-Type": "application/json")response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
Example response(s)
200 OK
// Status 200 OK{"email_notification_templates": [{"body": "{{ticket.latest_comment_html}}","brand_ids": ["123456"],"created_at": "2026-09-03T23:25:19Z","default": false,"id": "01HQ6Z3DE28F34XBFCYH0SRM95","subject": "Re: {{ticket.title}}","template_name": "Brand AI Agent template","updated_at": "2026-09-03T23:25:19Z","url": "https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM95.json"}]}
400 Bad Request
// Status 400 Bad Request{"description": "Parameter ids or brand_ids is required","error": "ParameterMissing"}
404 Not Found
// Status 404 Not Found{"error": {"message": "You’ve reached this page because what you were looking for does not exist or there’s been an error.","title": "Not Found"}}
Create Email Notification Template
POST /api/v2/email_notification_templates
Creates an email notification template.
template_name, subject, and body are required. brand_ids is optional. Each id must be an active brand on the account, and a brand can belong to only one template.
reassign_brands
Optional query parameter, separate from the email_notification_template object. Send reassign_brands=true to move brands.
When true, each brand in brand_ids that already belongs to another template is removed from that template and assigned to this one. Brands on the source template that are not in brand_ids stay assigned to it.
When false or omitted, a brand that already belongs to another template is rejected.
Missing, inactive, and deleted brands are rejected either way.
An account can store 50 templates. The subject is limited to 255 characters and the body to 5000 characters.
Allowed For
- Admins
Requires the "write" OAuth scope.
Rate limit
40 write requests per minute for each account. A limited request returns 429 and a Retry-After header.
Returns 404 when the email AI agents feature is not available.
OAuth2 scopes
If using OAuth, requires one of the following OAuth scopes:
write
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| reassign_brands | boolean | Query | false | When true, brands in brand_ids that already belong to another template are moved onto this template. When false or omitted, those brands are rejected. Missing, inactive, and deleted brands are rejected either way. |
Example body
{"email_notification_template": {"body": "{{ticket.latest_comment_html}}","brand_ids": ["123456"],"subject": "Re: {{ticket.title}}","template_name": "Brand AI Agent template"}}
Code Samples
curl
curl "https://{subdomain}.zendesk.com/api/v2/email_notification_templates?reassign_brands=true" \-H "Content-Type: application/json" -X POST \-d '{"email_notification_template": {"template_name": "Brand AI Agent template", "subject": "Re: {{ticket.title}}", "body": "{{ticket.latest_comment_html}}", "brand_ids": ["123456"]}}' \-H "Authorization: Bearer {access_token}"
Go
import ("fmt""io""net/http""strings")func main() {url := "https://example.zendesk.com/api/v2/email_notification_templates?reassign_brands=true"method := "POST"payload := strings.NewReader(`{"email_notification_template": {"body": "{{ticket.latest_comment_html}}","brand_ids": ["123456"],"subject": "Re: {{ticket.title}}","template_name": "Brand AI Agent template"}}`)req, err := http.NewRequest(method, url, payload)if err != nil {fmt.Println(err)return}req.Header.Add("Authorization", "Bearer ${authToken}")req.Header.Add("Content-Type", "application/json")client := &http.Client {}res, err := client.Do(req)if err != nil {fmt.Println(err)return}defer res.Body.Close()body, err := io.ReadAll(res.Body)if err != nil {fmt.Println(err)return}fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/email_notification_templates").newBuilder().addQueryParameter("reassign_brands", "true");RequestBody body = RequestBody.create(MediaType.parse("application/json"),"""{\"email_notification_template\": {\"body\": \"{{ticket.latest_comment_html}}\",\"brand_ids\": [\"123456\"],\"subject\": \"Re: {{ticket.title}}\",\"template_name\": \"Brand AI Agent template\"}}""");Request request = new Request.Builder().url(urlBuilder.build()).method("POST", body).addHeader("Authorization", "Bearer ${authToken}").addHeader("Content-Type", "application/json").build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var data = JSON.stringify({"email_notification_template": {"body": "{{ticket.latest_comment_html}}","brand_ids": ["123456"],"subject": "Re: {{ticket.title}}","template_name": "Brand AI Agent template"}});var config = {method: 'POST',url: 'https://example.zendesk.com/api/v2/email_notification_templates',headers: {'Authorization': 'Bearer ${authToken}','Content-Type': 'application/json',},params: {'reassign_brands': 'true',},data : data,};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsimport jsonurl = "https://example.zendesk.com/api/v2/email_notification_templates?reassign_brands=true"payload = json.loads("""{"email_notification_template": {"body": "{{ticket.latest_comment_html}}","brand_ids": ["123456"],"subject": "Re: {{ticket.title}}","template_name": "Brand AI Agent template"}}""")headers = {"Authorization": "Bearer ${authToken}","Content-Type": "application/json",}response = requests.request("POST",url,headers=headers,json=payload)print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/email_notification_templates")uri.query = URI.encode_www_form("reassign_brands": "true")request = Net::HTTP::Post.new(uri, "Authorization": "Bearer ${authToken}", "Content-Type": "application/json")request.body = %q({"email_notification_template": {"body": "{{ticket.latest_comment_html}}","brand_ids": ["123456"],"subject": "Re: {{ticket.title}}","template_name": "Brand AI Agent template"}})response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
Example response(s)
201 Created
// Status 201 Created{"email_notification_template": {"body": "{{ticket.latest_comment_html}}","brand_ids": ["123456"],"created_at": "2026-09-03T23:25:19Z","default": false,"id": "01HQ6Z3DE28F34XBFCYH0SRM95","subject": "Re: {{ticket.title}}","template_name": "Brand AI Agent template","updated_at": "2026-09-03T23:25:19Z","url": "https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM95.json"}}
404 Not Found
// Status 404 Not Found{"error": {"message": "You’ve reached this page because what you were looking for does not exist or there’s been an error.","title": "Not Found"}}
422 Unprocessable Entity
// Status 422 Unprocessable Entity{"description": "Record validation errors","details": {"base": ["Invalid subject. Subject must not exceed 255 characters."]},"error": "RecordInvalid"}
429 Too Many Requests
// Status 429 Too Many Requests{"description": "Rate limit for Email Notification Templates write requests threshold of 40 tries per 60 seconds exceeded","error": "TooManyRequests"}
Update Email Notification Template
PUT /api/v2/email_notification_templates/{email_notification_template_id}
Updates an email notification template. Omitted template_name, subject, and body values stay as they are.
Omit brand_ids to keep the current brand assignments. Send an empty array or null to remove every brand.
reassign_brands
Optional query parameter, separate from the email_notification_template object. Send reassign_brands=true to move brands.
When true, each brand in brand_ids that already belongs to another template is removed from that template and assigned to this one. Brands on the source template that are not in brand_ids stay assigned to it.
When false or omitted, a brand that already belongs to another template is rejected.
Missing, inactive, and deleted brands are rejected either way.
Updating id 0 creates the account default when none has been saved, or updates the saved default. That request ignores brand_ids and reassign_brands. The response is the saved template, with default true and an id.
Allowed For
- Admins
Requires the "write" OAuth scope.
Rate limit
40 write requests per minute for each account. A limited request returns 429 and a Retry-After header.
OAuth2 scopes
If using OAuth, requires one of the following OAuth scopes:
write
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| reassign_brands | boolean | Query | false | When true, brands in brand_ids that already belong to another template are moved onto this template. When false or omitted, those brands are rejected. Missing, inactive, and deleted brands are rejected either way. Ignored when the id is 0. |
| email_notification_template_id | string | Path | true | The template id. Use 0 for the account default. Before the default is saved, 0 returns the built-in template and the response id is 0. After it is saved, 0 still addresses that template and the response id is the saved template's id. |
Example body
{"email_notification_template": {"body": "{{ticket.latest_comment_html}}","brand_ids": ["654321"],"subject": "Updated: {{ticket.title}}","template_name": "Brand AI Agent template"}}
Code Samples
curl
curl "https://{subdomain}.zendesk.com/api/v2/email_notification_templates/{email_notification_template_id}?reassign_brands=true" \-H "Content-Type: application/json" -X PUT \-d '{"email_notification_template": {"subject": "Updated: {{ticket.title}}", "brand_ids": ["654321"]}}' \-H "Authorization: Bearer {access_token}"
Go
import ("fmt""io""net/http""strings")func main() {url := "https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94?reassign_brands=true"method := "PUT"payload := strings.NewReader(`{"email_notification_template": {"body": "{{ticket.latest_comment_html}}","brand_ids": ["654321"],"subject": "Updated: {{ticket.title}}","template_name": "Brand AI Agent template"}}`)req, err := http.NewRequest(method, url, payload)if err != nil {fmt.Println(err)return}req.Header.Add("Authorization", "Bearer ${authToken}")req.Header.Add("Content-Type", "application/json")client := &http.Client {}res, err := client.Do(req)if err != nil {fmt.Println(err)return}defer res.Body.Close()body, err := io.ReadAll(res.Body)if err != nil {fmt.Println(err)return}fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94").newBuilder().addQueryParameter("reassign_brands", "true");RequestBody body = RequestBody.create(MediaType.parse("application/json"),"""{\"email_notification_template\": {\"body\": \"{{ticket.latest_comment_html}}\",\"brand_ids\": [\"654321\"],\"subject\": \"Updated: {{ticket.title}}\",\"template_name\": \"Brand AI Agent template\"}}""");Request request = new Request.Builder().url(urlBuilder.build()).method("PUT", body).addHeader("Authorization", "Bearer ${authToken}").addHeader("Content-Type", "application/json").build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var data = JSON.stringify({"email_notification_template": {"body": "{{ticket.latest_comment_html}}","brand_ids": ["654321"],"subject": "Updated: {{ticket.title}}","template_name": "Brand AI Agent template"}});var config = {method: 'PUT',url: 'https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94',headers: {'Authorization': 'Bearer ${authToken}','Content-Type': 'application/json',},params: {'reassign_brands': 'true',},data : data,};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsimport jsonurl = "https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94?reassign_brands=true"payload = json.loads("""{"email_notification_template": {"body": "{{ticket.latest_comment_html}}","brand_ids": ["654321"],"subject": "Updated: {{ticket.title}}","template_name": "Brand AI Agent template"}}""")headers = {"Authorization": "Bearer ${authToken}","Content-Type": "application/json",}response = requests.request("PUT",url,headers=headers,json=payload)print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94")uri.query = URI.encode_www_form("reassign_brands": "true")request = Net::HTTP::Put.new(uri, "Authorization": "Bearer ${authToken}", "Content-Type": "application/json")request.body = %q({"email_notification_template": {"body": "{{ticket.latest_comment_html}}","brand_ids": ["654321"],"subject": "Updated: {{ticket.title}}","template_name": "Brand AI Agent template"}})response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
Example response(s)
200 OK
// Status 200 OK{"email_notification_template": {"body": "{{ticket.latest_comment_html}}","brand_ids": ["654321"],"created_at": "2026-09-03T23:25:19Z","default": false,"id": "01HQ6Z3DE28F34XBFCYH0SRM95","subject": "Updated: {{ticket.title}}","template_name": "Brand AI Agent template","updated_at": "2026-09-04T15:10:00Z","url": "https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM95.json"}}
404 Not Found
// Status 404 Not Found{"error": {"message": "You’ve reached this page because what you were looking for does not exist or there’s been an error.","title": "Not Found"}}
422 Unprocessable Entity
// Status 422 Unprocessable Entity{"description": "Record validation errors","details": {"base": ["Invalid subject. Subject must not exceed 255 characters."]},"error": "RecordInvalid"}
429 Too Many Requests
// Status 429 Too Many Requests{"description": "Rate limit for Email Notification Templates write requests threshold of 40 tries per 60 seconds exceeded","error": "TooManyRequests"}
Delete Email Notification Template
DELETE /api/v2/email_notification_templates/{email_notification_template_id}
Deletes an email notification template and its brand assignments.
Id 0 cannot be deleted. After the default has been saved, delete that saved template with its id. The account then falls back to the built-in default.
Allowed For
- Admins
Requires the "write" OAuth scope.
Rate limit
40 write requests per minute for each account. A limited request returns 429 and a Retry-After header.
OAuth2 scopes
If using OAuth, requires one of the following OAuth scopes:
write
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| email_notification_template_id | string | Path | true | The template id. Use 0 for the account default. Before the default is saved, 0 returns the built-in template and the response id is 0. After it is saved, 0 still addresses that template and the response id is the saved template's id. |
Code Samples
curl
curl https://{subdomain}.zendesk.com/api/v2/email_notification_templates/{email_notification_template_id} \-H "Authorization: Bearer {access_token}" -X DELETE
Go
import ("fmt""io""net/http")func main() {url := "https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94"method := "DELETE"req, err := http.NewRequest(method, url, nil)if err != nil {fmt.Println(err)return}req.Header.Add("Authorization", "Bearer ${authToken}")req.Header.Add("Content-Type", "application/json")client := &http.Client {}res, err := client.Do(req)if err != nil {fmt.Println(err)return}defer res.Body.Close()body, err := io.ReadAll(res.Body)if err != nil {fmt.Println(err)return}fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94").newBuilder();Request request = new Request.Builder().url(urlBuilder.build()).method("DELETE", null).addHeader("Authorization", "Bearer ${authToken}").addHeader("Content-Type", "application/json").build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'DELETE',url: 'https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94',headers: {'Authorization': 'Bearer ${authToken}','Content-Type': 'application/json',},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsurl = "https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94"headers = {"Authorization": "Bearer ${authToken}","Content-Type": "application/json",}response = requests.request("DELETE",url,headers=headers)print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/email_notification_templates/01HQ6Z3DE28F34XBFCYH0SRM94")request = Net::HTTP::Delete.new(uri, "Authorization": "Bearer ${authToken}", "Content-Type": "application/json")response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
Example response(s)
204 No Content
// Status 204 No Contentnull
404 Not Found
// Status 404 Not Found{"error": {"message": "You’ve reached this page because what you were looking for does not exist or there’s been an error.","title": "Not Found"}}
422 Unprocessable Entity
// Status 422 Unprocessable Entity{"description": "The default email notification template cannot be deleted","error": "InvalidRequest"}
429 Too Many Requests
// Status 429 Too Many Requests{"description": "Rate limit for Email Notification Templates write requests threshold of 40 tries per 60 seconds exceeded","error": "TooManyRequests"}