Skip to main content

Create Store Email Template

POST 

/api/store-email-templates

Creates a new store email template. Always creates as a non-system template.

Authentication: Requires Bearer token.

Fields:

  • store_id (required on create): ID of the store (must exist in stores table)
  • type (required on create): Template type (e.g. purchase_order, purchase_order_updated, bulk_purchase_order)
  • subject (required on create): Email subject line, max 255 chars
  • html_body (required on create): HTML body of the email template (supports template variables)
  • enabled (optional): Boolean, whether template is active
  • attach_pdf (optional): Boolean, whether to attach a PDF
  • sent_type (optional): One of: automatically, manually

Request

Responses

Successful response