Skip to main content
PATCH
/
v1
/
templates
/
{id}
Update Template
curl --request PATCH \
  --url https://api.example.com/v1/templates/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "subject": "<string>",
  "html": "<string>",
  "text": "<string>"
}
'
id
string
required
The ID of the template.
name
string
A new name for the template.
subject
string
A new subject line.
html
string
New HTML body content.
text
string
New plain text body content.

Request

cURL
curl -X PATCH https://www.unosend.co/api/v1/templates/tpl_abc123 \
  -H "Authorization: Bearer un_xxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "Welcome aboard, {{first_name}}!"
  }'

Response

200
{
  "id": "tpl_abc123",
  "name": "Welcome Email",
  "subject": "Welcome aboard, {{first_name}}!",
  "html": "<h1>Welcome, {{first_name}}!</h1><p>Thanks for joining {{company_name}}.</p>"
}