Amazon Pinpoint

2018/11/06 - Amazon Pinpoint - 5 updated api methods

Changes  This update adds the ability to send transactional email by using the SendMessage API. Transactional emails are emails that you send directly to specific email addresses. Unlike campaign-based email that you send from Amazon Pinpoint, you don't have to create segments and campaigns in order to send transactional email.

DeleteEmailChannel (updated) Link ¶
Changes (response)
{'EmailChannelResponse': {'ConfigurationSet': 'string'}}

Delete an email channel.

See also: AWS API Documentation

Request Syntax

client.delete_email_channel(
    ApplicationId='string'
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

rtype

dict

returns

Response Syntax

{
    'EmailChannelResponse': {
        'ApplicationId': 'string',
        'ConfigurationSet': 'string',
        'CreationDate': 'string',
        'Enabled': True|False,
        'FromAddress': 'string',
        'HasCredential': True|False,
        'Id': 'string',
        'Identity': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'MessagesPerSecond': 123,
        'Platform': 'string',
        'RoleArn': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response

    • EmailChannelResponse (dict) -- Email Channel Response.

      • ApplicationId (string) -- The unique ID of the application to which the email channel belongs.

      • ConfigurationSet (string) -- The configuration set that you want to use when you send email using the Pinpoint Email API.

      • CreationDate (string) -- The date that the settings were last updated in ISO 8601 format.

      • Enabled (boolean) -- If the channel is enabled for sending messages.

      • FromAddress (string) -- The email address used to send emails from.

      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.

      • Id (string) -- Channel ID. Not used, only for backwards compatibility.

      • Identity (string) -- The ARN of an identity verified with SES.

      • IsArchived (boolean) -- Is this channel archived

      • LastModifiedBy (string) -- Who last updated this entry

      • LastModifiedDate (string) -- Last date this was updated

      • MessagesPerSecond (integer) -- Messages per second that can be sent

      • Platform (string) -- Platform type. Will be "EMAIL"

      • RoleArn (string) -- The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion service

      • Version (integer) -- Version of channel

GetEmailChannel (updated) Link ¶
Changes (response)
{'EmailChannelResponse': {'ConfigurationSet': 'string'}}

Get an email channel.

See also: AWS API Documentation

Request Syntax

client.get_email_channel(
    ApplicationId='string'
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

rtype

dict

returns

Response Syntax

{
    'EmailChannelResponse': {
        'ApplicationId': 'string',
        'ConfigurationSet': 'string',
        'CreationDate': 'string',
        'Enabled': True|False,
        'FromAddress': 'string',
        'HasCredential': True|False,
        'Id': 'string',
        'Identity': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'MessagesPerSecond': 123,
        'Platform': 'string',
        'RoleArn': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response

    • EmailChannelResponse (dict) -- Email Channel Response.

      • ApplicationId (string) -- The unique ID of the application to which the email channel belongs.

      • ConfigurationSet (string) -- The configuration set that you want to use when you send email using the Pinpoint Email API.

      • CreationDate (string) -- The date that the settings were last updated in ISO 8601 format.

      • Enabled (boolean) -- If the channel is enabled for sending messages.

      • FromAddress (string) -- The email address used to send emails from.

      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.

      • Id (string) -- Channel ID. Not used, only for backwards compatibility.

      • Identity (string) -- The ARN of an identity verified with SES.

      • IsArchived (boolean) -- Is this channel archived

      • LastModifiedBy (string) -- Who last updated this entry

      • LastModifiedDate (string) -- Last date this was updated

      • MessagesPerSecond (integer) -- Messages per second that can be sent

      • Platform (string) -- Platform type. Will be "EMAIL"

      • RoleArn (string) -- The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion service

      • Version (integer) -- Version of channel

SendMessages (updated) Link ¶
Changes (request)
{'MessageRequest': {'MessageConfiguration': {'EmailMessage': {'Body': 'string',
                                                              'FeedbackForwardingAddress': 'string',
                                                              'FromAddress': 'string',
                                                              'RawEmail': {'Data': 'blob'},
                                                              'ReplyToAddresses': ['string'],
                                                              'SimpleEmail': {'HtmlPart': {'Charset': 'string',
                                                                                           'Data': 'string'},
                                                                              'Subject': {'Charset': 'string',
                                                                                          'Data': 'string'},
                                                                              'TextPart': {'Charset': 'string',
                                                                                           'Data': 'string'}},
                                                              'Substitutions': {'string': ['string']}}}}}

Used to send a direct message.

See also: AWS API Documentation

Request Syntax

client.send_messages(
    ApplicationId='string',
    MessageRequest={
        'Addresses': {
            'string': {
                'BodyOverride': 'string',
                'ChannelType': 'GCM'|'APNS'|'APNS_SANDBOX'|'APNS_VOIP'|'APNS_VOIP_SANDBOX'|'ADM'|'SMS'|'EMAIL'|'BAIDU'|'CUSTOM',
                'Context': {
                    'string': 'string'
                },
                'RawContent': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'TitleOverride': 'string'
            }
        },
        'Context': {
            'string': 'string'
        },
        'Endpoints': {
            'string': {
                'BodyOverride': 'string',
                'Context': {
                    'string': 'string'
                },
                'RawContent': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'TitleOverride': 'string'
            }
        },
        'MessageConfiguration': {
            'ADMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ConsolidationKey': 'string',
                'Data': {
                    'string': 'string'
                },
                'ExpiresAfter': 'string',
                'IconReference': 'string',
                'ImageIconUrl': 'string',
                'ImageUrl': 'string',
                'MD5': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'SmallImageIconUrl': 'string',
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'Title': 'string',
                'Url': 'string'
            },
            'APNSMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Badge': 123,
                'Body': 'string',
                'Category': 'string',
                'CollapseId': 'string',
                'Data': {
                    'string': 'string'
                },
                'MediaUrl': 'string',
                'PreferredAuthenticationMethod': 'string',
                'Priority': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'ThreadId': 'string',
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'BaiduMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'Data': {
                    'string': 'string'
                },
                'IconReference': 'string',
                'ImageIconUrl': 'string',
                'ImageUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'SmallImageIconUrl': 'string',
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'DefaultMessage': {
                'Body': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                }
            },
            'DefaultPushNotificationMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'Data': {
                    'string': 'string'
                },
                'SilentPush': True|False,
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'Title': 'string',
                'Url': 'string'
            },
            'EmailMessage': {
                'Body': 'string',
                'FeedbackForwardingAddress': 'string',
                'FromAddress': 'string',
                'RawEmail': {
                    'Data': b'bytes'
                },
                'ReplyToAddresses': [
                    'string',
                ],
                'SimpleEmail': {
                    'HtmlPart': {
                        'Charset': 'string',
                        'Data': 'string'
                    },
                    'Subject': {
                        'Charset': 'string',
                        'Data': 'string'
                    },
                    'TextPart': {
                        'Charset': 'string',
                        'Data': 'string'
                    }
                },
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                }
            },
            'GCMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'CollapseKey': 'string',
                'Data': {
                    'string': 'string'
                },
                'IconReference': 'string',
                'ImageIconUrl': 'string',
                'ImageUrl': 'string',
                'Priority': 'string',
                'RawContent': 'string',
                'RestrictedPackageName': 'string',
                'SilentPush': True|False,
                'SmallImageIconUrl': 'string',
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'SMSMessage': {
                'Body': 'string',
                'Keyword': 'string',
                'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                'OriginationNumber': 'string',
                'SenderId': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                }
            }
        },
        'TraceId': 'string'
    }
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type MessageRequest

dict

param MessageRequest

[REQUIRED] Send message request.

  • Addresses (dict) -- A map of key-value pairs, where each key is an address and each value is an AddressConfiguration object. An address can be a push notification token, a phone number, or an email address.

    • (string) --

      • (dict) -- Address configuration.

        • BodyOverride (string) -- Body override. If specified will override default body.

        • ChannelType (string) -- The channel type. Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX | ADM | SMS | EMAIL | BAIDU

        • Context (dict) -- A map of custom attributes to attributes to be attached to the message for this address. This payload is added to the push notification's 'data.pinpoint' object or added to the email/sms delivery receipt event attributes.

          • (string) --

            • (string) --

        • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

        • Substitutions (dict) -- A map of substitution values for the message to be merged with the DefaultMessage's substitutions. Substitutions on this map take precedence over the all other substitutions.

          • (string) --

            • (list) --

              • (string) --

        • TitleOverride (string) -- Title override. If specified will override default title if applicable.

  • Context (dict) -- A map of custom attributes to attributes to be attached to the message. This payload is added to the push notification's 'data.pinpoint' object or added to the email/sms delivery receipt event attributes.

    • (string) --

      • (string) --

  • Endpoints (dict) -- A map of key-value pairs, where each key is an endpoint ID and each value is an EndpointSendConfiguration object. Within an EndpointSendConfiguration object, you can tailor the message for an endpoint by specifying message overrides or substitutions.

    • (string) --

      • (dict) -- Endpoint send configuration.

        • BodyOverride (string) -- Body override. If specified will override default body.

        • Context (dict) -- A map of custom attributes to attributes to be attached to the message for this address. This payload is added to the push notification's 'data.pinpoint' object or added to the email/sms delivery receipt event attributes.

          • (string) --

            • (string) --

        • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

        • Substitutions (dict) -- A map of substitution values for the message to be merged with the DefaultMessage's substitutions. Substitutions on this map take precedence over the all other substitutions.

          • (string) --

            • (list) --

              • (string) --

        • TitleOverride (string) -- Title override. If specified will override default title if applicable.

  • MessageConfiguration (dict) -- Message configuration.

    • ADMMessage (dict) -- The message to ADM channels. Overrides the default push notification message.

      • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • ConsolidationKey (string) -- Optional. Arbitrary string used to indicate multiple messages are logically the same and that ADM is allowed to drop previously enqueued messages in favor of this one.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • ExpiresAfter (string) -- Optional. Number of seconds ADM should retain the message if the device is offline

      • IconReference (string) -- The icon image name of the asset saved in your application.

      • ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.

      • ImageUrl (string) -- The URL that points to an image used in the push notification.

      • MD5 (string) -- Optional. Base-64-encoded MD5 checksum of the data parameter. Used to verify data integrity

      • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

      • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.

      • SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view

      • Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • Title (string) -- The message title that displays above the message on the user's device.

      • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.

    • APNSMessage (dict) -- The message to APNS channels. Overrides the default push notification message.

      • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Badge (integer) -- Include this key when you want the system to modify the badge of your app icon. If this key is not included in the dictionary, the badge is not changed. To remove the badge, set the value of this key to 0.

      • Body (string) -- The message body of the notification.

      • Category (string) -- Provide this key with a string value that represents the notification's type. This value corresponds to the value in the identifier property of one of your app's registered categories.

      • CollapseId (string) -- An ID that, if assigned to multiple messages, causes APNs to coalesce the messages into a single push notification instead of delivering each message individually. The value must not exceed 64 bytes. Amazon Pinpoint uses this value to set the apns-collapse-id request header when it sends the message to APNs.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • MediaUrl (string) -- The URL that points to a video used in the push notification.

      • PreferredAuthenticationMethod (string) -- The preferred authentication method, either "CERTIFICATE" or "TOKEN"

      • Priority (string) -- The message priority. Amazon Pinpoint uses this value to set the apns-priority request header when it sends the message to APNs. Accepts the following values: "5" - Low priority. Messages might be delayed, delivered in groups, and throttled. "10" - High priority. Messages are sent immediately. High priority messages must cause an alert, sound, or badge on the receiving device. The default value is "10". The equivalent values for FCM or GCM messages are "normal" and "high". Amazon Pinpoint accepts these values for APNs messages and converts them. For more information about the apns-priority parameter, see Communicating with APNs in the APNs Local and Remote Notification Programming Guide.

      • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

      • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.

      • Sound (string) -- Include this key when you want the system to play a sound. The value of this key is the name of a sound file in your app's main bundle or in the Library/Sounds folder of your app's data container. If the sound file cannot be found, or if you specify defaultfor the value, the system plays the default alert sound.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • ThreadId (string) -- Provide this key with a string value that represents the app-specific identifier for grouping notifications. If you provide a Notification Content app extension, you can use this value to group your notifications together.

      • TimeToLive (integer) -- The length of time (in seconds) that APNs stores and attempts to deliver the message. If the value is 0, APNs does not store the message or attempt to deliver it more than once. Amazon Pinpoint uses this value to set the apns-expiration request header when it sends the message to APNs.

      • Title (string) -- The message title that displays above the message on the user's device.

      • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.

    • BaiduMessage (dict) -- The message to Baidu GCM channels. Overrides the default push notification message.

      • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • IconReference (string) -- The icon image name of the asset saved in your application.

      • ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.

      • ImageUrl (string) -- The URL that points to an image used in the push notification.

      • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

      • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.

      • SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view

      • Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept in Baidu storage if the device is offline. The and the default value and the maximum time to live supported is 7 days (604800 seconds)

      • Title (string) -- The message title that displays above the message on the user's device.

      • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.

    • DefaultMessage (dict) -- The default message for all channels.

      • Body (string) -- The message body of the notification, the email body or the text message.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

    • DefaultPushNotificationMessage (dict) -- The default push notification message for all push channels.

      • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • SilentPush (boolean) -- Indicates if the message should display on the recipient's device. You can use silent pushes for remote configuration or to deliver messages to in-app notification centers.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • Title (string) -- The message title that displays above the message on the user's device.

      • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.

    • EmailMessage (dict) -- The message to Email channels. Overrides the default message.

      • Body (string) -- The body of the email message.

      • FeedbackForwardingAddress (string) -- The email address that bounces and complaints will be forwarded to when feedback forwarding is enabled.

      • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.

      • RawEmail (dict) -- An email represented as a raw MIME message.

        • Data (bytes) -- The raw data of the email.

      • ReplyToAddresses (list) -- The reply-to email address(es) for the email. If the recipient replies to the email, each reply-to address will receive the reply.

        • (string) --

      • SimpleEmail (dict) -- An email composed of a subject, a text part and a html part.

        • HtmlPart (dict) -- The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.

          • Charset (string) -- The character set of the content.

          • Data (string) -- The textual data of the content.

        • Subject (dict) -- The subject of the message: A short summary of the content, which will appear in the recipient's inbox.

          • Charset (string) -- The character set of the content.

          • Data (string) -- The textual data of the content.

        • TextPart (dict) -- The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).

          • Charset (string) -- The character set of the content.

          • Data (string) -- The textual data of the content.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

    • GCMMessage (dict) -- The message to GCM channels. Overrides the default push notification message.

      • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • CollapseKey (string) -- This parameter identifies a group of messages (e.g., with collapse_key: "Updates Available") that can be collapsed, so that only the last message gets sent when delivery can be resumed. This is intended to avoid sending too many of the same messages when the device comes back online or becomes active.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • IconReference (string) -- The icon image name of the asset saved in your application.

      • ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.

      • ImageUrl (string) -- The URL that points to an image used in the push notification.

      • Priority (string) -- The message priority. Amazon Pinpoint uses this value to set the FCM or GCM priority parameter when it sends the message. Accepts the following values: "Normal" - Messages might be delayed. Delivery is optimized for battery usage on the receiving device. Use normal priority unless immediate delivery is required. "High" - Messages are sent immediately and might wake a sleeping device. The equivalent values for APNs messages are "5" and "10". Amazon Pinpoint accepts these values here and converts them. For more information, see About FCM Messages in the Firebase documentation.

      • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

      • RestrictedPackageName (string) -- This parameter specifies the package name of the application where the registration tokens must match in order to receive the message.

      • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.

      • SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view

      • Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • TimeToLive (integer) -- The length of time (in seconds) that FCM or GCM stores and attempts to deliver the message. If unspecified, the value defaults to the maximum, which is 2,419,200 seconds (28 days). Amazon Pinpoint uses this value to set the FCM or GCM time_to_live parameter.

      • Title (string) -- The message title that displays above the message on the user's device.

      • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.

    • SMSMessage (dict) -- The message to SMS channels. Overrides the default message.

      • Body (string) -- The body of the SMS message.

      • Keyword (string) -- The SMS program name that you provided to AWS Support when you requested your dedicated number.

      • MessageType (string) -- Is this a transaction priority message or lower priority.

      • OriginationNumber (string) -- The phone number that the SMS message originates from. Specify one of the dedicated long codes or short codes that you requested from AWS Support and that is assigned to your account. If this attribute is not specified, Amazon Pinpoint randomly assigns a long code.

      • SenderId (string) -- The sender ID that is shown as the message sender on the recipient's device. Support for sender IDs varies by country or region.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

  • TraceId (string) -- A unique ID that you can use to trace a message. This ID is visible to recipients.

