End of support notice: On October 30, 2026, AWS will end support for Amazon Pinpoint. After October 30, 2026, you will no longer be able to access the Amazon Pinpoint console or Amazon Pinpoint resources (endpoints, segments, campaigns, journeys, and analytics). For more information, see Amazon Pinpoint end of support. Note: APIs related to SMS, voice, mobile push, OTP, and phone number validate are not impacted by this change and are supported by AWS End User Messaging.
Messages
The Messages resource represents a direct message, which is a one-time message that you send directly to a limited audience without creating a campaign. You can send a direct message to as many as 100 recipients. The message can be a push notification for users of your mobile app, an SMS message, an email message, or a voice message.
When you send a direct message, Amazon Pinpoint delivers it immediately. You can't schedule the delivery of direct messages. In addition, you can't send a direct message to a segment. If you want to schedule a message to be sent at a certain time or you want to send a message to a segment, you should create a campaign rather than sending a direct message.
While sending transactional template-based messages using the Amazon Pinpoint API, CLI or SDK, you need to make sure that values are provided for all the template variable either at request time or as default values with the template. Messages failing to render due to missing attribute value will not be received successfully.
You can use the Messages resource to send a direct message.
URI
/v1/apps/application-id/messages
HTTP methods
POST
Operation ID: SendMessages
Creates and sends a direct message.
| 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. |
| Name | Type | Required | Description |
|---|---|---|---|
accept | String | False | Indicates which content types, expressed as MIME types, the client understands. |
| Status code | Response model | Description |
|---|---|---|
200 | MessageResponse | 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 Messages 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. |
| Status code | Response model | Description |
|---|---|---|
200 | None | The request succeeded. |
Schemas
Request bodies
{ "TraceId": "string", "Context": { }, "MessageConfiguration": { "DefaultMessage": { "Body": "string", "Substitutions": { } }, "DefaultPushNotificationMessage": { "Body": "string", "Substitutions": { }, "Title": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "Data": { } }, "APNSMessage": { "Body": "string", "Substitutions": { }, "Title": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "Data": { }, "MediaUrl": "string", "Sound": "string", "Badge": integer, "Category": "string", "ThreadId": "string", "RawContent": "string", "PreferredAuthenticationMethod": "string", "TimeToLive": integer, "Priority": "string", "CollapseId": "string", "APNSPushType": "string" }, "GCMMessage": { "Body": "string", "Substitutions": { }, "Title": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "Data": { }, "IconReference": "string", "Sound": "string", "ImageUrl": "string", "ImageIconUrl": "string", "SmallImageIconUrl": "string", "RawContent": "string", "CollapseKey": "string", "RestrictedPackageName": "string", "TimeToLive": integer, "Priority": "string", "PreferredAuthenticationMethod": "string" }, "BaiduMessage": { "Body": "string", "Substitutions": { }, "Title": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "Data": { }, "IconReference": "string", "Sound": "string", "ImageUrl": "string", "ImageIconUrl": "string", "SmallImageIconUrl": "string", "RawContent": "string", "TimeToLive": integer }, "ADMMessage": { "Body": "string", "Substitutions": { }, "Title": "string", "Action": enum, "Url": "string", "SilentPush": boolean, "Data": { }, "IconReference": "string", "Sound": "string", "ImageUrl": "string", "ImageIconUrl": "string", "SmallImageIconUrl": "string", "RawContent": "string", "ConsolidationKey": "string", "ExpiresAfter": "string", "MD5": "string" }, "EmailMessage": { "Body": "string", "Substitutions": { }, "FromAddress": "string", "FeedbackForwardingAddress": "string", "ReplyToAddresses": [ "string" ], "SimpleEmail": { "Subject": { "Data": "string", "Charset": "string" }, "TextPart": { "Data": "string", "Charset": "string" }, "HtmlPart": { "Data": "string", "Charset": "string" }, "Headers": [ { "Name": "string", "Value": "string" } ] }, "RawEmail": { "Data": "string" } }, "SMSMessage": { "Body": "string", "Substitutions": { }, "SenderId": "string", "MessageType": enum, "Keyword": "string", "OriginationNumber": "string", "EntityId": "string", "TemplateId": "string", "MediaUrl": "string" }, "VoiceMessage": { "Body": "string", "Substitutions": { }, "LanguageCode": "string", "VoiceId": "string", "OriginationNumber": "string" } }, "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" } }, "Addresses": { }, "Endpoints": { } }
Response bodies
{ "ApplicationId": "string", "RequestId": "string", "Result": { }, "EndpointResult": { } }
Properties
ADMMessage
Specifies the settings for a one-time message that's sent directly to an endpoint through the ADM (Amazon Device Messaging) channel.
| Property | Type | Required | Description |
|---|---|---|---|
Action | string Values: | False | The action to occur if the recipient taps the push notification. Valid values are:
|
Body | string | False | The body of the notification message. |
ConsolidationKey | string | False | An arbitrary string that indicates that multiple messages are logically the same and that Amazon Device Messaging (ADM) can drop previously enqueued messages in favor of this message. |
Data | object | False | The JSON data payload to use for the push notification, if the notification is
a silent push notification. This payload is added to the
|
ExpiresAfter | string | False | The amount of time, in seconds, that ADM should store the message if the
recipient's device is offline. Amazon Pinpoint specifies this value in the
|
IconReference | string | False | The icon image name of the asset saved in your app. |
ImageIconUrl | string | False | The URL of the large icon image to display in the content view of the push notification. |
ImageUrl | string | False | The URL of an image to display in the push notification. |
MD5 | string | False | The base64-encoded, MD5 checksum of the value specified by the
|
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 or supporting phone home functionality. |
SmallImageIconUrl | string | False | The URL of the small icon image to display in the status bar and the content view of the push notification. |
Sound | string | False | The sound to play when the recipient receives the push notification. You can
use the default stream or specify the file name of a sound resource that's
bundled in your app. On an Android platform, the sound file must reside in
|
Substitutions | object | False | The default message variables to use in the notification message. You can override the default variables with individual address variables. |
Title | string | False | The title to display above the notification message on the recipient's device. |
Url | string | False | The URL to open in the recipient's default mobile browser, if a recipient taps
the push notification and the value of the |
APNSMessage
Specifies the settings for a one-time message that's sent directly to an endpoint through the APNs (Apple Push Notification service) channel.