curl -X PUT https://api.usegately.com/api/v1/email/templates/tmpl_abc123 \
-H "Authorization: Bearer gately_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subject": "Welcome to {{project}} 👋",
"html_content": "<h1>Hey {{name}}, glad you are here!</h1>"
}'
const response = await fetch(
'https://api.usegately.com/api/v1/email/templates/tmpl_abc123',
{
method: 'PUT',
headers: {
'Authorization': 'Bearer gately_YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
subject: 'Welcome to {{project}} 👋',
html_content: '<h1>Hey {{name}}, glad you are here!</h1>',
}),
}
);
const updated = await response.json();
import requests
response = requests.put(
'https://api.usegately.com/api/v1/email/templates/tmpl_abc123',
headers={
'Authorization': 'Bearer gately_YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'subject': 'Welcome to {{project}} 👋',
'html_content': '<h1>Hey {{name}}, glad you are here!</h1>',
}
)
print(response.json())
{
"id": "tmpl_abc123",
"name": "Welcome Email",
"subject": "Welcome to {{project}} 👋",
"html_content": "<h1>Hey {{name}}, glad you are here!</h1>",
"category": "welcome",
"updated_at": "2026-08-18T14:00:00Z"
}
{
"error": "Template not found"
}
Transactional Email
Update Template
Update an existing email template. Send only the fields you want to change.
PUT
/
api
/
v1
/
email
/
templates
/
{id}
curl -X PUT https://api.usegately.com/api/v1/email/templates/tmpl_abc123 \
-H "Authorization: Bearer gately_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subject": "Welcome to {{project}} 👋",
"html_content": "<h1>Hey {{name}}, glad you are here!</h1>"
}'
const response = await fetch(
'https://api.usegately.com/api/v1/email/templates/tmpl_abc123',
{
method: 'PUT',
headers: {
'Authorization': 'Bearer gately_YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
subject: 'Welcome to {{project}} 👋',
html_content: '<h1>Hey {{name}}, glad you are here!</h1>',
}),
}
);
const updated = await response.json();
import requests
response = requests.put(
'https://api.usegately.com/api/v1/email/templates/tmpl_abc123',
headers={
'Authorization': 'Bearer gately_YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'subject': 'Welcome to {{project}} 👋',
'html_content': '<h1>Hey {{name}}, glad you are here!</h1>',
}
)
print(response.json())
{
"id": "tmpl_abc123",
"name": "Welcome Email",
"subject": "Welcome to {{project}} 👋",
"html_content": "<h1>Hey {{name}}, glad you are here!</h1>",
"category": "welcome",
"updated_at": "2026-08-18T14:00:00Z"
}
{
"error": "Template not found"
}
Headers
string
required
Bearer YOUR_API_KEYstring
required
application/jsonPath Parameters
string
required
The template ID to update.
Body
All fields are optional — only provided fields are updated.string
New template name.
string
New default subject line. Supports
{{variable}} syntax.string
New HTML body.
string
New plain text body.
string
New category. Values:
transactional, marketing, notification, welcome, custom.Response
Returns the updated template object.curl -X PUT https://api.usegately.com/api/v1/email/templates/tmpl_abc123 \
-H "Authorization: Bearer gately_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subject": "Welcome to {{project}} 👋",
"html_content": "<h1>Hey {{name}}, glad you are here!</h1>"
}'
const response = await fetch(
'https://api.usegately.com/api/v1/email/templates/tmpl_abc123',
{
method: 'PUT',
headers: {
'Authorization': 'Bearer gately_YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
subject: 'Welcome to {{project}} 👋',
html_content: '<h1>Hey {{name}}, glad you are here!</h1>',
}),
}
);
const updated = await response.json();
import requests
response = requests.put(
'https://api.usegately.com/api/v1/email/templates/tmpl_abc123',
headers={
'Authorization': 'Bearer gately_YOUR_API_KEY',
'Content-Type': 'application/json',
},
json={
'subject': 'Welcome to {{project}} 👋',
'html_content': '<h1>Hey {{name}}, glad you are here!</h1>',
}
)
print(response.json())
{
"id": "tmpl_abc123",
"name": "Welcome Email",
"subject": "Welcome to {{project}} 👋",
"html_content": "<h1>Hey {{name}}, glad you are here!</h1>",
"category": "welcome",
"updated_at": "2026-08-18T14:00:00Z"
}
{
"error": "Template not found"
}
Was this page helpful?
⌘I