Campaign
A campaign is a messaging initiative that engages a specific segment of users for an Amazon Pinpoint application. The information represented by this resource includes the segment of users that a campaign sends messages to, the message that a campaign delivers, and the schedule on which a campaign runs.
You can use the Campaign resource to retrieve information about, update, or
delete a specific campaign. To create a campaign, use the Campaigns resource and send a
POST request to the
/apps/
URI.application-id
/campaigns
URI
/v1/apps/
application-id
/campaigns/campaign-id
HTTP methods
GET
Operation ID: GetCampaign
Retrieves information about the status, configuration, and other settings for a campaign.
Name | Type | Required | Description |
---|---|---|---|
campaign-id | String | True | The unique identifier for the campaign. |
application-id | String | True | The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console. |
Name | Type | Required | Description |
---|---|---|---|
accept | String | False | Indicates which content types, expressed as MIME types, the client understands. |
Status code | Response model | Description |
---|---|---|
200 | CampaignResponse | 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). |
PUT
Operation ID: UpdateCampaign
Updates the configuration and other settings for a campaign.
Name | Type | Required | Description |
---|---|---|---|
campaign-id | String | True | The unique identifier for the campaign. |
application-id | String | True | The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console. |
Name | Type | Required | Description |
---|---|---|---|
accept | String | False | Indicates which content types, expressed as MIME types, the client understands. |
Status code | Response model | Description |
---|---|---|
200 | CampaignResponse | 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). |
DELETE
Operation ID: DeleteCampaign
Deletes a campaign from an application.
Name | Type | Required | Description |
---|---|---|---|
campaign-id | String | True | The unique identifier for the campaign. |
application-id | String | True | The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console. |
Name | Type | Required | Description |
---|---|---|---|
accept | String | False | Indicates which content types, expressed as MIME types, the client understands. |
Status code | Response model | Description |
---|---|---|
200 | CampaignResponse | 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 Campaign resource.
Name | Type | Required | Description |
---|---|---|---|
campaign-id | String | True | The unique identifier for the campaign. |
application-id | String | True | The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console. |
Status code | Response model | Description |
---|---|---|
200 | None | The request succeeded. |
Schemas
Request bodies
{ "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "APNSMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "GCMMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "ADMMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "BaiduMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "EmailMessage": { "Body": "string", "Title": "string", "HtmlBody": "string", "FromAddress": "string", "Headers": [ { "Name": "string", "Value": "string" } ] }, "SMSMessage": { "Body": "string", "MessageType": enum, "SenderId": "string", "OriginationNumber": "string", "EntityId": "string", "TemplateId": "string" }, "CustomMessage": { "Data": "string" }, "InAppMessage": { "Body": "string", "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": { } } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": enum, "IsLocalTime": boolean, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" }, "EventFilter": { "Dimensions": { "EventType": { "DimensionType": enum, "Values": [ "string" ] }, "Attributes": { }, "Metrics": { } }, "FilterType": enum } }, "TemplateConfiguration": { "SMSTemplate": { "Name": "string", "Version": "string" }, "EmailTemplate": { "Name": "string", "Version": "string" }, "PushTemplate": { "Name": "string", "Version": "string" }, "VoiceTemplate": { "Name": "string", "Version": "string" }, "InAppTemplate": { "Name": "string", "Version": "string" } }, "CustomDeliveryConfiguration": { "EndpointTypes": [ enum ], "DeliveryUri": "string" }, "SegmentId": "string", "SegmentVersion": integer, "IsPaused": boolean, "AdditionalTreatments": [ { "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "APNSMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "GCMMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "ADMMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "BaiduMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "EmailMessage": { "Body": "string", "Title": "string", "HtmlBody": "string", "FromAddress": "string", "Headers": [ { "Name": "string", "Value": "string" } ] }, "SMSMessage": { "Body": "string", "MessageType": enum, "SenderId": "string", "OriginationNumber": "string", "EntityId": "string", "TemplateId": "string" }, "CustomMessage": { "Data": "string" }, "InAppMessage": { "Body": "string", "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": { } } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": enum, "IsLocalTime": boolean, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" }, "EventFilter": { "Dimensions": { "EventType": { "DimensionType": enum, "Values": [ "string" ] }, "Attributes": { }, "Metrics": { } }, "FilterType": enum } }, "TemplateConfiguration": { "SMSTemplate": { "Name": "string", "Version": "string" }, "EmailTemplate": { "Name": "string", "Version": "string" }, "PushTemplate": { "Name": "string", "Version": "string" }, "VoiceTemplate": { "Name": "string", "Version": "string" }, "InAppTemplate": { "Name": "string", "Version": "string" } }, "CustomDeliveryConfiguration": { "EndpointTypes": [ enum ], "DeliveryUri": "string" }, "SizePercent": integer } ], "HoldoutPercent": integer, "Limits": { "Daily": integer, "Total": integer, "Session": integer, "MessagesPerSecond": integer, "MaximumDuration": integer }, "Name": "string", "Hook": { "LambdaFunctionName": "string", "WebUrl": "string", "Mode": enum }, "Description": "string", "tags": { }, "Priority": integer }
Response bodies
{ "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "APNSMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "GCMMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "ADMMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "BaiduMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "EmailMessage": { "Body": "string", "Title": "string", "HtmlBody": "string", "FromAddress": "string", "Headers": [ { "Name": "string", "Value": "string" } ] }, "SMSMessage": { "Body": "string", "MessageType": enum, "SenderId": "string", "OriginationNumber": "string", "EntityId": "string", "TemplateId": "string" }, "CustomMessage": { "Data": "string" }, "InAppMessage": { "Body": "string", "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": { } } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": enum, "IsLocalTime": boolean, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" }, "EventFilter": { "Dimensions": { "EventType": { "DimensionType": enum, "Values": [ "string" ] }, "Attributes": { }, "Metrics": { } }, "FilterType": enum } }, "TemplateConfiguration": { "SMSTemplate": { "Name": "string", "Version": "string" }, "EmailTemplate": { "Name": "string", "Version": "string" }, "PushTemplate": { "Name": "string", "Version": "string" }, "VoiceTemplate": { "Name": "string", "Version": "string" }, "InAppTemplate": { "Name": "string", "Version": "string" } }, "CustomDeliveryConfiguration": { "EndpointTypes": [ enum ], "DeliveryUri": "string" }, "Id": "string", "ApplicationId": "string", "CreationDate": "string", "LastModifiedDate": "string", "SegmentId": "string", "SegmentVersion": integer, "AdditionalTreatments": [ { "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "APNSMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "GCMMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "ADMMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "BaiduMessage": { "Body": "string", "Title": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "JsonBody": "string", "RawContent": "string", "TimeToLive": integer }, "EmailMessage": { "Body": "string", "Title": "string", "HtmlBody": "string", "FromAddress": "string", "Headers": [ { "Name": "string", "Value": "string" } ] }, "SMSMessage": { "Body": "string", "MessageType": enum, "SenderId": "string", "OriginationNumber": "string", "EntityId": "string", "TemplateId": "string" }, "CustomMessage": { "Data": "string" }, "InAppMessage": { "Body": "string", "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": { } } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": enum, "IsLocalTime": boolean, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" }, "EventFilter": { "Dimensions": { "EventType": { "DimensionType": enum, "Values": [ "string" ] }, "Attributes": { }, "Metrics": { } }, "FilterType": enum } }, "TemplateConfiguration": { "SMSTemplate": { "Name": "string", "Version": "string" }, "EmailTemplate": { "Name": "string", "Version": "string" }, "PushTemplate": { "Name": "string", "Version": "string" }, "VoiceTemplate": { "Name": "string", "Version": "string" }, "InAppTemplate": { "Name": "string", "Version": "string" } }, "CustomDeliveryConfiguration": { "EndpointTypes": [ enum ], "DeliveryUri": "string" }, "SizePercent": integer, "Id": "string", "State": { "CampaignStatus": enum } } ], "HoldoutPercent": integer, "Name": "string", "Limits": { "Daily": integer, "Total": integer, "Session": integer, "MessagesPerSecond": integer, "MaximumDuration": integer }, "Description": "string", "Hook": { "LambdaFunctionName": "string", "WebUrl": "string", "Mode": enum }, "State": { "CampaignStatus": enum }, "DefaultState": { "CampaignStatus": enum }, "Version": integer, "IsPaused": boolean, "Arn": "string", "tags": { }, "Priority": integer }
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 |
CampaignCustomMessage
Specifies the contents of a message that's sent through a custom channel to recipients of a campaign.
Property | Type | Required | Description |
---|---|---|---|
Data | string | False | The raw, JSON-formatted string to use as the payload for the message. The maximum size is 5 KB. |
CampaignEmailMessage
Specifies the content and "From" address for an email message that's sent to recipients of a campaign.
Property | Type | Required | Description |
---|---|---|---|
Body | string | False | The body of the email for recipients whose email clients don't render HTML content. |
FromAddress | string | False | The verified email address to send the email from. The default address is the
|
Headers | Array of type MessageHeader | False | The list of MessageHeaders for the email. You can have up to 15 MessageHeaders for each email. |
HtmlBody | string | False | The body of the email, in HTML format, for recipients whose email clients render HTML content. |
Title | string | False | The subject line, or title, of the email. |
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:
|
CampaignHook
Specifies settings for invoking an AWS Lambda function that customizes a segment for a campaign.
Property | Type | Required | Description |
---|---|---|---|
LambdaFunctionName | string | False | The name or Amazon Resource Name (ARN) of the AWS Lambda function that Amazon Pinpoint invokes to customize a segment for a campaign. |
Mode | string Values: | False | The mode that Amazon Pinpoint uses to invoke the AWS Lambda function. Possible values are:
|
WebUrl | string | False | The web URL that Amazon Pinpoint calls to invoke the AWS Lambda function over HTTPS. |
CampaignInAppMessage
Specifies the appearance of an in-app message, including the message type, the title and body text, text and background colors, and the configurations of buttons that appear in the message.
Property | Type | Required | Description |
---|---|---|---|
Body | string | False | The body text of the in-app notification. |
Content | Array of type InAppMessageContent | False | An array that contains configurtion information about the in-app message for the campaign, including title and body text, text colors, background colors, image URLs, and button configurations. |
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:
|
CampaignLimits
For a campaign, specifies limits on the messages that the campaign can send. For an application, specifies the default limits for messages that campaigns in the application can send.
Property | Type | Required | Description |
---|---|---|---|
Daily | integer | False | The maximum number of messages that a campaign can send to a single endpoint during a 24-hour period. For an application, this value specifies the default limit for the number of messages that campaigns and journeys can send to a single endpoint during a 24-hour period. The maximum value is 100. |
MaximumDuration | integer | False | The maximum amount of time, in seconds, that a campaign can attempt to deliver a message after the scheduled start time for the campaign. The minimum value is 60 seconds. |
MessagesPerSecond | integer | False | The maximum number of messages that a campaign can send each second. For an application, this value specifies the default limit for the number of messages that campaigns can send each second. The minimum value is 1. The maximum value is 20,000. |
Session | integer | False | The maximum number of messages that the campaign can send per user session. |
Total | integer | False | The maximum number of messages that a campaign can send to a single endpoint during the course of the campaign. If a campaign recurs, this setting applies to all runs of the campaign. The maximum value is 100. |
CampaignResponse
Provides information about the status, configuration, and other settings for a campaign.
Property | Type | Required | Description |
---|---|---|---|
AdditionalTreatments | Array of type TreatmentResource | False | An array of responses, one for each treatment that you defined for the campaign, in addition to the default treatment. |
ApplicationId | string | True | The unique identifier for the application that the campaign applies to. |
Arn | string | True | The Amazon Resource Name (ARN) of the campaign. |
CreationDate | string | True | The date, in ISO 8601 format, when the campaign was created. |
CustomDeliveryConfiguration | False | The delivery configuration settings for sending the campaign through a custom channel. | |
DefaultState | False | The current status of the campaign's default treatment. This value exists only for campaigns that have more than one treatment. | |
Description | string | False | The custom description of the campaign. |
HoldoutPercent | integer | False | The allocated percentage of users (segment members) who shouldn't receive messages from the campaign. |
Hook | False | The settings for the AWS Lambda function to use as a code hook for the campaign. You can use this hook to customize the segment that's used by the campaign. | |
Id | string | True | The unique identifier for the campaign. |
IsPaused | boolean | False | Specifies whether the campaign is paused. A paused campaign doesn't run unless
you resume it by changing this value to |
LastModifiedDate | string | True | The date, in ISO 8601 format, when the campaign was last modified. |
Limits | False | The messaging limits for the campaign. | |
MessageConfiguration | False | The message configuration settings for the campaign. | |
Name | string | False | The name of the campaign. |
Priority | integer | False | Defines the priority of the campaign. This value 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. | |
SegmentId | string | True | The unique identifier for the segment that's associated with the campaign. |
SegmentVersion | integer | True | The version number of the segment that's associated with the campaign. |
State | False | The current status of the campaign. | |
tags | object | False | A string-to-string map of key-value pairs that identifies the tags that are associated with the campaign. Each tag consists of a required tag key and an associated tag value. |
TemplateConfiguration | False | The message template that’s used for the campaign. | |
TreatmentDescription | string | False | The custom description of the default treatment for the campaign. |
TreatmentName | string | False | The custom name of the default treatment for the campaign, if the campaign has multiple treatments. A treatment is a variation of a campaign that's used for A/B testing. |
Version | integer | False | The version number of the campaign. |
CampaignSmsMessage
Specifies the content and settings for an SMS message that's sent to recipients of a campaign.
Property | Type | Required | Description |
---|---|---|---|
Body | string | False | The body of the SMS message. |
EntityId | string | False | A registered Entity ID (currently only used when sending messages to recipients in India). |
MessageType | string Values: | False | The SMS message type. Valid values are |
OriginationNumber | string | False | The number to send the SMS message from. The phone number that you specify
must exist in your Amazon Pinpoint account—you can't pass an arbitrary
phone number. If you want to use a sender ID to send your message, omit this
parameter and use |
SenderId | string | False | The alphabetic Sender ID to display as the sender of the message on a
recipient's device. Support for sender IDs varies by country or region. To
specify a phone number as the sender, omit this parameter and use
|
TemplateId | string | False | A registered Template ID (currently only used when sending messages to recipients in India). |
CampaignState
Provides information about the status of a campaign.
Property | Type | Required | Description |
---|---|---|---|
CampaignStatus | string Values: | False | The current status of the campaign, or the current status of a treatment that belongs to an A/B test campaign. If a campaign uses A/B testing, the campaign has a status of
|
CustomDeliveryConfiguration
Specifies the delivery configuration settings for sending a campaign or
campaign treatment through a custom channel. This object is required if you use
the CampaignCustomMessage
object to define the message to send for
the campaign or campaign treatment.
Property | Type | Required | Description |
---|---|---|---|
DeliveryUri | string | True | The destination to send the campaign or treatment to. This value can be one of the following:
|
EndpointTypes | Array of type string Values: | False | The types of endpoints to send the campaign or treatment to. Each valid value
maps to a type of channel that you can associate with an endpoint by using the
|
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. |
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. |
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). |
Message
Specifies the content and settings for a push notification that's sent to recipients of a campaign.
Property | Type | Required | Description |
---|---|---|---|
Action | string Values: | False | The action to occur if a recipient taps the push notification. Valid values are:
|
Body | string | False | The body of the notification message. The maximum number of characters is 200. |
ImageIconUrl | string | False | The URL of the image to display as the push notification icon, such as the icon for the app. |
ImageSmallIconUrl | string | False | The URL of the image to display as the small, push notification icon, such as a small version of the icon for the app. |
ImageUrl | string | False | The URL of an image to display in the push notification. |
JsonBody | string | False | The JSON payload to use for a silent push notification. |
MediaUrl | string | False | The URL of the image or video to display in the push notification. |
RawContent | string | False | The raw, JSON-formatted string to use as the payload for the notification message. If specified, this value overrides all other content for the message. |
SilentPush | boolean | False | Specifies whether the notification is a silent push notification, which is a push notification that doesn't display on a recipient's device. Silent push notifications can be used for cases such as updating an app's configuration, displaying messages in an in-app message center, or supporting phone home functionality. |
TimeToLive | integer | False | The number of seconds that the push notification service should keep the
message, if the service is unable to deliver the notification the first time.
This value is converted to an expiration value when it's sent to a push
notification service. If this value is This value doesn't apply to messages that are sent through the Amazon Device Messaging (ADM) service. |
Title | string | False | The title to display above the notification message on a recipient's device. |
Url | string | False | The URL to open in a recipient's default mobile browser, if a recipient taps
the push notification and the value of the |
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. |
MessageConfiguration
Specifies the message configuration settings for a campaign.
Property | Type | Required | Description |
---|---|---|---|
ADMMessage | False | The message that the campaign sends through the ADM (Amazon Device Messaging) channel. If specified, this message overrides the default message. | |
APNSMessage | False | The message that the campaign sends through the APNs (Apple Push Notification service) channel. If specified, this message overrides the default message. | |
BaiduMessage | False | The message that the campaign sends through the Baidu (Baidu Cloud Push) channel. If specified, this message overrides the default message. | |
CustomMessage | False | The message that the campaign sends through a custom channel, as specified by
the delivery configuration ( | |
DefaultMessage | False | The default message that the campaign sends through all the channels that are configured for the campaign. | |
EmailMessage | False | The message that the campaign sends through the email channel. If specified, this message overrides the default message. NoteThe maximum email message size is 200 KB. You can use email templates to send larger email messages. | |
GCMMessage | False | The message that the campaign sends through the GCM channel, which enables Amazon Pinpoint to send push notifications through the Firebase Cloud Messaging (FCM), formerly Google Cloud Messaging (GCM), service. If specified, this message overrides the default message. | |
InAppMessage | False | The default message for the in-app messaging channel. This message overrides
the default message ( | |
SMSMessage | False | The message that the campaign sends through the SMS channel. If specified, this message overrides the default message. |
MessageHeader
Contains the name and value pair of an message header to add to your email. You can have up to 15 MessageHeaders. A header can contain information such as the sender, receiver, route, or timestamp.
Property | Type | Required | Description |
---|---|---|---|
Name | string | False | The name of the message header. The header name can contain up to 126 characters. |
Value | string | False | The value of the message header. The header value can contain up to 870
characters, including the length of any rendered attributes. For example if you
add the |
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 |
Schedule
Specifies the schedule settings for a campaign.
Property | Type | Required | Description |
---|---|---|---|
EndTime | string | False | The scheduled time, in ISO 8601 format, when the campaign ended or will end. |
EventFilter | False | The type of event that causes the campaign to be sent, if the value of the
| |
Frequency | string Values: | False | Specifies how often the campaign is sent or whether the campaign is sent in response to a specific event. |
IsLocalTime | boolean | False | Specifies whether the start and end times for the campaign schedule use each
recipient's local time. To base the schedule on each recipient's local time, set
this value to |
QuietTime | False | The default quiet time for the campaign. Quiet time is a specific time range when a campaign doesn't send messages to endpoints, if all the following conditions are met:
If any of the preceding conditions isn't met, the endpoint will receive messages from the campaign, even if quiet time is enabled. | |
StartTime | string | True | The scheduled time when the campaign began or will begin. Valid values are:
|
Timezone | string | False | The starting UTC offset for the campaign schedule, if the value of the
|
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 |
Template
Specifies the name and version of the message template to use for the message.
Property | Type | Required | Description |
---|---|---|---|
Name | string | False | The name of the message template to use for the message. If specified, this value must match the name of an existing message template. |
Version | string | False | The unique identifier for the version of the message template to use for the message. If specified, this value must match the identifier for an existing template version. To retrieve a list of versions and version identifiers for a template, use the Template Versions resource. If you don't specify a value for this property, Amazon Pinpoint uses the active version of the template. The active version is typically the version of a template that's been most recently reviewed and approved for use, depending on your workflow. It isn't necessarily the latest version of a template. |
TemplateConfiguration
Specifies the message template to use for the message, for each type of channel.
Property | Type | Required | Description |
---|---|---|---|
EmailTemplate | False | The email template to use for the message. | |
InAppTemplate | False | The InApp template to use for the message. The InApp template object is not supported for SendMessages. | |
PushTemplate | False | The push notification template to use for the message. | |
SMSTemplate | False | The SMS template to use for the message. | |
VoiceTemplate | False | The voice template to use for the message. This object isn't supported for campaigns. |
TreatmentResource
Specifies the settings for a campaign treatment. A treatment is a variation of a campaign that's used for A/B testing of a campaign.
Property | Type | Required | Description |
---|---|---|---|
CustomDeliveryConfiguration | False | The delivery configuration settings for sending the treatment through a custom
channel. This object is required if the | |
Id | string | True | The unique identifier for the treatment. |
MessageConfiguration | False | The message configuration settings for the treatment. | |
Schedule | False | The schedule settings for the treatment. | |
SizePercent | integer | True | The allocated percentage of users (segment members) that the treatment is sent to. |
State | False | The current status of the treatment. | |
TemplateConfiguration | False | The message template to use for the treatment. | |
TreatmentDescription | string | False | The custom description of the treatment. |
TreatmentName | string | False | The custom name of the treatment. |
WriteCampaignRequest
Specifies the configuration and other settings for a campaign.
Property | Type | Required | Description |
---|---|---|---|
AdditionalTreatments | Array of type WriteTreatmentResource | False | An array of requests that defines additional treatments for the campaign, in addition to the default treatment for the campaign. |
CustomDeliveryConfiguration | False | The delivery configuration settings for sending the campaign through a custom
channel. This object is required if the | |
Description | string | False | A custom description of the campaign. |
HoldoutPercent | integer | False | The allocated percentage of users (segment members) who shouldn't receive messages from the campaign. |
Hook | False | The settings for the AWS Lambda function to invoke as a code hook for the campaign. You can use this hook to customize the segment that's used by the campaign. | |
IsPaused | boolean | False | Specifies whether to pause the campaign. A paused campaign doesn't run unless
you resume it by changing this value to |
Limits | False | The messaging limits for the campaign. | |
MessageConfiguration | False | The message configuration settings for the campaign. | |
Name | string | False | A custom name for the campaign. |
Priority | integer | False | An integer between 1 and 5, inclusive, that represents the priority of the in-app message campaign, where 1 is the highest priority and 5 is the lowest. If there are multiple messages scheduled to be displayed at the same time, the priority determines the order in which those messages are displayed. |
Schedule | False | The schedule settings for the campaign. | |
SegmentId | string | False | The unique identifier for the segment to associate with the campaign. |
SegmentVersion | integer | False | The version of the segment to associate with the campaign. |
tags | object | False | NoteAs of 22-05-2023 the PUT UpdateCampaign tags attribute has been deprecated. After this date any value in the tags attribute is not processed and will not generate an error code. Use the Tags resource to add or modify tags. (Deprecated) A string-to-string map of key-value pairs that defines the tags to associate with the campaign. Each tag consists of a required tag key and an associated tag value. |
TemplateConfiguration | False | The message template to use for the campaign. | |
TreatmentDescription | string | False | A custom description of the default treatment for the campaign. |
TreatmentName | string | False | A custom name of the default treatment for the campaign, if the campaign has multiple treatments. A treatment is a variation of a campaign that's used for A/B testing. |
WriteTreatmentResource
Specifies the settings for a campaign treatment. A treatment is a variation of a campaign that's used for A/B testing of a campaign.
Property | Type | Required | Description |
---|---|---|---|
CustomDeliveryConfiguration | False | The delivery configuration settings for sending the treatment through a custom
channel. This object is required if the | |
MessageConfiguration | False | The message configuration settings for the treatment. | |
Schedule | False | The schedule settings for the treatment. | |
SizePercent | integer | True | The allocated percentage of users (segment members) to send the treatment to. |
TemplateConfiguration | False | The message template to use for the treatment. | |
TreatmentDescription | string | False | A custom description of the treatment. |
TreatmentName | string | False | A custom name for the treatment. |
See also
For more information about using this API in one of the language-specific AWS SDKs and references, see the following: