POST emails/save
Save content and header information for an email. Can pass an email object (i.e. response from /emails/lookup) or just key/value pairs.
* required
Parameters
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
emailID | integer | Unique ID of email | ||||||||||||
templateID | integer | ID of template used by email. Set htmlVersionEditable property to true to provide full HTML Version without using a template | ||||||||||||
userID | integer | ID of system user email belongs to | ||||||||||||
title | string | Title of email (for internal use) | ||||||||||||
subject | string | Subject of email | ||||||||||||
preheader | string | Summary text that follows subject line in the inbox | ||||||||||||
fromName | string | Name used in From header | ||||||||||||
fromAddress | email-address | Email address used in From header | ||||||||||||
replyToName | string | Name used in Reply-to header | ||||||||||||
replyToAddress | email-address | Email address used in Reply-to header | ||||||||||||
bccAddress | email-address | Email address that will receive a BCC (blind carbon copy) for every recipient. | ||||||||||||
recipients | object |
|
||||||||||||
content | object |
|
||||||||||||
htmlVersionEditable | boolean |
If true, no template is used and user provides the full HTML version of email (see htmlVersion property). The HTML Version must contain the unsubscribe link variable: $$url[unsubscribe]. The value of htmlVersionEditable cannot be changed on an existing email.
0
|
||||||||||||
throttling | object |
|
||||||||||||
tracking | object |
|
Response Data
Returns a full representation of an email (same as when doing a lookup)
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
abSplit | object |
A/B split details
|
||||||||||||||||||||||||||||||||||||||||||||||||
approval | object |
|
||||||||||||||||||||||||||||||||||||||||||||||||
automation | object |
Automation settings. Automated emails cannot be managed via the API.
|
||||||||||||||||||||||||||||||||||||||||||||||||
bccAddress | string | Email address that will receive a BCC (blind carbon copy) for every recipient. | ||||||||||||||||||||||||||||||||||||||||||||||||
campaignIDs | array[integer] | Campaigns the email is assigned to | ||||||||||||||||||||||||||||||||||||||||||||||||
content | object |
|
||||||||||||||||||||||||||||||||||||||||||||||||
dateAdded | datetime | Date record was added | ||||||||||||||||||||||||||||||||||||||||||||||||
dateModified | datetime | Date record was modified | ||||||||||||||||||||||||||||||||||||||||||||||||
dateSent | datetime | Date email was sent | ||||||||||||||||||||||||||||||||||||||||||||||||
deliveryType | string | How email gets delivered. One of: Manual, Automated, Transactional | ||||||||||||||||||||||||||||||||||||||||||||||||
emailID | integer | Unique ID of email | ||||||||||||||||||||||||||||||||||||||||||||||||
fromAddress | string | Email address used in From header | ||||||||||||||||||||||||||||||||||||||||||||||||
fromName | string | Name used in From header | ||||||||||||||||||||||||||||||||||||||||||||||||
htmlVersionEditable | boolean | If true, no template is used and user provides the full HTML version of email (see htmlVersion property). The HTML Version must contain the unsubscribe link variable: $$url[unsubscribe]. The value of htmlVersionEditable cannot be changed on an existing email. | ||||||||||||||||||||||||||||||||||||||||||||||||
ignoreContactSuppression | boolean | Indicates whether or not suppressed contacts can receive the email. Applies to transactional emails only. | ||||||||||||||||||||||||||||||||||||||||||||||||
metrics | object |
Summary deliverability metrics
|
||||||||||||||||||||||||||||||||||||||||||||||||
parentEmailID | integer | ID of parent email record | ||||||||||||||||||||||||||||||||||||||||||||||||
preheader | string | Summary text that follows subject line in the inbox | ||||||||||||||||||||||||||||||||||||||||||||||||
recipients | object |
|
||||||||||||||||||||||||||||||||||||||||||||||||
replyToAddress | string | Email address used in Reply-to header | ||||||||||||||||||||||||||||||||||||||||||||||||
replyToName | string | Name used in Reply-to header | ||||||||||||||||||||||||||||||||||||||||||||||||
schedule | object |
|
||||||||||||||||||||||||||||||||||||||||||||||||
status | string | Current status of email delivery. One of: Draft, Sent, Scheduled | ||||||||||||||||||||||||||||||||||||||||||||||||
subject | string | Subject of email | ||||||||||||||||||||||||||||||||||||||||||||||||
templateID | integer | ID of template used by email. Set htmlVersionEditable property to true to provide full HTML Version without using a template | ||||||||||||||||||||||||||||||||||||||||||||||||
throttling | object |
Throttling settings
|
||||||||||||||||||||||||||||||||||||||||||||||||
title | string | Title of email (for internal use) | ||||||||||||||||||||||||||||||||||||||||||||||||
tracking | object |
Tracking options
|
||||||||||||||||||||||||||||||||||||||||||||||||
userID | integer | ID of system user email belongs to |
Permissions
Method requires the Compose Mail permission
Example Calls
Create email using template
New emails must have at least the following defined: templateID,subject,fromName,fromAddress
POST
/emails/save
cURL
Copy
Response Data
Create email without a template
When not using a template, set htmlVersionEditable=1 and set htmlVersion to the full HTML document
POST
/emails/save
cURL
Copy
Response Data
Update single email property
Updates can pass in just the changes
POST
/emails/save
cURL
Copy
Response Data
Update email using object
Updates can pass in a fully populated email object. An email object can be obtained by calling emails/lookup. They are also returned after a save operation.
POST
/emails/save
cURL
Copy
Response Data
API Console
The console uses production data, so BE CAREFUL!
POST
emails/save