In-App Messages
Use the InAppMessages
resource to retrieve information about the
in-app messages that have been sent to specific endpoints.
URI
/v1/apps/
application-id
/endpoints/endpoint-id
/inappmessages
HTTP methods
GET
Operation ID: GetInAppMessages
Retrieves information about the in-app messages that have been sent to the requested endpoint.
Name | Type | Required | Description |
---|---|---|---|
application-id | String | True | The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console. |
endpoint-id | String | True | The case insensitive unique identifier for the endpoint. The identifier can't contain |
Name | Type | Required | Description |
---|---|---|---|
accept | String | False | Indicates which content types, expressed as MIME types, the client understands. |
Status code | Response model | Description |
---|---|---|
200 | InAppMessagesResponse | The request succeeded. |
400 | MessageBody | The request contains a syntax error (BadRequestException). |
403 | MessageBody | The request was denied because access to the specified resource is forbidden (ForbiddenException). |
404 | MessageBody | The request failed because the specified resource was not found (NotFoundException). |
405 | MessageBody | The request failed because the method is not allowed for the specified resource (MethodNotAllowedException). |
413 | MessageBody | The request failed because the payload for the body of the request is too large (RequestEntityTooLargeException). |
429 | MessageBody | The request failed because too many requests were sent during a certain amount of time (TooManyRequestsException). |
500 | MessageBody | The request failed due to an unknown internal server error, exception, or failure (InternalServerErrorException). |
OPTIONS
Retrieves information about the communication requirements and options that are available for the In-App Template resource.
Name | Type | Required | Description |
---|---|---|---|
application-id | String | True | The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console. |
endpoint-id | String | True | The case insensitive unique identifier for the endpoint. |
Status code | Response model | Description |
---|---|---|
200 | None | The request succeeded. |
Schemas
Response bodies
{ "InAppMessageCampaigns": [ { "CampaignId": "string", "TreatmentId": "string", "DailyCap": integer, "TotalCap": integer, "SessionCap": integer, "Priority": integer, "Schedule": { "QuietTime": { "Start": "string", "End": "string" }, "EventFilter": { "Dimensions": { "EventType": { "DimensionType": enum, "Values": [ "string" ] }, "Attributes": { }, "Metrics": { } }, "FilterType": enum }, "EndDate": "string" }, "InAppMessage": { "Layout": enum, "Content": [ { "HeaderConfig": { "Header": "string", "TextColor": "string", "Alignment": enum }, "BackgroundColor": "string", "BodyConfig": { "Body": "string", "TextColor": "string", "Alignment": enum }, "ImageUrl": "string", "PrimaryBtn": { "DefaultConfig": { "Text": "string", "ButtonAction": enum, "Link": "string", "TextColor": "string", "BackgroundColor": "string", "BorderRadius": integer }, "Web": { "ButtonAction": enum, "Link": "string" }, "IOS": { "ButtonAction": enum, "Link": "string" }, "Android": { "ButtonAction": enum, "Link": "string" } }, "SecondaryBtn": { "DefaultConfig": { "Text": "string", "ButtonAction": enum, "Link": "string", "TextColor": "string", "BackgroundColor": "string", "BorderRadius": integer }, "Web": { "ButtonAction": enum, "Link": "string" }, "IOS": { "ButtonAction": enum, "Link": "string" }, "Android": { "ButtonAction": enum, "Link": "string" } } } ], "CustomConfig": { } } } ] }
Properties
AttributeDimension
Specifies attribute-based criteria for including or excluding endpoints from a segment.
Property | Type | Required | Description |
---|---|---|---|
AttributeType | string Values: | False | The type of segment dimension to use. Valid values are:
|
Values | Array of type string | True | The criteria values to use for the segment dimension. Depending on the value
of the |
CampaignEventFilter
Specifies the settings for events that cause a campaign to be sent.
Property | Type | Required | Description |
---|---|---|---|
Dimensions | True | The dimension settings of the event filter for the campaign. | |
FilterType | string Values: | True | The type of event that causes the campaign to be sent. Valid values are:
|
DefaultButtonConfiguration
Information about the default behavior for a button that appears in an in-app message. You can optionally add button configurations that specifically apply to iOS, Android, or web browser users.
Property | Type | Required | Description |
---|---|---|---|
BackgroundColor | string | False | The background color of a button, expressed as a string consisting of a hex color code (such as "#000000" for black). |
BorderRadius | integer | False | The border radius of a button. |
ButtonAction | string Values: | True | The action that occurs when a recipient chooses a button in an in-app message. You can specify one of the following:
|
Link | string | False | The destination (such as a URL) for a button. |
Text | string | True | The text that appears on a button in an in-app message. |
TextColor | string | False | The color of the body text in a button, expressed as a string consisting of a hex color code (such as "#000000" for black). |
EventDimensions
Specifies the dimensions for an event filter that determines when a campaign is sent or a journey activity is performed.
Property | Type | Required | Description |
---|---|---|---|
Attributes | object | False | One or more custom attributes that your application reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create an event filter. |
EventType | False | The name of the event that causes the campaign to be sent or the journey
activity to be performed. This can be a standard event that Amazon Pinpoint
generates, such as | |
Metrics | object | False | One or more custom metrics that your application reports to Amazon Pinpoint. You can use these metrics as selection criteria when you create an event filter. |
InAppCampaignSchedule
Property | Type | Required | Description |
---|---|---|---|
EndDate | string | False | A timestamp that represents the latest time, in ISO 8601 format, that the campaign can be sent to endpoints. |
EventFilter | False | The type of event that causes the campaign to be sent, if the value of the
| |
QuietTime | False | The start and end times that define a time range when messages aren't sent to endpoints. |
InAppMessage
Property | Type | Required | Description |
---|---|---|---|
Content | Array of type InAppMessageContent | False | Contains information about the configuration of an in-app message template. |
CustomConfig | object | False | An object that contains custom data (in the form of key-value pairs) that is included in the in-app messaging payload. |
Layout | string Values: | False | A string that describes how the in-app message will appear. You can specify one of the following:
|
InAppMessageBodyConfig
Configuration information related to the main body text of an in-app message.
Property | Type | Required | Description |
---|---|---|---|
Alignment | string Values: | True | The text alignment of the main body text of the message. |
Body | string | True | The main body text of the message. |
TextColor | string | False | The color of the body text, expressed as a string consisting of a hex color code (such as "#000000" for black). |
InAppMessageButton
Configuration information for a button that appears in an in-app message.
Property | Type | Required | Description |
---|---|---|---|
Android | False | An object that defines the default behavior for a button in in-app messages sent to Android. | |
DefaultConfig | False | An object that defines the default behavior for a button in an in-app message. | |
IOS | False | An object that defines the default behavior for a button in in-app messages sent to iOS devices. | |
Web | False | An object that defines the default behavior for a button in in-app messages for web applications. |
InAppMessageCampaign
Property | Type | Required | Description |
---|---|---|---|
CampaignId | string | False | The unique identifier for the campaign that the in-app message applies to. |
DailyCap | integer | False | The maximum number of times any in-app message can be shown to the user in a 24-hour period. |
InAppMessage | False | Specifies the settings for a message that's sent to users of an application (an in-app message). | |
Priority | integer | False | An integer between 1 and 5, inclusive, that represents the priority of the campaign, with 1 being the highest priority and 5 being the lowest. This value is used to determine the order in which messages are displayed to the recipient if there are multiple messages scheduled to be displayed at the same time. |
Schedule | False | The schedule settings for the campaign. | |
SessionCap | integer | False | The maximum number of times an in-app message can be shown to the user during a single session in the application. |
TotalCap | integer | False | The maximum number of times an in-app message can be shown to the user. |
TreatmentId | string | False | The unique identifier for the campaign treatment. A treatment is a variation of a campaign that's used for A/B testing. |
InAppMessageContent
Configuration information related to an in-app message.
Property | Type | Required | Description |
---|---|---|---|
BackgroundColor | string | False | The background color for an in-app message banner, expressed as a string consisting of a hex color code (such as "#000000" for black). |
BodyConfig | False | An object that contains configuration information about the header or title text of the in-app message. | |
HeaderConfig | False | An object that contains configuration information about the header or title text of the in-app message. | |
ImageUrl | string | False | The URL of the image that appears on an in-app message banner. |
PrimaryBtn | False | An object that contains configuration information about the primary button in an in-app message. | |
SecondaryBtn | False | An object that contains configuration information about the secondary button in an in-app message. |
InAppMessageHeaderConfig
Configuration information related to the message header for an in-app message.
Property | Type | Required | Description |
---|---|---|---|
Alignment | string Values: | True | The text alignment of the title of the message. |
Header | string | True | The text that appears in the header or title of the message. |
TextColor | string | False | The color of the body text, expressed as a string consisting of a hex color code (such as "#000000" for black). |
InAppMessagesResponse
Object that contains information about in-app messages.
Property | Type | Required | Description |
---|---|---|---|
InAppMessageCampaigns | Array of type InAppMessageCampaign | False | A list of in-app message campaigns. |
MessageBody
Provides information about an API request or response.
Property | Type | Required | Description |
---|---|---|---|
Message | string | False | The message that's returned from the API. |
RequestID | string | False | The unique identifier for the request or response. |
MetricDimension
Specifies metric-based criteria for including or excluding endpoints from a segment. These criteria derive from custom metrics that you define for endpoints.
Property | Type | Required | Description |
---|---|---|---|
ComparisonOperator | string | True | The operator to use when comparing metric values. Valid values are:
|
Value | number | True | The value to compare. |
OverrideButtonConfiguration
Configuration information related to the configuration of a button with settings that are specific to a certain device type.
Property | Type | Required | Description |
---|---|---|---|
ButtonAction | string Values: | False | The action that occurs when a recipient chooses a button in an in-app message. You can specify one of the following:
|
Link | string | False | The destination (such as a URL) for a button. |
QuietTime
Specifies the start and end times that define a time range when messages aren't sent to endpoints.
Property | Type | Required | Description |
---|---|---|---|
End | string | False | The specific time when quiet time ends. This value has to use 24-hour notation
and be in HH:MM format, where HH is the hour (with a leading zero, if
applicable) and MM is the minutes. For example, use |
Start | string | False | The specific time when quiet time begins. This value has to use 24-hour
notation and be in HH:MM format, where HH is the hour (with a leading zero, if
applicable) and MM is the minutes. For example, use |
SetDimension
Specifies the dimension type and values for a segment dimension.
Property | Type | Required | Description |
---|---|---|---|
DimensionType | string Values: | False | The type of segment dimension to use. Valid values are:
|
Values | Array of type string | True | The criteria values to use for the segment dimension. Depending on the value
of the |
See also
For more information about using this API in one of the language-specific AWS SDKs and references, see the following: