Templates

Create a new template

Changed on

Create a new email template from HTML or from an MJML definition.

post/templates

Request

  • Base URL
    https://api2.ecomailapp.cz
  • URL
    https://api2.ecomailapp.cz/templates
  • Auth
    API key in header key

Request body

namestring required

Template name.

htmlstring

Template HTML content. Required when mjml is not sent. Do not combine with mjml.

mjmlobject

MJML definition of the template, in the same JSON format the Ecomail editor uses. Required when html is not sent. The definition is a tree of nodes. Each node has a tagName (an MJML component such as mj-section, mj-column, mj-text, mj-image, or mj-button), optional attributes, and either children or content. The root node must contain a children array.

Response

OK

idinteger
namestring
htmlstring

Changes

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /