For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
  • Overview
    • Quick Start
    • Sandboxes
    • Tools & SDKs
    • Support
  • Docs
      • Getting Started
          • Overview
          • Examples
    • Archive
    • Closed Beta Programs
Dev Portal
LogoLogo
On this page
  • Editing
  • API
  • Overrides
  • Resources
DocsAdminStore ConfigurationEmails

Email Templates Overview

Was this page helpful?
Previous

Editing packing slips

Next

Global Email Template Object

Built with

This article provides an overview of BigCommerce’s transactional email templates and API.

Editing

To edit transactional email templates in a store’s control panel, log in and navigate to Marketing › Transactional Emails.

Use Handlebars expressions to localize email templates and access dynamic data (like a customer’s first name in an order email).

Combined order status email template
<p>{{ lang 'hello' name=order.customer_name }}. Below are the products you ordered.</p>
{{#each order.products}}
<tr>
<td style="padding:5px; font-size:12px; border-bottom:solid 1px #CACACA"><strong>{{ name }}</strong></td>
<td style="padding:5px; font-size:12px; border-bottom:solid 1px #CACACA" width="100" align="center">{{#if sku }}{{ sku }}{{else}}&nbsp;{{/if}}</td>
<td style="padding:5px; font-size:12px; border-bottom:solid 1px #CACACA" width="100" align="center">{{ quantity }}</td>
</tr>
{{/each}}

Learn how to edit, test, and preview transactional email templates in the control panel.

Saving an email template that exceeds 65,536 characters returns an “Email body too large” error message and truncates extra characters.

API

To manage transactional email templates programmatically, use the Email Templates API. For example, to get a list of email templates, send a GET request to /v3/marketing/email-templates.

Request
Response
Example request: Get email templates
1GET https://api.bigcommerce.com/stores/{{STORE_HASH}}/v3/marketing/email-templates
2X-Auth-Token: {{ACCESS_TOKEN}}
3Accept: application/json

To update an email template, send a PUT request to /v3/marketing/email-templates/{template-name}.

Example request: Update an email template
PUT /stores/{{STORE_HASH}}/v3/marketing/email-templates/account_reset_password_email
Host: api.bigcommerce.com
X-Auth-Token: {{ACCESS_TOKEN}}
Content-Type: application/json
Accept: application/json
{
"type_id": "account_reset_password_email",
"body": "<!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": [
{
"locale": "en",
"keys": {
"reset_password": "To change your customer account password at {name} please click this link or copy and paste it into your browser:"
}
}
],
"subject": "Reset your password at {{store.name}}"
}

Overrides

Pass in a channel’s ID using the ?channel_id= query parameter to create a channel-specific override for a transactional email template.

Example request: Update an email template
PUT https://api.bigcommerce.com/stores/{{STORE_HASH}}/v3/marketing/email-templates?channel_id=123
X-Auth-Token: {{ACCESS_TOKEN}}
Content-Type: application/json
Accept: application/json
{
"type_id": "account_reset_password_email",
"body": "<!DOCTYPE html> <html lang=\"fr\"> <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": [
{
"locale": "fr",
"keys": {
"reset_password": "Pour modifier le mot de passe de votre compte client à {name}, veuillez cliquer sur ce lien ou le copier et le coller dans votre navigateur:"
}
}
],
"subject": "Réinitialisez votre mot de passe sur {{store.name}}"
}

Omit ?channel_id to interact with global email templates.

Resources

  • Email Template API Reference
  • Email object reference
  • Customizing Email Templates