Email Templates
Manage Handlebars-based email templates globally and create channel-specific overrides.
Get Email Templates
GET /stores/{store_hash}/v3/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 headerrequired
Parameters
- store_hash in path - string
- channel_id in query - integer
Channel ID to use for channel-specific settings. If omitted, you will interact with the global setting only.
example
Response
An array of email templates on the store
Body
dataarray[object]
A collection of all email templates.
metaobject
Response metadata.
Example
Get an Email Template
GET /stores/{store_hash}/v3/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 headerrequired
Parameters
- store_hash in path - string
- template-name in path - stringrequired
- channel_id in query - integer
Channel ID to use for channel-specific settings. If omitted, you will interact with the global setting only.
example
Response
OK
Body
dataobject
Data for a particular email template
metaobject
Response metadata.
Example
Update a Template
PUT /stores/{store_hash}/v3/marketing/email-templates/{template-name}
Request
Update a global template or create a channel-specific email template override.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- template-name in path - stringrequired
- Content-Type in header with default of application/json - stringrequired
The MIME type of the request body.
- channel_id in query - integer
Channel ID to use for channel-specific settings. If omitted, you will interact with the global setting only.
Body
Data for a particular email template
type_idstring
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
bodystring
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>
translationsarray[object]
A collection of locale translations for the static language.
subjectstring
Example: Reset your password at {{store.name}}
Example
Response
OK
Body
dataobject
Data for a particular email template
metaobject
Response metadata.
Example
Delete Email Template Override
DELETE /stores/{store_hash}/v3/marketing/email-templates/{template-name}
Request
Removes a channel-specific email template override.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- template-name in path - stringrequired
- channel_id in query - integerrequired
Required Channel ID. This delete operation will delete overridden settings for this channel, thus restoring them to the global defaults.
example
Response
OK