v1.0.0
OpenAPI 3.1.0

Create an email

US region

Client Libraries

Create an email

​

Create an email. Note, you can create an email without filling out all required fields for sending. You can fill in the envelope, like a to and from address, with this method, but that's not required until you link it to a workflow like an automation.

Body
required
application/json
  • name
    Type: string
    min length:  
    1
    max length:  
    255
    required

    Display name of the email.

  • content
    Type: object

    The content of your email.

  • envelope
    Type: object

    The envelope of your email, like from and to addresses.

  • is_template
    Type: boolean

    Whether the email is a reusable template.

  • parent_folder_id
    Type: string | null Format: uuid

    UUID of the parent folder. Omit or pass null to create at root.

  • transformers
    Type: object

    Automate repetitive actions like removing white space and inlining CSS with transformers.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/design_studio/emails
{
  "name": "",
  "content": {
    "amp": "",
    "html": "",
    "preheader_text": "",
    "subject": "",
    "text": ""
  },
  "envelope": {
    "bcc": "",
    "fake_bcc": true,
    "from_id": null,
    "headers": [
      {
        "name": "",
        "value": ""
      }
    ],
    "recipient": "",
    "reply_to_id": null
  },
  "is_template": false,
  "parent_folder_id": null,
  "transformers": {
    "accessibility": {
      "add_dir_to_content": true,
      "add_dir_to_html": true,
      "add_empty_alt_to_images": true,
      "add_lang_to_content": true,
      "add_lang_to_html": true,
      "add_role_to_tables": true,
      "add_title_to_head": true,
      "add_vml_alt_text": true,
      "enabled": false,
      "language": "",
      "remove_button_role_from_links": true,
      "remove_zoom_meta_tag": true
    },
    "css_inliner": {
      "apply_html_attributes": {
        "apply_height_attributes": true,
        "apply_table_element_attributes": true,
        "apply_width_attributes": true,
        "enabled": true
      },
      "apply_style_tags": true,
      "enabled": false,
      "inline_pseudo_elements": false,
      "preserve_font_faces": true,
      "preserve_important": false,
      "preserve_keyframes": true,
      "preserve_media_queries": true,
      "preserve_pseudos": true,
      "remove_style_tags": true
    },
    "css_variables": {
      "enabled": false,
      "preserve": false
    },
    "encode_entities": {
      "enabled": false
    },
    "formatter": {
      "minify": {
        "line_length_limit": 500,
        "remove_css_comments": true,
        "remove_html_comments": "0",
        "remove_indentations": true,
        "remove_line_breaks": false
      },
      "prettify": {
        "indent_character": "spaces",
        "indent_size": 2,
        "wrap_attributes": false
      },
      "type": "none"
    },
    "prevent_widows": {
      "enabled": false
    },
    "remove_unused_css": {
      "backend_markers": [
        {
          "heads": "",
          "tails": ""
        },
        {
          "heads": "{%",
          "tails": "%}"
        }
      ],
      "enabled": false,
      "uglify": false,
      "whitelist": [
        ""
      ]
    },
    "url_parameters": {
      "enabled": false,
      "parameters": []
    }
  }
}
{
  "email": {
    "available_languages": [
      "en",
      "es"
    ],
    "content": {
      "amp": "string",
      "html": "string",
      "preheader_text": "string",
      "subject": "string",
      "text": "string"
    },
    "created": 1773856017,
    "envelope": {
      "bcc": "string",
      "fake_bcc": true,
      "from": "string",
      "from_id": null,
      "headers": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "recipient": "string",
      "reply_to": "string",
      "reply_to_id": null
    },
    "id": "sdflkj345",
    "is_linked": true,
    "is_template": true,
    "name": "string",
    "parent_folder_id": null,
    "transformers": {
      "accessibility": {
        "add_dir_to_content": true,
        "add_dir_to_html": true,
        "add_empty_alt_to_images": true,
        "add_lang_to_content": true,
        "add_lang_to_html": true,
        "add_role_to_tables": true,
        "add_title_to_head": true,
        "add_vml_alt_text": true,
        "enabled": false,
        "language": "",
        "remove_button_role_from_links": true,
        "remove_zoom_meta_tag": true
      },
      "css_inliner": {
        "apply_html_attributes": {
          "apply_height_attributes": true,
          "apply_table_element_attributes": true,
          "apply_width_attributes": true,
          "enabled": true
        },
        "apply_style_tags": true,
        "enabled": false,
        "inline_pseudo_elements": false,
        "preserve_font_faces": true,
        "preserve_important": false,
        "preserve_keyframes": true,
        "preserve_media_queries": true,
        "preserve_pseudos": true,
        "remove_style_tags": true
      },
      "css_variables": {
        "enabled": false,
        "preserve": false
      },
      "encode_entities": {
        "enabled": false
      },
      "formatter": {
        "minify": {
          "line_length_limit": 500,
          "remove_css_comments": true,
          "remove_html_comments": "0",
          "remove_indentations": true,
          "remove_line_breaks": false
        },
        "prettify": {
          "indent_character": "spaces",
          "indent_size": 2,
          "wrap_attributes": false
        },
        "type": "none"
      },
      "prevent_widows": {
        "enabled": false
      },
      "remove_unused_css": {
        "backend_markers": [
          {
            "heads": "",
            "tails": ""
          },
          {
            "heads": "{%",
            "tails": "%}"
          }
        ],
        "enabled": false,
        "uglify": false,
        "whitelist": [
          "string"
        ]
      },
      "url_parameters": {
        "enabled": false,
        "parameters": []
      }
    },
    "updated": 1773856017
  }
}