Top level properties

The ResponsiveEmail API takes a JSON object as its input, and turns that object into a responsive email. At the root level of this JSON input object, you can set many different properties to exactly specify what your email should look like, and what content it should have.

There are three 'basic' top level properties:

  • META properties
  • MIME properties
  • Content and style properties

The API also offers some advanced properties, such as the rewrite property.

Top level meta properties

Property Type Description
name string User readable template name.
description string User readable template description.
version integer Version number of the JSON input.

Top level MIME properties

Property Value Description
subject string Subject line of the email.
from object Email address and name of the sender.
replyTo object Optional email address and name of the user to which replies are sent.
to array List of receivers.
cc array List of CC addresses.
bcc array List of BCC addresses.
headers object Additional custom headers to be added to the mail header.
attachments array Attachments to download and add to the email.
dkim object Private key for DKIM signature.

Top level content and style properties

Property Value Description
text string Supply text version for clients that do not support HTML emails
font object Template wide font and text settings.
background object Background settings for the entire template.
content object The main block that holds all of the other blocks and content of the responsive email.
css object Custom CSS settings to be added to the <body> tag.
attributes object Custom attributes to be added to the <body> tag.

Top level advanced properties

Property Value Description
rewrite object Define specific rules to overwrite information specified in the JSON.
tracking object Supply email tracking information.
data object Supply data used for personalization

Example input

Just an idea of how a JSON document could look like.

{
    "name": "My template",
    "from": "info@example.com",
    "subject": "Example email",
    "background": {
        "color": "#f3f3f3"
    },
    "content": {
        "blocks": [
            {
                "type": "text",
                "content": "This is an example email"
            }, 
            {
                "type": "image",
                "src": "http://placekitten.com/200/140"
            }
        ]
    }
}

Found a typo?

You can find this documentation page on GitHub.
Propose a change