Update a template
PUT
/templates/{id}
const url = 'https://mail.teamander.com/v1/templates/a1b2c3d4-e5f6-7890-abcd-ef1234567890';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"subject_template":"Updated subject {{company}}"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://mail.teamander.com/v1/templates/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "subject_template": "Updated subject {{company}}" }'Partial update; each save creates a new template version.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
Resource identifier
string
Example
a1b2c3d4-e5f6-7890-abcd-ef1234567890Request Body
Section titled “Request Body”Media typeapplication/json
object
name
string
subject_template
string
mjml_source
string
design_json
object
schema_version
required
integer
theme
object
backgroundColor
required
string
contentBackgroundColor
required
string
fontFamily
required
string
linkColor
required
string
width
required
string
blocks
required
Array
One of:
object
id
required
string
type
required
string
html
required
string
align
required
string
color
string
object
id
required
string
type
required
string
label
required
string
href
required
string
align
required
string
backgroundColor
string
color
string
object
id
required
string
type
required
string
src
required
string
alt
required
string
href
string
width
string
align
required
string
object
id
required
string
type
required
string
color
string
object
id
required
string
type
required
string
height
required
integer
object
id
required
string
type
required
string
align
required
string
networks
required
Array<object>
object
name
required
string
href
required
string
object
id
required
string
type
required
string
html
required
string
unsubscribeUrl
string
object
id
required
string
type
required
string
columns
required
Array<object>
object
blocks
required
Array
One of:
object
id
required
string
type
required
string
html
required
string
align
required
string
color
string
object
id
required
string
type
required
string
label
required
string
href
required
string
align
required
string
backgroundColor
string
color
string
object
id
required
string
type
required
string
src
required
string
alt
required
string
href
string
width
string
align
required
string
object
id
required
string
type
required
string
color
string
object
id
required
string
type
required
string
height
required
integer
object
id
required
string
type
required
string
align
required
string
networks
required
Array<object>
object
name
required
string
href
required
string
object
id
required
string
type
required
string
html
required
string
unsubscribeUrl
string
html
string
text_body
string
variables
object
key
additional properties
string
Example
{ "subject_template": "Updated subject {{company}}"}Responses
Section titled “Responses”Updated
Media typeapplication/json
object
id
required
string
version
required
integer
status
required
string
compiled_html
string
warnings
Array<string>
variables
object
key
additional properties
string
Example
{ "id": "receipt", "version": 2, "status": "updated"}Validation failed
Media typeapplication/json
object
error
required
string
details
object
key
additional properties
Example
{ "error": "Validation failed", "details": {}}Missing or invalid API key
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "Invalid API key"}