Update Email Template

POST https://rest.iad-01.braze.com/templates/email/update

Use the Template REST APIs to programmatically manage the email templates that you have stored on the Braze dashboard, on the Templates & Media page. Braze provides two endpoints for creating and updating your email templates.

Use the endpoints below to update email templates on the Braze dashboard. You can access an email template's email_template_id by navigating to it on the Templates and Media page. The email template creation API endpoint will also return an email_template_id reference.

All fields other than the email_template_id are optional, but you must specify at least one field to update.

Request Parameters

ParameterRequiredData TypeDescription
email_template_idRequiredStringYour email template's API Identifier.
template_nameOptionalStringThe name of your email template
subjectOptionalStringThe email template subject line
bodyOptionalStringThe email template body that may include HTML
plaintext_bodyOptionalStringA plaintext version of the email template body
preheaderOptionalStringThe email preheader used to generate previews in some clients
tagsOptionalStringTags must already exist
should_inline_cssOptionalBooleanEnables or disables the 'inline_css' feature per template. If not provided, Braze will use the default setting for the AppGroup. One of 'true' or 'false' is expected

Request Components

Possible Errors

  • Template Name is required

  • Tags must be an array.

  • All Tags must be Strings.

  • Some Tags could not be found.

  • "Invalid value for 'should_inline_css'. One of 'true' or 'false' was expected" - 'shouldinlinecss' accepts boolean characters only. The error likely is being shown as the value is being sent as a 'string'.

Request Body

{"email_template_id"=>"email_template_id", "template_name"=>"Weekly Newsletter", "subject"=>"This Week's Styles", "body"=>"Check out this week's digital lookbook to inspire your outfits. Take a look at https://www.braze.com/", "plaintext_body"=>"This is the updated text within my email body and here is a link to https://www.braze.com/.", "preheader"=>"We want you to have the best looks this Summer", "tags"=>["Tag1", "Tag2"]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Authorizationstring