rtype

dict

returns

Response Syntax

{
    'MessageResponse': {
        'ApplicationId': 'string',
        'EndpointResult': {
            'string': {
                'Address': 'string',
                'DeliveryStatus': 'SUCCESSFUL'|'THROTTLED'|'TEMPORARY_FAILURE'|'PERMANENT_FAILURE'|'UNKNOWN_FAILURE'|'OPT_OUT'|'DUPLICATE',
                'MessageId': 'string',
                'StatusCode': 123,
                'StatusMessage': 'string',
                'UpdatedToken': 'string'
            }
        },
        'RequestId': 'string',
        'Result': {
            'string': {
                'DeliveryStatus': 'SUCCESSFUL'|'THROTTLED'|'TEMPORARY_FAILURE'|'PERMANENT_FAILURE'|'UNKNOWN_FAILURE'|'OPT_OUT'|'DUPLICATE',
                'MessageId': 'string',
                'StatusCode': 123,
                'StatusMessage': 'string',
                'UpdatedToken': 'string'
            }
        }
    }
}

Response Structure

  • (dict) -- 200 response

    • MessageResponse (dict) -- Send message response.

      • ApplicationId (string) -- Application id of the message.

      • EndpointResult (dict) -- A map containing a multi part response for each address, with the endpointId as the key and the result as the value.

        • (string) --

          • (dict) -- The result from sending a message to an endpoint.

            • Address (string) -- Address that endpoint message was delivered to.

            • DeliveryStatus (string) -- The delivery status of the message. Possible values: SUCCESS - The message was successfully delivered to the endpoint. TRANSIENT_FAILURE - A temporary error occurred. Amazon Pinpoint will attempt to deliver the message again later. FAILURE_PERMANENT - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again. TIMEOUT - The message couldn't be sent within the timeout period. QUIET_TIME - The local time for the endpoint was within the Quiet Hours for the campaign. DAILY_CAP - The endpoint has received the maximum number of messages it can receive within a 24-hour period. HOLDOUT - The endpoint was in a hold out treatment for the campaign. THROTTLED - Amazon Pinpoint throttled sending to this endpoint. EXPIRED - The endpoint address is expired. CAMPAIGN_CAP - The endpoint received the maximum number of messages allowed by the campaign. SERVICE_FAILURE - A service-level failure prevented Amazon Pinpoint from delivering the message. UNKNOWN - An unknown error occurred.

            • MessageId (string) -- Unique message identifier associated with the message that was sent.

            • StatusCode (integer) -- Downstream service status code.

            • StatusMessage (string) -- Status message for message delivery.

            • UpdatedToken (string) -- If token was updated as part of delivery. (This is GCM Specific)

      • RequestId (string) -- Original request Id for which this message was delivered.

      • Result (dict) -- A map containing a multi part response for each address, with the address as the key(Email address, phone number or push token) and the result as the value.

        • (string) --

          • (dict) -- The result from sending a message to an address.

            • DeliveryStatus (string) -- The delivery status of the message. Possible values: SUCCESS - The message was successfully delivered to the endpoint. TRANSIENT_FAILURE - A temporary error occurred. Amazon Pinpoint will attempt to deliver the message again later. FAILURE_PERMANENT - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again. TIMEOUT - The message couldn't be sent within the timeout period. QUIET_TIME - The local time for the endpoint was within the Quiet Hours for the campaign. DAILY_CAP - The endpoint has received the maximum number of messages it can receive within a 24-hour period. HOLDOUT - The endpoint was in a hold out treatment for the campaign. THROTTLED - Amazon Pinpoint throttled sending to this endpoint. EXPIRED - The endpoint address is expired. CAMPAIGN_CAP - The endpoint received the maximum number of messages allowed by the campaign. SERVICE_FAILURE - A service-level failure prevented Amazon Pinpoint from delivering the message. UNKNOWN - An unknown error occurred.

            • MessageId (string) -- Unique message identifier associated with the message that was sent.

            • StatusCode (integer) -- Downstream service status code.

            • StatusMessage (string) -- Status message for message delivery.

            • UpdatedToken (string) -- If token was updated as part of delivery. (This is GCM Specific)

