Email Templates

Update Layout Template

Update email template with variable system

  • If MJML source is updated, recompiles to HTML
  • Creates new version (increments version number)
  • System templates cannot be modified
  • Template changes will affect future EmailContents using this template
  • Variables use {{variable_name}} syntax

🔐 Required Scopes: email:update

patch/api/v1/email-templates/{template_id}

Request

  • Base URL: https://api.sendseven.com
  • URL: https://api.sendseven.com/api/v1/email-templates/{template_id}
  • Auth: HTTP bearer

Path parameters

template_idstring required

Request body

namestring nullable
descriptionstring nullable
categorystring nullable
mjml_sourcestring nullable
color_paletteobject nullable
font_familystring nullable
thumbnail_urlstring nullable

Example request

{
  "category": "transactional",
  "description": "Updated description",
  "name": "Updated Template Name"
}

Response

Successful Response

idstring required
tenant_idstring required
namestring required
descriptionstring nullable required
categorystring nullable required
mjml_sourcestring required
html_compiledstring nullable required
color_paletteobject nullable required
font_familystring nullable required
thumbnail_urlstring nullable required
is_system_templateboolean required
versioninteger required
created_bystring nullable required
created_atstring date-time required
updated_atstring date-time required

Example response

{
  "category": "promotional",
  "color_palette": {
    "primary": "#0066CC"
  },
  "created_at": "2025-11-17T10:00:00Z",
  "created_by": "auth0|user123",
  "description": "Clean template with variable placeholders",
  "font_family": "Arial, sans-serif",
  "html_compiled": "<html>...</html>",
  "id": "template-123",
  "is_system_template": false,
  "mjml_source": "<mjml><mj-body><mj-text>{{hero_title}}</mj-text><mj-button href='{{cta_url}}'>{{cta_text}}</mj-button></mj-body></mjml>",
  "name": "Professional Newsletter Template",
  "tenant_id": "tenant-456",
  "thumbnail_url": "https://storage.example.com/templates/preview.png",
  "updated_at": "2025-11-17T10:00:00Z",
  "version": 1
}

Changes

No recorded changes to this operation across all 3 revisions of this API.