BigCommerce Email Templates API

The Email Templates API from BigCommerce — 2 operation(s) for email templates.

Documentation

📖
Documentation
https://developer.bigcommerce.com/
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/abandoned-carts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/carts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/brands
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/categories
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/category-trees
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/product-modifiers
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/product-variant-options
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/product-variants
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/products
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/channels
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/checkouts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-content/store-content
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/currencies
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/customers
📖
APIReference
https://developer.bigcommerce.com/docs/rest-content/email-templates
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/geography
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/orders
📖
APIReference
https://developer.bigcommerce.com/docs/rest-content/pages
📖
APIReference
https://developer.bigcommerce.com/docs/rest-payments/tokens
📖
APIReference
https://developer.bigcommerce.com/docs/rest-payments/methods-deprecated
📖
APIReference
https://developer.bigcommerce.com/docs/rest-payments/processing
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/settings
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/shipping-v2
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/channels/site
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/store-information
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/carts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/checkouts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/customers
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/orders
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/subscriptions
📖
APIReference
https://developer.bigcommerce.com/docs/integrations/webhooks
📖
APIReference
https://developer.bigcommerce.com/docs/rest-content/widgets

Specifications

Other Resources

OpenAPI Specification

bigcommerce-email-templates-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: BigCommerce Abandoned Cart Emails Email Templates API
  version: 3.0.0
  termsOfService: https://www.bigcommerce.com/terms
  description: Abandoned Cart Emails V3 API managing Handlebars-based emails.
  contact:
    name: BigCommerce
    url: https://www.bigcommerce.com
    email: support@bigcommerce.com
servers:
- url: https://api.bigcommerce.com/stores/{store_hash}/v3
  variables:
    store_hash:
      default: store_hash
      description: Permanent ID of the BigCommerce store.
  description: BigCommerce API Gateway
security:
- X-Auth-Token: []
tags:
- name: Email Templates
paths:
  /marketing/email-templates:
    parameters:
    - $ref: '#/components/parameters/Accept'
    get:
      summary: BigCommerce Get Email Templates
      description: '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.'
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/EmailTemplatesCollection'
                  meta:
                    type: object
                    properties: {}
                    additionalProperties: true
                    description: Response metadata.
              examples:
                Example:
                  value:
                    data:
                    - 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}}
                    meta: {}
          description: 'An array of email templates on the store

            '
      parameters:
      - $ref: '#/components/parameters/ChannelIdParam'
      operationId: getEmailTemplates
      tags:
      - Email Templates
  /marketing/email-templates/{template-name}:
    parameters:
    - $ref: '#/components/parameters/Accept'
    - schema:
        type: string
      name: template-name
      in: path
      required: true
    get:
      summary: BigCommerce Get an Email Template
      description: '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](https://login.bigcommerce.com/deep-links/manage/marketing/email-templates). If you have already opted in, visiting the [Email Templates](https://login.bigcommerce.com/deep-links/manage/marketing/email-templates) page will return a `404` error, and you will be able to access the new [Transactional Emails](https://login.bigcommerce.com/deep-links/manage/transactional-emails) page.'
      tags:
      - Email Templates
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/EmailTemplate'
                  meta:
                    type: object
                    properties: {}
                    additionalProperties: true
                    description: Response metadata.
              examples:
                Example:
                  value:
                    data:
                      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}}
                    meta: {}
      operationId: getEmailTemplate
      parameters:
      - $ref: '#/components/parameters/ChannelIdParam'
    put:
      summary: BigCommerce Update a Template
      description: Update a global template or create a channel-specific email template override.
      tags:
      - Email Templates
      operationId: updateEmailTemplate
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/EmailTemplate'
                  meta:
                    type: object
                    properties: {}
                    additionalProperties: true
                    description: Response metadata.
              examples:
                Example:
                  value:
                    data:
                      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}}
                    meta: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      parameters:
      - $ref: '#/components/parameters/ContentType'
      - $ref: '#/components/parameters/ChannelIdParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmailTemplate'
            examples:
              Example:
                value:
                  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}}
        description: ''
    delete:
      summary: BigCommerce Delete Email Template Override
      description: Removes a channel-specific email template override.
      tags:
      - Email Templates
      operationId: deleteEmailTemplateOverride
      responses:
        '200':
          description: OK
      parameters:
      - $ref: '#/components/parameters/RequiredChannelIdParamForDelete'
components:
  parameters:
    Accept:
      name: Accept
      in: header
      required: true
      description: The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.
      schema:
        type: string
        default: application/json
    RequiredChannelIdParamForDelete:
      in: query
      name: channel_id
      schema:
        type: integer
      description: Required Channel ID. This delete operation will delete overridden settings for this channel, thus restoring them to the global defaults.
      required: true
    ContentType:
      name: Content-Type
      in: header
      required: true
      description: The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.
      schema:
        type: string
        default: application/json
    ChannelIdParam:
      in: query
      name: channel_id
      schema:
        type: integer
      description: Channel ID to use for channel-specific setting. If omitted, you will interact with the global setting only.
  schemas:
    EmailTemplatesCollection:
      title: EmailTemplatesCollection
      type: array
      items:
        $ref: '#/components/schemas/EmailTemplate'
      description: A collection of all email templates.
      x-internal: false
    BaseError:
      type: object
      description: 'Error payload for the BigCommerce API.

        '
      properties:
        status:
          description: 'The HTTP status code.

            '
          type: integer
        title:
          description: 'The error title describing the particular error.

            '
          type: string
        type:
          type: string
        instance:
          type: string
      x-internal: false
    DetailedErrors:
      type: object
      additionalProperties:
        type: string
      x-internal: false
    ErrorResponse:
      allOf:
      - $ref: '#/components/schemas/BaseError'
      - type: object
        properties:
          errors:
            $ref: '#/components/schemas/DetailedErrors'
      x-internal: false
    EmailTemplate:
      title: EmailTemplate
      type: object
      description: Data for a particular email template
      properties:
        type_id:
          type: string
          enum:
          - 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:
          type: 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:
          $ref: '#/components/schemas/LocaleCollection'
        subject:
          type: string
          example: Reset your password at {{store.name}}
      x-internal: false
    LocaleCollection:
      title: LocaleCollection
      type: array
      items:
        $ref: '#/components/schemas/LocaleObject'
      description: A collection of locale translations for the static language.
      x-internal: false
    LocaleObject:
      title: LocaleObject
      type: object
      properties:
        locale:
          type: string
          example: en
          description: Locale code for this language, such as "en", "en-us", "fr-ca".
        keys:
          type: object
          example:
            reset_password: 'To change your customer account password at {{name}} please click this link or copy and paste it into your browser:'
          description: Language keys for the template. User-defined. Should match any lang keys used in the template.
      description: A particular localeʼs translations.
      x-internal: false
  securitySchemes:
    X-Auth-Token:
      name: X-Auth-Token
      description: '### OAuth scopes


        | UI Name | Permission | Parameter |

        |:--|:--|:-|

        | Information & Settings  | read-only  | `store_v2_information_read_only`|

        | Information & Settings  | modify     | `store_v2_information`          |


        ### Authentication header


        | Header | Argument | Description |

        |:-|:|:|

        | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/docs/start/authentication/api-accounts). |


        ### Further reading


        For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#x-auth-token-header-example-requests).


        For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/docs/start/authentication/api-accounts#oauth-scopes).


        For a list of API status codes, see [API Status Codes](/docs/start/about/status-codes).'
      type: apiKey
      in: header