SendUsersMessages (updated) Link ¶
Changes (request)
{'SendUsersMessageRequest': {'MessageConfiguration': {'EmailMessage': {'Body': 'string',
                                                                       'FeedbackForwardingAddress': 'string',
                                                                       'FromAddress': 'string',
                                                                       'RawEmail': {'Data': 'blob'},
                                                                       'ReplyToAddresses': ['string'],
                                                                       'SimpleEmail': {'HtmlPart': {'Charset': 'string',
                                                                                                    'Data': 'string'},
                                                                                       'Subject': {'Charset': 'string',
                                                                                                   'Data': 'string'},
                                                                                       'TextPart': {'Charset': 'string',
                                                                                                    'Data': 'string'}},
                                                                       'Substitutions': {'string': ['string']}}}}}

Used to send a message to a list of users.

See also: AWS API Documentation

Request Syntax

client.send_users_messages(
    ApplicationId='string',
    SendUsersMessageRequest={
        'Context': {
            'string': 'string'
        },
        'MessageConfiguration': {
            'ADMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'ConsolidationKey': 'string',
                'Data': {
                    'string': 'string'
                },
                'ExpiresAfter': 'string',
                'IconReference': 'string',
                'ImageIconUrl': 'string',
                'ImageUrl': 'string',
                'MD5': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'SmallImageIconUrl': 'string',
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'Title': 'string',
                'Url': 'string'
            },
            'APNSMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Badge': 123,
                'Body': 'string',
                'Category': 'string',
                'CollapseId': 'string',
                'Data': {
                    'string': 'string'
                },
                'MediaUrl': 'string',
                'PreferredAuthenticationMethod': 'string',
                'Priority': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'ThreadId': 'string',
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'BaiduMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'Data': {
                    'string': 'string'
                },
                'IconReference': 'string',
                'ImageIconUrl': 'string',
                'ImageUrl': 'string',
                'RawContent': 'string',
                'SilentPush': True|False,
                'SmallImageIconUrl': 'string',
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'DefaultMessage': {
                'Body': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                }
            },
            'DefaultPushNotificationMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'Data': {
                    'string': 'string'
                },
                'SilentPush': True|False,
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'Title': 'string',
                'Url': 'string'
            },
            'EmailMessage': {
                'Body': 'string',
                'FeedbackForwardingAddress': 'string',
                'FromAddress': 'string',
                'RawEmail': {
                    'Data': b'bytes'
                },
                'ReplyToAddresses': [
                    'string',
                ],
                'SimpleEmail': {
                    'HtmlPart': {
                        'Charset': 'string',
                        'Data': 'string'
                    },
                    'Subject': {
                        'Charset': 'string',
                        'Data': 'string'
                    },
                    'TextPart': {
                        'Charset': 'string',
                        'Data': 'string'
                    }
                },
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                }
            },
            'GCMMessage': {
                'Action': 'OPEN_APP'|'DEEP_LINK'|'URL',
                'Body': 'string',
                'CollapseKey': 'string',
                'Data': {
                    'string': 'string'
                },
                'IconReference': 'string',
                'ImageIconUrl': 'string',
                'ImageUrl': 'string',
                'Priority': 'string',
                'RawContent': 'string',
                'RestrictedPackageName': 'string',
                'SilentPush': True|False,
                'SmallImageIconUrl': 'string',
                'Sound': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'TimeToLive': 123,
                'Title': 'string',
                'Url': 'string'
            },
            'SMSMessage': {
                'Body': 'string',
                'Keyword': 'string',
                'MessageType': 'TRANSACTIONAL'|'PROMOTIONAL',
                'OriginationNumber': 'string',
                'SenderId': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                }
            }
        },
        'TraceId': 'string',
        'Users': {
            'string': {
                'BodyOverride': 'string',
                'Context': {
                    'string': 'string'
                },
                'RawContent': 'string',
                'Substitutions': {
                    'string': [
                        'string',
                    ]
                },
                'TitleOverride': 'string'
            }
        }
    }
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type SendUsersMessageRequest

dict

param SendUsersMessageRequest

[REQUIRED] Send message request.

  • Context (dict) -- A map of custom attribute-value pairs. Amazon Pinpoint adds these attributes to the data.pinpoint object in the body of the push notification payload. Amazon Pinpoint also provides these attributes in the events that it generates for users-messages deliveries.

    • (string) --

      • (string) --

  • MessageConfiguration (dict) -- Message definitions for the default message and any messages that are tailored for specific channels.

    • ADMMessage (dict) -- The message to ADM channels. Overrides the default push notification message.

      • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • ConsolidationKey (string) -- Optional. Arbitrary string used to indicate multiple messages are logically the same and that ADM is allowed to drop previously enqueued messages in favor of this one.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • ExpiresAfter (string) -- Optional. Number of seconds ADM should retain the message if the device is offline

      • IconReference (string) -- The icon image name of the asset saved in your application.

      • ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.

      • ImageUrl (string) -- The URL that points to an image used in the push notification.

      • MD5 (string) -- Optional. Base-64-encoded MD5 checksum of the data parameter. Used to verify data integrity

      • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

      • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.

      • SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view

      • Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • Title (string) -- The message title that displays above the message on the user's device.

      • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.

    • APNSMessage (dict) -- The message to APNS channels. Overrides the default push notification message.

      • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Badge (integer) -- Include this key when you want the system to modify the badge of your app icon. If this key is not included in the dictionary, the badge is not changed. To remove the badge, set the value of this key to 0.

      • Body (string) -- The message body of the notification.

      • Category (string) -- Provide this key with a string value that represents the notification's type. This value corresponds to the value in the identifier property of one of your app's registered categories.

      • CollapseId (string) -- An ID that, if assigned to multiple messages, causes APNs to coalesce the messages into a single push notification instead of delivering each message individually. The value must not exceed 64 bytes. Amazon Pinpoint uses this value to set the apns-collapse-id request header when it sends the message to APNs.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • MediaUrl (string) -- The URL that points to a video used in the push notification.

      • PreferredAuthenticationMethod (string) -- The preferred authentication method, either "CERTIFICATE" or "TOKEN"

      • Priority (string) -- The message priority. Amazon Pinpoint uses this value to set the apns-priority request header when it sends the message to APNs. Accepts the following values: "5" - Low priority. Messages might be delayed, delivered in groups, and throttled. "10" - High priority. Messages are sent immediately. High priority messages must cause an alert, sound, or badge on the receiving device. The default value is "10". The equivalent values for FCM or GCM messages are "normal" and "high". Amazon Pinpoint accepts these values for APNs messages and converts them. For more information about the apns-priority parameter, see Communicating with APNs in the APNs Local and Remote Notification Programming Guide.

      • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

      • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.

      • Sound (string) -- Include this key when you want the system to play a sound. The value of this key is the name of a sound file in your app's main bundle or in the Library/Sounds folder of your app's data container. If the sound file cannot be found, or if you specify defaultfor the value, the system plays the default alert sound.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • ThreadId (string) -- Provide this key with a string value that represents the app-specific identifier for grouping notifications. If you provide a Notification Content app extension, you can use this value to group your notifications together.

      • TimeToLive (integer) -- The length of time (in seconds) that APNs stores and attempts to deliver the message. If the value is 0, APNs does not store the message or attempt to deliver it more than once. Amazon Pinpoint uses this value to set the apns-expiration request header when it sends the message to APNs.

      • Title (string) -- The message title that displays above the message on the user's device.

      • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.

    • BaiduMessage (dict) -- The message to Baidu GCM channels. Overrides the default push notification message.

      • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • IconReference (string) -- The icon image name of the asset saved in your application.

      • ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.

      • ImageUrl (string) -- The URL that points to an image used in the push notification.

      • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

      • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.

      • SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view

      • Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • TimeToLive (integer) -- This parameter specifies how long (in seconds) the message should be kept in Baidu storage if the device is offline. The and the default value and the maximum time to live supported is 7 days (604800 seconds)

      • Title (string) -- The message title that displays above the message on the user's device.

      • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.

    • DefaultMessage (dict) -- The default message for all channels.

      • Body (string) -- The message body of the notification, the email body or the text message.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

    • DefaultPushNotificationMessage (dict) -- The default push notification message for all push channels.

      • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • SilentPush (boolean) -- Indicates if the message should display on the recipient's device. You can use silent pushes for remote configuration or to deliver messages to in-app notification centers.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • Title (string) -- The message title that displays above the message on the user's device.

      • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.

    • EmailMessage (dict) -- The message to Email channels. Overrides the default message.

      • Body (string) -- The body of the email message.

      • FeedbackForwardingAddress (string) -- The email address that bounces and complaints will be forwarded to when feedback forwarding is enabled.

      • FromAddress (string) -- The email address used to send the email from. Defaults to use FromAddress specified in the Email Channel.

      • RawEmail (dict) -- An email represented as a raw MIME message.

        • Data (bytes) -- The raw data of the email.

      • ReplyToAddresses (list) -- The reply-to email address(es) for the email. If the recipient replies to the email, each reply-to address will receive the reply.

        • (string) --

      • SimpleEmail (dict) -- An email composed of a subject, a text part and a html part.

        • HtmlPart (dict) -- The content of the message, in HTML format. Use this for email clients that can process HTML. You can include clickable links, formatted text, and much more in an HTML message.

          • Charset (string) -- The character set of the content.

          • Data (string) -- The textual data of the content.

        • Subject (dict) -- The subject of the message: A short summary of the content, which will appear in the recipient's inbox.

          • Charset (string) -- The character set of the content.

          • Data (string) -- The textual data of the content.

        • TextPart (dict) -- The content of the message, in text format. Use this for text-based email clients, or clients on high-latency networks (such as mobile devices).

          • Charset (string) -- The character set of the content.

          • Data (string) -- The textual data of the content.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

    • GCMMessage (dict) -- The message to GCM channels. Overrides the default push notification message.

      • Action (string) -- The action that occurs if the user taps a push notification delivered by the campaign: OPEN_APP - Your app launches, or it becomes the foreground app if it has been sent to the background. This is the default action. DEEP_LINK - Uses deep linking features in iOS and Android to open your app and display a designated user interface within the app. URL - The default mobile browser on the user's device launches and opens a web page at the URL you specify. Possible values include: OPEN_APP | DEEP_LINK | URL

      • Body (string) -- The message body of the notification.

      • CollapseKey (string) -- This parameter identifies a group of messages (e.g., with collapse_key: "Updates Available") that can be collapsed, so that only the last message gets sent when delivery can be resumed. This is intended to avoid sending too many of the same messages when the device comes back online or becomes active.

      • Data (dict) -- The data payload used for a silent push. This payload is added to the notifications' data.pinpoint.jsonBody' object

        • (string) --

          • (string) --

      • IconReference (string) -- The icon image name of the asset saved in your application.

      • ImageIconUrl (string) -- The URL that points to an image used as the large icon to the notification content view.

      • ImageUrl (string) -- The URL that points to an image used in the push notification.

      • Priority (string) -- The message priority. Amazon Pinpoint uses this value to set the FCM or GCM priority parameter when it sends the message. Accepts the following values: "Normal" - Messages might be delayed. Delivery is optimized for battery usage on the receiving device. Use normal priority unless immediate delivery is required. "High" - Messages are sent immediately and might wake a sleeping device. The equivalent values for APNs messages are "5" and "10". Amazon Pinpoint accepts these values here and converts them. For more information, see About FCM Messages in the Firebase documentation.

      • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

      • RestrictedPackageName (string) -- This parameter specifies the package name of the application where the registration tokens must match in order to receive the message.

      • SilentPush (boolean) -- Indicates if the message should display on the users device. Silent pushes can be used for Remote Configuration and Phone Home use cases.

      • SmallImageIconUrl (string) -- The URL that points to an image used as the small icon for the notification which will be used to represent the notification in the status bar and content view

      • Sound (string) -- Indicates a sound to play when the device receives the notification. Supports default, or the filename of a sound resource bundled in the app. Android sound files must reside in /res/raw/

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

      • TimeToLive (integer) -- The length of time (in seconds) that FCM or GCM stores and attempts to deliver the message. If unspecified, the value defaults to the maximum, which is 2,419,200 seconds (28 days). Amazon Pinpoint uses this value to set the FCM or GCM time_to_live parameter.

      • Title (string) -- The message title that displays above the message on the user's device.

      • Url (string) -- The URL to open in the user's mobile browser. Used if the value for Action is URL.

    • SMSMessage (dict) -- The message to SMS channels. Overrides the default message.

      • Body (string) -- The body of the SMS message.

      • Keyword (string) -- The SMS program name that you provided to AWS Support when you requested your dedicated number.

      • MessageType (string) -- Is this a transaction priority message or lower priority.

      • OriginationNumber (string) -- The phone number that the SMS message originates from. Specify one of the dedicated long codes or short codes that you requested from AWS Support and that is assigned to your account. If this attribute is not specified, Amazon Pinpoint randomly assigns a long code.

      • SenderId (string) -- The sender ID that is shown as the message sender on the recipient's device. Support for sender IDs varies by country or region.

      • Substitutions (dict) -- Default message substitutions. Can be overridden by individual address substitutions.

        • (string) --

          • (list) --

            • (string) --

  • TraceId (string) -- A unique ID that you can use to trace a message. This ID is visible to recipients.

  • Users (dict) -- A map that associates user IDs with EndpointSendConfiguration objects. Within an EndpointSendConfiguration object, you can tailor the message for a user by specifying message overrides or substitutions.

    • (string) --

      • (dict) -- Endpoint send configuration.

        • BodyOverride (string) -- Body override. If specified will override default body.

        • Context (dict) -- A map of custom attributes to attributes to be attached to the message for this address. This payload is added to the push notification's 'data.pinpoint' object or added to the email/sms delivery receipt event attributes.

          • (string) --

            • (string) --

        • RawContent (string) -- The Raw JSON formatted string to be used as the payload. This value overrides the message.

        • Substitutions (dict) -- A map of substitution values for the message to be merged with the DefaultMessage's substitutions. Substitutions on this map take precedence over the all other substitutions.

          • (string) --

            • (list) --

              • (string) --

        • TitleOverride (string) -- Title override. If specified will override default title if applicable.

