2018/12/13 - Amazon Pinpoint Email Service - 7 new api methods
Changes This release adds new operations for the Amazon Pinpoint Deliverability Dashboard. You can use the Deliverability Dashboard to view response and inbox placement metrics for the domains that you use to send email. You can also perform tests on individual email messages to determine how often your messages are delivered to the inbox on several major email providers.
Show a list of the predictive inbox placement tests that you've performed, regardless of their statuses. For predictive inbox placement tests that are complete, you can use the GetDeliverabilityTestReport operation to view the results.
See also: AWS API Documentation
Request Syntax
client.list_deliverability_test_reports( NextToken='string', PageSize=123 )
string
A token returned from a previous call to ListDeliverabilityTestReports to indicate the position in the list of predictive inbox placement tests.
integer
The number of results to show in a single call to ListDeliverabilityTestReports . If the number of results is larger than the number you specified in this parameter, then the response includes a NextToken element, which you can use to obtain additional results.
The value you specify has to be at least 0, and can be no more than 1000.
dict
Response Syntax
{ 'DeliverabilityTestReports': [ { 'ReportId': 'string', 'ReportName': 'string', 'Subject': 'string', 'FromEmailAddress': 'string', 'CreateDate': datetime(2015, 1, 1), 'DeliverabilityTestStatus': 'IN_PROGRESS'|'COMPLETED' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
A list of the predictive inbox placement test reports that are available for your account, regardless of whether or not those tests are complete.
DeliverabilityTestReports (list) --
An object that contains a lists of predictive inbox placement tests that you've performed.
(dict) --
An object that contains metadata related to a predictive inbox placement test.
ReportId (string) --
A unique string that identifies the predictive inbox placement test.
ReportName (string) --
A name that helps you identify a predictive inbox placement test report.
Subject (string) --
The subject line for an email that you submitted in a predictive inbox placement test.
FromEmailAddress (string) --
The sender address that you specified for the predictive inbox placement test.
CreateDate (datetime) --
The date and time when the predictive inbox placement test was created, in Unix time format.
DeliverabilityTestStatus (string) --
The status of the predictive inbox placement test. If the status is IN_PROGRESS , then the predictive inbox placement test is currently running. Predictive inbox placement tests are usually complete within 24 hours of creating the test. If the status is COMPLETE , then the test is finished, and you can use the GetDeliverabilityTestReport to view the results of the test.
NextToken (string) --
A token that indicates that there are additional predictive inbox placement tests to list. To view additional predictive inbox placement tests, issue another request to ListDeliverabilityTestReports , and pass this token in the NextToken parameter.
Create a new predictive inbox placement test. Predictive inbox placement tests can help you predict how your messages will be handled by various email providers around the world. When you perform a predictive inbox placement test, you provide a sample message that contains the content that you plan to send to your customers. Amazon Pinpoint then sends that message to special email addresses spread across several major email providers. After about 24 hours, the test is complete, and you can use the GetDeliverabilityTestReport operation to view the results of the test.
See also: AWS API Documentation
Request Syntax
client.create_deliverability_test_report( ReportName='string', FromEmailAddress='string', Content={ 'Simple': { 'Subject': { 'Data': 'string', 'Charset': 'string' }, 'Body': { 'Text': { 'Data': 'string', 'Charset': 'string' }, 'Html': { 'Data': 'string', 'Charset': 'string' } } }, 'Raw': { 'Data': b'bytes' } } )
string
A unique name that helps you to identify the predictive inbox placement test when you retrieve the results.
string
[REQUIRED]
The email address that the predictive inbox placement test email was sent from.
dict
[REQUIRED]
The HTML body of the message that you sent when you performed the predictive inbox placement test.
Simple (dict) --
The simple email message. The message consists of a subject and a message body.
Subject (dict) -- [REQUIRED]
The subject line of the email. The subject line can only contain 7-bit ASCII characters. However, you can specify non-ASCII characters in the subject line by using encoded-word syntax, as described in RFC 2047 .
Data (string) -- [REQUIRED]
The content of the message itself.
Charset (string) --
The character set for the content. Because of the constraints of the SMTP protocol, Amazon Pinpoint uses 7-bit ASCII by default. If the text includes characters outside of the ASCII range, you have to specify a character set. For example, you could specify UTF-8 , ISO-8859-1 , or Shift_JIS .
Body (dict) -- [REQUIRED]
The body of the message. You can specify an HTML version of the message, a text-only version of the message, or both.
Text (dict) --
An object that represents the version of the message that is displayed in email clients that don't support HTML, or clients where the recipient has disabled HTML rendering.
Data (string) -- [REQUIRED]
The content of the message itself.
Charset (string) --
The character set for the content. Because of the constraints of the SMTP protocol, Amazon Pinpoint uses 7-bit ASCII by default. If the text includes characters outside of the ASCII range, you have to specify a character set. For example, you could specify UTF-8 , ISO-8859-1 , or Shift_JIS .
Html (dict) --
An object that represents the version of the message that is displayed in email clients that support HTML. HTML messages can include formatted text, hyperlinks, images, and more.
Data (string) -- [REQUIRED]
The content of the message itself.
Charset (string) --
The character set for the content. Because of the constraints of the SMTP protocol, Amazon Pinpoint uses 7-bit ASCII by default. If the text includes characters outside of the ASCII range, you have to specify a character set. For example, you could specify UTF-8 , ISO-8859-1 , or Shift_JIS .
Raw (dict) --
The raw email message. The message has to meet the following criteria:
The message has to contain a header and a body, separated by one blank line.
All of the required header fields must be present in the message.
Each part of a multipart MIME message must be formatted properly.
If you include attachments, they must be in a file format that Amazon Pinpoint supports.
The entire message must be Base64 encoded.
If any of the MIME parts in your message contain content that is outside of the 7-bit ASCII character range, you should encode that content to ensure that recipients' email clients render the message properly.
The length of any single line of text in the message can't exceed 1,000 characters. This restriction is defined in RFC 5321 .
Data (bytes) -- [REQUIRED]
The raw email message. The message has to meet the following criteria:
The message has to contain a header and a body, separated by one blank line.
All of the required header fields must be present in the message.
Each part of a multipart MIME message must be formatted properly.
Attachments must be in a file format that Amazon Pinpoint supports.
The entire message must be Base64 encoded.
If any of the MIME parts in your message contain content that is outside of the 7-bit ASCII character range, you should encode that content to ensure that recipients' email clients render the message properly.
The length of any single line of text in the message can't exceed 1,000 characters. This restriction is defined in RFC 5321 .
dict
Response Syntax
{ 'ReportId': 'string', 'DeliverabilityTestStatus': 'IN_PROGRESS'|'COMPLETED' }
Response Structure
(dict) --
Information about the predictive inbox placement test that you created.
ReportId (string) --
A unique string that identifies the predictive inbox placement test.
DeliverabilityTestStatus (string) --
The status of the predictive inbox placement test. If the status is IN_PROGRESS , then the predictive inbox placement test is currently running. Predictive inbox placement tests are usually complete within 24 hours of creating the test. If the status is COMPLETE , then the test is finished, and you can use the GetDeliverabilityTestReport to view the results of the test.
Retrieve a list of the blacklists that your dedicated IP addresses appear on.
See also: AWS API Documentation
Request Syntax
client.get_blacklist_reports( BlacklistItemNames=[ 'string', ] )
list
[REQUIRED]
A list of IP addresses that you want to retrieve blacklist information about. You can only specify the dedicated IP addresses that you use to send email using Amazon Pinpoint or Amazon SES.
(string) --
An IP address that you want to obtain blacklist information for.
dict
Response Syntax
{ 'BlacklistReport': { 'string': [ { 'RblName': 'string', 'ListingTime': datetime(2015, 1, 1), 'Description': 'string' }, ] } }
Response Structure
(dict) --
An object that contains information about blacklist events.
BlacklistReport (dict) --
An object that contains information about a blacklist that one of your dedicated IP addresses appears on.
(string) --
An IP address that you want to obtain blacklist information for.
(list) --
(dict) --
An object that contains information about a blacklisting event that impacts one of the dedicated IP addresses that is associated with your account.
RblName (string) --
The name of the blacklist that the IP address appears on.
ListingTime (datetime) --
The time when the blacklisting event occurred, shown in Unix time format.
Description (string) --
Additional information about the blacklisting event, as provided by the blacklist maintainer.
Show the status of the Deliverability dashboard. When the Deliverability dashboard is enabled, you gain access to reputation metrics for the domains that you use to send email using Amazon Pinpoint. You also gain the ability to perform predictive inbox placement tests.
When you use the Deliverability dashboard, you pay a monthly charge of USD$1,250.00, in addition to any other fees that you accrue by using Amazon Pinpoint. If you enable the Deliverability dashboard after the first day of a calendar month, AWS prorates the monthly charge based on how many days have elapsed in the current calendar month.
See also: AWS API Documentation
Request Syntax
client.get_deliverability_dashboard_options()
dict
Response Syntax
{ 'DashboardEnabled': True|False }
Response Structure
(dict) --
An object that shows the status of the Deliverability dashboard for your Amazon Pinpoint account.
DashboardEnabled (boolean) --
Indicates whether the Deliverability dashboard is enabled. If the value is true , then the dashboard is enabled.
Enable or disable the Deliverability dashboard. When you enable the Deliverability dashboard, you gain access to reputation metrics for the domains that you use to send email using Amazon Pinpoint. You also gain the ability to perform predictive inbox placement tests.
When you use the Deliverability dashboard, you pay a monthly charge of USD$1,250.00, in addition to any other fees that you accrue by using Amazon Pinpoint. If you enable the Deliverability dashboard after the first day of a calendar month, we prorate the monthly charge based on how many days have elapsed in the current calendar month.
See also: AWS API Documentation
Request Syntax
client.put_deliverability_dashboard_option( DashboardEnabled=True|False )
boolean
[REQUIRED]
Indicates whether the Deliverability dashboard is enabled. If the value is true , then the dashboard is enabled.
dict
Response Syntax
{}
Response Structure
(dict) --
A response that indicates whether the Deliverability dashboard is enabled for your Amazon Pinpoint account.
Retrieve the results of a predictive inbox placement test.
See also: AWS API Documentation
Request Syntax
client.get_deliverability_test_report( ReportId='string' )
string
[REQUIRED]
A unique string that identifies the predictive inbox placement test.
dict
Response Syntax
{ 'DeliverabilityTestReport': { 'ReportId': 'string', 'ReportName': 'string', 'Subject': 'string', 'FromEmailAddress': 'string', 'CreateDate': datetime(2015, 1, 1), 'DeliverabilityTestStatus': 'IN_PROGRESS'|'COMPLETED' }, 'OverallPlacement': { 'InboxPercentage': 123.0, 'SpamPercentage': 123.0, 'MissingPercentage': 123.0, 'SpfPercentage': 123.0, 'DkimPercentage': 123.0 }, 'IspPlacements': [ { 'IspName': 'string', 'PlacementStatistics': { 'InboxPercentage': 123.0, 'SpamPercentage': 123.0, 'MissingPercentage': 123.0, 'SpfPercentage': 123.0, 'DkimPercentage': 123.0 } }, ], 'Message': 'string' }
Response Structure
(dict) --
The results of the predictive inbox placement test.
DeliverabilityTestReport (dict) --
An object that contains the results of the predictive inbox placement test.
ReportId (string) --
A unique string that identifies the predictive inbox placement test.
ReportName (string) --
A name that helps you identify a predictive inbox placement test report.
Subject (string) --
The subject line for an email that you submitted in a predictive inbox placement test.
FromEmailAddress (string) --
The sender address that you specified for the predictive inbox placement test.
CreateDate (datetime) --
The date and time when the predictive inbox placement test was created, in Unix time format.
DeliverabilityTestStatus (string) --
The status of the predictive inbox placement test. If the status is IN_PROGRESS , then the predictive inbox placement test is currently running. Predictive inbox placement tests are usually complete within 24 hours of creating the test. If the status is COMPLETE , then the test is finished, and you can use the GetDeliverabilityTestReport to view the results of the test.
OverallPlacement (dict) --
An object that specifies how many test messages that were sent during the predictive inbox placement test were delivered to recipients' inboxes, how many were sent to recipients' spam folders, and how many weren't delivered.
InboxPercentage (float) --
The percentage of emails that arrived in recipients' inboxes during the predictive inbox placement test.
SpamPercentage (float) --
The percentage of emails that arrived in recipients' spam or junk mail folders during the predictive inbox placement test.
MissingPercentage (float) --
The percentage of emails that didn't arrive in recipients' inboxes at all during the predictive inbox placement test.
SpfPercentage (float) --
The percentage of emails that were authenticated by using Sender Policy Framework (SPF) during the predictive inbox placement test.
DkimPercentage (float) --
The percentage of emails that were authenticated by using DomainKeys Identified Mail (DKIM) during the predictive inbox placement test.
IspPlacements (list) --
An object that describes how the test email was handled by several email providers, including Gmail, Hotmail, Yahoo, AOL, and others.
(dict) --
An object that describes how email sent during the predictive inbox placement test was handled by a certain email provider.
IspName (string) --
The name of the email provider that the inbox placement data applies to.
PlacementStatistics (dict) --
An object that contains inbox placement metrics for a specific email provider.
InboxPercentage (float) --
The percentage of emails that arrived in recipients' inboxes during the predictive inbox placement test.
SpamPercentage (float) --
The percentage of emails that arrived in recipients' spam or junk mail folders during the predictive inbox placement test.
MissingPercentage (float) --
The percentage of emails that didn't arrive in recipients' inboxes at all during the predictive inbox placement test.
SpfPercentage (float) --
The percentage of emails that were authenticated by using Sender Policy Framework (SPF) during the predictive inbox placement test.
DkimPercentage (float) --
The percentage of emails that were authenticated by using DomainKeys Identified Mail (DKIM) during the predictive inbox placement test.
Message (string) --
An object that contains the message that you sent when you performed this predictive inbox placement test.
Retrieve inbox placement and engagement rates for the domains that you use to send email.
See also: AWS API Documentation
Request Syntax
client.get_domain_statistics_report( Domain='string', StartDate=datetime(2015, 1, 1), EndDate=datetime(2015, 1, 1) )
string
[REQUIRED]
The domain that you want to obtain deliverability metrics for.
datetime
[REQUIRED]
The first day (in Unix time) that you want to obtain domain deliverability metrics for.
datetime
[REQUIRED]
The last day (in Unix time) that you want to obtain domain deliverability metrics for. The EndDate that you specify has to be less than or equal to 30 days after the StartDate .
dict
Response Syntax
{ 'OverallVolume': { 'VolumeStatistics': { 'InboxRawCount': 123, 'SpamRawCount': 123, 'ProjectedInbox': 123, 'ProjectedSpam': 123 }, 'ReadRatePercent': 123.0, 'DomainIspPlacements': [ { 'IspName': 'string', 'InboxRawCount': 123, 'SpamRawCount': 123, 'InboxPercentage': 123.0, 'SpamPercentage': 123.0 }, ] }, 'DailyVolumes': [ { 'StartDate': datetime(2015, 1, 1), 'VolumeStatistics': { 'InboxRawCount': 123, 'SpamRawCount': 123, 'ProjectedInbox': 123, 'ProjectedSpam': 123 }, 'DomainIspPlacements': [ { 'IspName': 'string', 'InboxRawCount': 123, 'SpamRawCount': 123, 'InboxPercentage': 123.0, 'SpamPercentage': 123.0 }, ] }, ] }
Response Structure
(dict) --
An object that includes statistics that are related to the domain that you specified.
OverallVolume (dict) --
An object that contains deliverability metrics for the domain that you specified. The data in this object is a summary of all of the data that was collected from the StartDate to the EndDate .
VolumeStatistics (dict) --
An object that contains information about the numbers of messages that arrived in recipients' inboxes and junk mail folders.
InboxRawCount (integer) --
The total number of emails that arrived in recipients' inboxes.
SpamRawCount (integer) --
The total number of emails that arrived in recipients' spam or junk mail folders.
ProjectedInbox (integer) --
An estimate of the percentage of emails sent from the current domain that will arrive in recipients' inboxes.
ProjectedSpam (integer) --
An estimate of the percentage of emails sent from the current domain that will arrive in recipients' spam or junk mail folders.
ReadRatePercent (float) --
The percentage of emails that were sent from the domain that were read by their recipients.
DomainIspPlacements (list) --
An object that contains inbox and junk mail placement metrics for individual email providers.
(dict) --
An object that contains inbox placement data for email sent from one of your email domains to a specific email provider.
IspName (string) --
The name of the email provider that the inbox placement data applies to.
InboxRawCount (integer) --
The total number of messages that were sent from the selected domain to the specified email provider that arrived in recipients' inboxes.
SpamRawCount (integer) --
The total number of messages that were sent from the selected domain to the specified email provider that arrived in recipients' spam or junk mail folders.
InboxPercentage (float) --
The percentage of messages that were sent from the selected domain to the specified email provider that arrived in recipients' inboxes.
SpamPercentage (float) --
The percentage of messages that were sent from the selected domain to the specified email provider that arrived in recipients' spam or junk mail folders.
DailyVolumes (list) --
An object that contains deliverability metrics for the domain that you specified. This object contains data for each day, starting on the StartDate and ending on the EndDate .
(dict) --
An object that contains information about the volume of email sent on each day of the analysis period.
StartDate (datetime) --
The date that the DailyVolume metrics apply to, in Unix time.
VolumeStatistics (dict) --
An object that contains inbox placement metrics for a specific day in the analysis period.
InboxRawCount (integer) --
The total number of emails that arrived in recipients' inboxes.
SpamRawCount (integer) --
The total number of emails that arrived in recipients' spam or junk mail folders.
ProjectedInbox (integer) --
An estimate of the percentage of emails sent from the current domain that will arrive in recipients' inboxes.
ProjectedSpam (integer) --
An estimate of the percentage of emails sent from the current domain that will arrive in recipients' spam or junk mail folders.
DomainIspPlacements (list) --
An object that contains inbox placement metrics for a specifid day in the analysis period, broken out by the recipient's email provider.
(dict) --
An object that contains inbox placement data for email sent from one of your email domains to a specific email provider.
IspName (string) --
The name of the email provider that the inbox placement data applies to.
InboxRawCount (integer) --
The total number of messages that were sent from the selected domain to the specified email provider that arrived in recipients' inboxes.
SpamRawCount (integer) --
The total number of messages that were sent from the selected domain to the specified email provider that arrived in recipients' spam or junk mail folders.
InboxPercentage (float) --
The percentage of messages that were sent from the selected domain to the specified email provider that arrived in recipients' inboxes.
SpamPercentage (float) --
The percentage of messages that were sent from the selected domain to the specified email provider that arrived in recipients' spam or junk mail folders.