Email Templates

Create an email template

Saves a draft. A live send uses a template once it is published; a send with a test key renders the draft, published or not, so a test key can build and try a template without publishing it.

Requires email_templates:w.

post/v1/email-templates

Request

  • Base URL: https://api.honkio.ca
  • URL: https://api.honkio.ca/v1/email-templates
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Request body

namestring required

A label for you, up to 200 characters.

aliasstring nullable

Send with it instead of the id: 1 to 63 lowercase letters, digits, - or _, starting with a letter or digit. Null removes it.

subjectstring required

Up to 998 characters. Variables go in double braces, such as {{ first_name }}.

htmlstring nullable

The HTML body. A template needs html, text or both. Variable values are always HTML escaped.

textstring nullable

The plain text body.

fromstring nullable

The default sender. A send can set its own.

Example request

{
  "html": "<p>Hi {{ first_name }}, your order has shipped.</p>"
}

Changes

No recorded changes to this operation across all 1 revision of this API.