Skip to main content

Create Template

POST 

/template

Creates a new saved template for your account​

  • name - Required. Unique within the account, up to 256 characters.
  • subject - Optional, up to 150 characters. Default subject for campaigns created from the template.
  • previewText - Optional, up to 150 characters. Default preview text (preheader) for campaigns created from the template.
  • html - Required. Full HTML of the email.
  • css - Optional. Defaults to empty.

Templates created through the API open in the HTML editor in the app (editorType is always HTML).

Request​

Body

required
    name stringrequired

    Possible values: <= 256 characters

    Template name, unique within the account

    subject string

    Possible values: <= 150 characters

    Default subject for campaigns created from this template

    previewText string

    Possible values: <= 150 characters

    Default preview text (preheader) for campaigns created from this template

    html stringrequired

    Full HTML of the email

    css string

    Optional CSS kept alongside the HTML. Defaults to empty.

Responses​

Template created

Schema
    id uuid
    name string
    subject stringnullable
    previewText stringnullable
    html string
    css string
    editorType string

    Possible values: [DRAG_AND_DROP, HTML]

    Editor the template opens in. Always HTML for templates created through the API.

    createdAt int64

    Creation time in epoch milliseconds

    updatedAt int64

    Last update time in epoch milliseconds

Loading...