rtype

dict

returns

Response Syntax

{
    'SendUsersMessageResponse': {
        'ApplicationId': 'string',
        'RequestId': 'string',
        'Result': {
            'string': {
                'string': {
                    'Address': 'string',
                    'DeliveryStatus': 'SUCCESSFUL'|'THROTTLED'|'TEMPORARY_FAILURE'|'PERMANENT_FAILURE'|'UNKNOWN_FAILURE'|'OPT_OUT'|'DUPLICATE',
                    'MessageId': 'string',
                    'StatusCode': 123,
                    'StatusMessage': 'string',
                    'UpdatedToken': 'string'
                }
            }
        }
    }
}

Response Structure

  • (dict) -- 200 response

    • SendUsersMessageResponse (dict) -- User send message response.

      • ApplicationId (string) -- The unique ID of the Amazon Pinpoint project used to send the message.

      • RequestId (string) -- The unique ID assigned to the users-messages request.

      • Result (dict) -- An object that shows the endpoints that were messaged for each user. The object provides a list of user IDs. For each user ID, it provides the endpoint IDs that were messaged. For each endpoint ID, it provides an EndpointMessageResult object.

        • (string) --

          • (dict) --

            • (string) --

              • (dict) -- The result from sending a message to an endpoint.

                • Address (string) -- Address that endpoint message was delivered to.

                • DeliveryStatus (string) -- The delivery status of the message. Possible values: SUCCESS - The message was successfully delivered to the endpoint. TRANSIENT_FAILURE - A temporary error occurred. Amazon Pinpoint will attempt to deliver the message again later. FAILURE_PERMANENT - An error occurred when delivering the message to the endpoint. Amazon Pinpoint won't attempt to send the message again. TIMEOUT - The message couldn't be sent within the timeout period. QUIET_TIME - The local time for the endpoint was within the Quiet Hours for the campaign. DAILY_CAP - The endpoint has received the maximum number of messages it can receive within a 24-hour period. HOLDOUT - The endpoint was in a hold out treatment for the campaign. THROTTLED - Amazon Pinpoint throttled sending to this endpoint. EXPIRED - The endpoint address is expired. CAMPAIGN_CAP - The endpoint received the maximum number of messages allowed by the campaign. SERVICE_FAILURE - A service-level failure prevented Amazon Pinpoint from delivering the message. UNKNOWN - An unknown error occurred.

                • MessageId (string) -- Unique message identifier associated with the message that was sent.

                • StatusCode (integer) -- Downstream service status code.

                • StatusMessage (string) -- Status message for message delivery.

                • UpdatedToken (string) -- If token was updated as part of delivery. (This is GCM Specific)

