v1.0.0
OpenAPI 3.1.0

Update an email

US region

Client Libraries

Update an email

Update part of an email: an email's name, template status, folder, content, envelope, or transformers. Note, this does not publish your email; if the email is connected to a workflow like a campaign, you still need to click publish to make the changes live.

Path Parameters
  • id
    Type: stringFormat: uuid
    required

    The UUID of the email.

Body
required
application/json

You must provide a body with at least one of the following properties. Omitting a field leaves it unchanged.

  • 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.

  • name
    Type: string
    min length:  
    1
    max length:  
    255

    Display name of the email.

  • parent_folder_id
    Type: string | nullFormat: uuid

    The UUID of the parent folder.

    Omit if you want no change to where the folder or file is located. Include null to move it to your root directory. Or add the UUID of another folder to move it there.

  • transformers
    Type: object

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

Responses
  • 204

    Email updated, no content returned

  • application/json
  • application/json
  • application/json
Request Example for put/v1/design_studio/emails/{id}
curl https://api.customer.io/v1/design_studio/emails/123e4567-e89b-12d3-a456-426614174000 \
  --request PUT \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "",
  "is_template": true,
  "parent_folder_id": null,
  "content": {
    "subject": "",
    "preheader_text": "",
    "html": "",
    "amp": "",
    "text": ""
  },
  "envelope": {
    "from_id": null,
    "reply_to_id": null,
    "recipient": "",
    "bcc": "",
    "fake_bcc": true,
    "headers": [
      {
        "name": "",
        "value": ""
      }
    ]
  },
  "transformers": {
    "url_parameters": {
      "enabled": false,
      "parameters": []
    },
    "css_variables": {
      "enabled": false,
      "preserve": false
    },
    "css_inliner": {
      "enabled": false,
      "apply_style_tags": true,
      "preserve_important": false,
      "remove_style_tags": true,
      "preserve_font_faces": true,
      "preserve_media_queries": true,
      "preserve_keyframes": true,
      "preserve_pseudos": true,
      "inline_pseudo_elements": false,
      "apply_html_attributes": {
        "enabled": true,
        "apply_width_attributes": true,
        "apply_height_attributes": true,
        "apply_table_element_attributes": true
      }
    },
    "accessibility": {
      "enabled": false,
      "language": "",
      "add_lang_to_html": true,
      "add_dir_to_html": true,
      "add_lang_to_content": true,
      "add_dir_to_content": true,
      "add_role_to_tables": true,
      "add_vml_alt_text": true,
      "add_empty_alt_to_images": true,
      "add_title_to_head": true,
      "remove_button_role_from_links": true,
      "remove_zoom_meta_tag": true
    },
    "formatter": {
      "type": "none",
      "prettify": {
        "indent_character": "spaces",
        "indent_size": 2,
        "wrap_attributes": false
      },
      "minify": {
        "remove_line_breaks": false,
        "line_length_limit": 500,
        "remove_indentations": true,
        "remove_html_comments": "0",
        "remove_css_comments": true
      }
    },
    "prevent_widows": {
      "enabled": false
    },
    "encode_entities": {
      "enabled": false
    },
    "remove_unused_css": {
      "enabled": false,
      "whitelist": [
        ""
      ],
      "backend_markers": [
        {
          "heads": "",
          "tails": ""
        },
        {
          "heads": "{%",
          "tails": "%}"
        }
      ],
      "uglify": false
    }
  }
}'
No Body