Email Object

Use email resources to send emails to prospects, and to learn how prospects responded to the emails. Learn more about email in Salesforce Help.

Include the authentication header with every request. For information on how to authenticate, see Authentication.

Resource NameOperationDescription
Email List SendPOSTSend an email to all prospects in the specified list.
Email One-to-One SendPOSTSend an email to a single prospect.
Email ReadGETRequest information for an email, such as the email name and subject.
Email StatisticsGETRequest statistics for a list email, such as the number of clicks, opens, and opt-outs.

Send an email to every prospect on the specified list.

You can satisfy the required fields to create a list email send request in the following ways:

  1. Specify list_ids[], campaign_id, and email_template_id .
  2. Specify list_ids[], campaign_id, text_content, name, subject, from_email, and from_name.
  3. Specify list_ids[], campaign_id text_content, name, subject, and from_user_id.

The following parameters can be used in a list email send request.

ParameterTypeDescription
campaign_idintegerThe Account Engagement ID of the campaign to which the email send is assigned.
from_namestringThe name of the user sending the email.
from_emailstringThe email address of user sending the email.
from_user_idstringThe Account Engagement ID of the user sending the email.
from_assigned_userbooleanIf the prospect has an assigned user, send the email from that user.
from_account_ownerbooleanIf the prospect has an account owner, send the email from that user.
replyto_emailstringThe email address to use for the reply emails.
list_ids[]arrayThe Account Engagement ID of the email lists. The email is sent to all users on the specified lists. You can post multiple list IDs for multiple lists.
suppression_list_ids[]integerThe Account Engagement ID of the suppression list. The email isn’t sent to any user on the suppression lists. You can post multiple suppression list IDs for multiple lists.
tags[]stringThe name of the tags to create or associate with the email. You can post multiple tags.
operational_emailbooleanWhen true, the email is sent to the prospect regardless of opt-out status. Your account must have this feature enabled to use this setting.
namestringThe email record's name.
subjectstringThe email's subject.
text_contentstringThe email's text body. Must contain either %%unsubscribe%% or %%email_preference_center%%.
html_contentstringThe email's html body. Must contain either %%unsubscribe%% or %%email_preference_center%%.
email_template_idintegerThe Account Engagement ID of the email template.
scheduled_timeISO8601 stringThe ISO8601 date and time to send the email.
format(xml or json)The format in which the response is sent. The default is xml.

Schedule an email for October 31 at 5pm GMT-4. Use a template with ID 6789. Send the email to four prospect lists and specify two suppression lists. The email is sent from the assigned user (if one is assigned). Three tags are assigned to the email.

This example uses cURL.

TagDescription
<email>Parent tag. Contains information about the email. For more information about email fields, see Email.

Send an email to a single prospect. You can specify the prospect by Account Engagement ID or email address.

Replace <ID> with the Account Engagement ID of the email.

Replace <prospect_email> with the prospect's email address.

You can satisfy the required fields to send an email in the following ways:

  1. Specify campaign_id and email_template_id .
  2. Specify campaign_id, text_content, name, subject, from_email and from_name.
  3. Specify campaign_id text_content, name, subject, and from_user_id.

The following parameters can be used in a one-to-one email send request.

ParameterTypeDescription
campaign_idintegerThe ID of the Account Engagement campaign to associate the email with.
prospect_idintegerThe Account Engagement ID of the prospect you're sending the email to.
prospect_emailstringThe email address of the prospect you're sending the email to.
from_namestringThe name of the user sending the email.
from_emailstringThe email address of user sending the email.
from_user_idstringThe Account Engagement ID of the user sending the email.
replyto_emailstringThe email address to use for the reply emails.
tags[]stringThe name of the tags to create or associate with the email. You can post multiple tags.
operational_emailbooleanWhen true, the email is sent to the prospect regardless of opt-out status. Your account must have this feature enabled to use this setting.
namestringThe email record's name.
subjectstringThe email's subject.
text_contentstringThe email's text body. Must contain either %%unsubscribe%% or %%email_preference_center%%.
html_contentstringThe email's html body. Must contain either %%unsubscribe%% or %%email_preference_center%%.
email_template_idintegerThe Account Engagement ID of the email template.
formatxml or jsonThe format in which the response is sent. The default is xml.

Send an email to the prospect with Account Engagement ID 1234.

When an email send is successful, the response contains a copy of the email.

TagDescription
<email>Parent tag. Contains information about the email. For more information about email fields, see Email.

Request information for an email, such as the Account Engagement ID, Account Engagement name, and message body. For information about fields in an email record, see Email.

Replace <ID> with the Account Engagement ID of the email.

The request can include this parameter.

ParameterTypeDescription
include_message booleanIf false, the response doesn’t include the html or text body of the email message. Default value is true.

Request information for the email with ID 12345.

Request statistical information for a list email, such as the number of clicks, opens, and opt-outs.

Replace <ID> with the Account Engagement ID of the email.

Request statistics for the email with ID 12345.

TagDescription
<stats>The statistics for a single list email.
<sent>The number of emails sent.
<delivered>The number of emails delivered.
<total_clicks>The total number of clicks for the email.
<unique_clicks>The number of unique clicks for the email.
<soft_bounced>The number of soft bounces for the email.
<hard_bounced>The number of hard bounces for the email.
<opt_outs>The number of opt outs for the email
<spam_complaints>The number of spam complaints for the email.
<opens>The number of opens for the email.
<unique_opens>The number of unique opens for the email.
<delivery_rate>The delivery rate based on the number of emails sent.
<opens_rate>The open rate based on the number of emails delivered.
<click_through_rate>The click-through rate based on the number of emails delivered.
<unique_click_through_rate>The unique click-through rate based on the number of emails delivered.
<click_open_ratio>The ratio between email clicks and opens.
<opt_out_rate>The opt-out rate based on the number of emails delivered.
<spam_complaint_rate>The spam complaint rate based on the number of emails delivered.