Edit an email template

Change a template's subject, body, or settings. Every call replaces subject, html_content and json_content, and also manager_email and other_manager_email (left out = cleared); title and template_editor_mode keep their values when left out. Send channel_id to attach the template to a campaign channel: a regular template becomes the channel's email, a follow_up template its follow-up. Editing a shared (global) template saves a copy under your account with a new id (400 if your account already has a template with that name). Returns the updated template.

Prerequisites: a bearer token and the template's id (value in GET /api/v1/campaign/template/email/list). Optional: a campaign channel id (channel_id, from data.data.channels[].id in the campaign create step 2 or 3 response).

Authentication: Account token. email_template_id must be one of your account's templates or a shared template, and channel_id must be a channel of a campaign on a location inside your own account tree; otherwise 422.

Rate limit: none.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
integer
required
Defaults to 9084

The template to edit (value in List email templates). Must be one of your account's templates or a shared template.

string
required
Defaults to How was your visit?

The email subject line, up to 255 characters.

string
Defaults to <html><body><h1>Welcome!</h1></body></html>

The email's HTML.

string
Defaults to PGh0bWw+PGJvZHk+PGgxPldlbGNvbWUhPC9oMT48L2JvZHk+PC9odG1sPg==

The HTML, base64-encoded. Send it instead of html_content when the HTML contains <script>, <iframe> or on*= attributes, which AWS WAF blocks in plain text. It is decoded into html_content before validation.

string
required
Defaults to {}

The editor's design data, as a JSON string. "{}" is fine.

string
Defaults to Welcome Email Template

A new name for the template. Must be unique among your account's templates and the shared templates. Leave it out to keep the current name.

string
enum
Defaults to custom

custom or html_editor. Leave it out to keep the current mode.

Allowed:
integer
Defaults to 5393

A campaign channel to attach the template to. Must belong to a campaign on a location inside your account tree.

string

Manager email address. Must be a real address on a domain that receives mail (checked with an RFC + DNS lookup), so @example.com addresses are rejected. Replaced on every call; leave it out to clear it.

other_manager_email
array of strings
Defaults to <owner-email>

More manager email addresses, each different and checked like manager_email. Replaced on every call; leave it out to clear the list.

other_manager_email
integer
enum
Defaults to 3

Follow-up interval in days: 1, 2, 3, 4, 5, 6, 7, 14 or 30. Used only with channel_id on a follow_up template. Defaults to 3.

integer
enum
Defaults to 2

Number of follow-up emails: 1, 2 or 3. Used only with channel_id on a follow_up template. Defaults to 2.

Allowed:
Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json