Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

Update an existing template

PATCH/templates/{id}Update an existing template

Parameters

idstringpathrequired

The Template ID or alias.

Request body

application/json
objectUpdateTemplateOptions
aliasstring

The alias of the template.

fromstring

Sender email address. To include a friendly name, use the format "Your Name <sender@domain.com>".

htmlstring

The HTML version of the template.

namestring

The name of the template.

reply_toarray of string

Reply-to email addresses.

Show child attributes
subjectstring

Email subject.

textstring

The plain text version of the template.

variablesarray of object
Show child attributes
Show array items
fallback_valuevalue

The fallback value of the variable.

Show child attributes
oneOf · 5 options
Option 1string
Option 2number
Option 3boolean
Option 4object
Option 5array of value
keystringrequired

The key of the variable.

typestringrequired

The type of the variable.

one of "string", "number", "boolean", "object", "list"

Example request
{
  "alias": "string",
  "from": "string",
  "html": "string",
  "name": "string",
  "reply_to": [
    "string"
  ],
  "subject": "string",
  "text": "string",
  "variables": [
    {
      "fallback_value": "string",
      "key": "string",
      "type": "boolean"
    }
  ]
}

Responses

200OKapplication/json
objectUpdateTemplateResponseSuccess
idstring

The ID of the template.

objectstring

The object type of the response.

Example response
{
  "id": "string",
  "object": "template"
}
Documentation menu