Docs
Content API
Email templates

Email Templates

Manage Handlebars-based email templates globally and create channel-specific overrides.

Get Email Templates

GET /marketing/email-templates

Request

Get a list of email templates.

Note

The /marketing/email-templates endpoints only work after opting into the new email management experience from your storeʼs control panel. You can opt-in by visiting Email Templates. If you have already opted in, visiting the Email Templates page will return a 404 error, and you will be able to access the new Transactional Emails page.

Authentication

  • X-Auth-Token in header
    required

Parameters

  • store_hash in path - string

example

Response

An array of email templates on the store

Body

object | application/json
  • data
    array[object]

    A collection of all email templates.

  • meta
    object

    Response metadata.

Example

Get an Email Template

GET /marketing/email-templates/{template-name}

Request

Get a single global email template or a channel-specific email template override.

Note

The /marketing/email-templates endpoints only work after opting into the new email management experience from your storeʼs control panel. You can opt-in by visiting Email Templates. If you have already opted in, visiting the Email Templates page will return a 404 error, and you will be able to access the new Transactional Emails page.

Authentication

  • X-Auth-Token in header
    required

Parameters

  • store_hash in path - string
  • template-name in path - string
    required

example

Response

OK

Body

object | application/json
  • data
    object

    Data for a particular email template

  • meta
    object

    Response metadata.

Example

Update a Template

PUT /marketing/email-templates/{template-name}

Request

Update a global template or create a channel-specific email template override.

Authentication

  • X-Auth-Token in header
    required

Parameters

  • store_hash in path - string
  • template-name in path - string
    required

Body

object | application/json

Data for a particular email template

  • type_id
    string

    Allowed: abandoned_cart_email | account_details_changed_email | combined_order_status_email | createaccount_email | createguestaccount_email | giftcertificate_email | invoice_email | ordermessage_notification | return_confirmation_email | return_statuschange_email | product_review_email | account_reset_password_email

    Example: account_reset_password_email
  • body
    string

    Example: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <p> {{lang "reset_password" name=store.name}} </p> <br/> <br/> <a href="{{account.reset_password_link}}"> {{account.reset_password_link}} </a> </body> </html>
  • translations
    array[object]

    A collection of locale translations for the static language.

  • subject
    string

    Example: Reset your password at {{store.name}}

Example

Response

OK

Body

object | application/json
  • data
    object

    Data for a particular email template

  • meta
    object

    Response metadata.

Example

Delete Email Template Override

DELETE /marketing/email-templates/{template-name}

Request

Removes a channel-specific email template override.

Authentication

  • X-Auth-Token in header
    required

Parameters

  • store_hash in path - string
  • template-name in path - string
    required

example

Response

OK

Did you find what you were looking for?