UpdateEmailChannel (updated) Link ¶
Changes (request, response)
Request
{'EmailChannelRequest': {'ConfigurationSet': 'string'}}
Response
{'EmailChannelResponse': {'ConfigurationSet': 'string'}}

Update an email channel.

See also: AWS API Documentation

Request Syntax

client.update_email_channel(
    ApplicationId='string',
    EmailChannelRequest={
        'ConfigurationSet': 'string',
        'Enabled': True|False,
        'FromAddress': 'string',
        'Identity': 'string',
        'RoleArn': 'string'
    }
)
type ApplicationId

string

param ApplicationId

[REQUIRED] The unique ID of your Amazon Pinpoint application.

type EmailChannelRequest

dict

param EmailChannelRequest

[REQUIRED] Email Channel Request

  • ConfigurationSet (string) -- The configuration set that you want to use when you send email using the Pinpoint Email API.

  • Enabled (boolean) -- If the channel is enabled for sending messages.

  • FromAddress (string) -- The email address used to send emails from.

  • Identity (string) -- The ARN of an identity verified with SES.

  • RoleArn (string) -- The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion service

rtype

dict

returns

Response Syntax

{
    'EmailChannelResponse': {
        'ApplicationId': 'string',
        'ConfigurationSet': 'string',
        'CreationDate': 'string',
        'Enabled': True|False,
        'FromAddress': 'string',
        'HasCredential': True|False,
        'Id': 'string',
        'Identity': 'string',
        'IsArchived': True|False,
        'LastModifiedBy': 'string',
        'LastModifiedDate': 'string',
        'MessagesPerSecond': 123,
        'Platform': 'string',
        'RoleArn': 'string',
        'Version': 123
    }
}

Response Structure

  • (dict) -- 200 response

    • EmailChannelResponse (dict) -- Email Channel Response.

      • ApplicationId (string) -- The unique ID of the application to which the email channel belongs.

      • ConfigurationSet (string) -- The configuration set that you want to use when you send email using the Pinpoint Email API.

      • CreationDate (string) -- The date that the settings were last updated in ISO 8601 format.

      • Enabled (boolean) -- If the channel is enabled for sending messages.

      • FromAddress (string) -- The email address used to send emails from.

      • HasCredential (boolean) -- Not used. Retained for backwards compatibility.

      • Id (string) -- Channel ID. Not used, only for backwards compatibility.

      • Identity (string) -- The ARN of an identity verified with SES.

      • IsArchived (boolean) -- Is this channel archived

      • LastModifiedBy (string) -- Who last updated this entry

      • LastModifiedDate (string) -- Last date this was updated

      • MessagesPerSecond (integer) -- Messages per second that can be sent

      • Platform (string) -- Platform type. Will be "EMAIL"

      • RoleArn (string) -- The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion service

      • Version (integer) -- Version of channel