Skip to content
v1.0.0
OAS 3.0.3

Compiling Email Templates

This API call allows inlining CSS styles into HTML tags and provides the final HTML code of email templates that are ready to be sent to recipients.

Server:
Client Libraries

Methods

Get compiled email

Get compiled inline CSS into HTML email templates.

Query Parameters
  • minimize
    Type: boolean

    If true then html code will be in a format of a single line without line breaks

  • inlineCss
    Type: boolean

    Allows you to select the type of code in the received compiled email. inlineCss: true - by default. This means that we will see CSS placed inside tags when we make a compiled form of HTML. inlineCss: false - editor will not inline the CSS in the tags, but rather write it at the head of the email.

Headers
  • ES-PLUGIN-AUTH
    Type: string
    required

    Stripo plugin auth token in the format - Bearer ${AUTH_TOKEN}

  • ES-PLUGIN-UI-DATA
    Type: string
    required

    JSON string with parameters to identify email (Same as metadata param in UI editor). For example: {"emailId": "id1"}

Responses
  • 200
    Type: object
    • ampErrors
      Type: array string[]

      List of AMP errors inside AMP HTML email template

    • ampHtml
      Type: string

      Compiled AMP version of HTML

    • conditions
      Type: array Condition[]

      List of AMP errors inside AMP HTML email template

    • html
      Type: string

      Compiled HTML

    • syncModules
      Type: array integer[]

      List of IDs of sync modules what was found in the HTML

Request Example for get/coediting/v1/email/compilation
curl '/coediting/v1/email/compilation?minimize=false&inlineCss=false' \
  --header 'ES-PLUGIN-AUTH: ' \
  --header 'ES-PLUGIN-UI-DATA: '
{
  "html": "string",
  "ampHtml": "string",
  "ampErrors": [
    "string"
  ],
  "syncModules": [
    1
  ],
  "conditions": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "beforeScript": "string",
      "afterScript": "string"
    }
  ]
}

Models