SendRcsMessage
Creates a new RCS message and sends it to a recipient's phone number. RCS messages support rich content including text, files, rich cards, and carousels with interactive suggested actions.
Request Syntax
{
"ConfigurationSetName": "string",
"Context": {
"string" : "string"
},
"DestinationPhoneNumber": "string",
"DryRun": boolean,
"FallbackConfiguration": {
"Channel": "string",
"MediaUrls": [ "string" ],
"MessageBody": "string",
"OriginationIdentity": "string"
},
"MaxPrice": "string",
"MessageFeedbackEnabled": boolean,
"MessageTrafficType": "string",
"OriginationIdentity": "string",
"ProtectConfigurationId": "string",
"RcsMessageContent": {
"Content": { ... },
"Suggestions": [
{ ... }
]
},
"TimeToLive": number
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- ConfigurationSetName
-
The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern:
[A-Za-z0-9_:/-]+Required: No
- Context
-
You can specify custom data in this field. If you do, that data is logged to the event destination.
Type: String to string map
Map Entries: Minimum number of 0 items. Maximum number of 5 items.
Key Length Constraints: Minimum length of 1. Maximum length of 100.
Key Pattern:
\S+Value Length Constraints: Minimum length of 1. Maximum length of 800.
Value Pattern:
(?!\s)^[\s\S]+(?<!\s)Required: No
- DestinationPhoneNumber
-
The destination phone number in E.164 format.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 20.
Pattern:
\+?[1-9][0-9]{1,18}Required: Yes
- DryRun
-
When set to true, the message is checked and validated, but isn't sent to the end recipient.
Type: Boolean
Required: No
- FallbackConfiguration
-
Configuration for SMS or MMS fallback when RCS delivery fails. If provided, the service sends a fallback message via the specified channel when the RCS message fails or the TimeToLive expires.
Type: RcsFallbackConfiguration object
Required: No
- MaxPrice
-
The maximum amount that you want to spend, in US dollars, per each RCS message.
Type: String
Length Constraints: Minimum length of 2. Maximum length of 8.
Pattern:
[0-9]{0,2}\.[0-9]{1,5}Required: No
- MessageFeedbackEnabled
-
Set to true to enable message feedback for the message. When a user receives the message you need to update the message status using PutMessageFeedback.
Type: Boolean
Required: No
- MessageTrafficType
-
The traffic type of the RCS message. Valid values are AUTHENTICATION, TRANSACTION, PROMOTION, SERVICE_REQUEST, and ACKNOWLEDGEMENT. This field is reserved for future use.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 50.
Required: No
- OriginationIdentity
-
The origination identity of the message. This can be either the RcsAgentId, RcsAgentArn, PoolId, or PoolArn.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern:
[A-Za-z0-9_:/\+-]+Required: Yes
- ProtectConfigurationId
-
The unique identifier of the protect configuration to use.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern:
[A-Za-z0-9_:/-]+Required: No
- RcsMessageContent
-
The content of the RCS message. Contains the message content (text, file, rich card, or carousel) and optional message-level suggested actions.
Type: RcsMessageContent object
Required: No
- TimeToLive
-
The duration in seconds that the RCS message is valid for delivery. If the message cannot be delivered within this duration, it is considered expired. Valid values are 1 to 172800 (48 hours). If a FallbackConfiguration is provided, the fallback is triggered when the duration expires without delivery confirmation.
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 172800.
Required: No
Response Syntax
{
"MessageId": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- MessageId
-
The unique identifier for the message.
Type: String
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
The request was denied because you don't have sufficient permissions to access the resource.
- Reason
-
The reason for the exception.
HTTP Status Code: 400
- ConflictException
-
Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time or it could be that the requested action isn't valid for the current state or configuration of the resource.
- Reason
-
The reason for the exception.
- ResourceId
-
The unique identifier of the request.
- ResourceType
-
The type of resource that caused the exception.
HTTP Status Code: 400
- InternalServerException
-
The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.
- RequestId
-
The unique identifier of the request.
HTTP Status Code: 500
- ResourceNotFoundException
-
A requested resource couldn't be found.
- ResourceId
-
The unique identifier of the resource.
- ResourceType
-
The type of resource that caused the exception.
HTTP Status Code: 400
- ServiceQuotaExceededException
-
The request would cause a service quota to be exceeded.
- Reason
-
The reason for the exception.
HTTP Status Code: 400
- ThrottlingException
-
An error that occurred because too many requests were sent during a certain amount of time.
HTTP Status Code: 400
- ValidationException
-
A validation exception for a field.
- Fields
-
The field that failed validation.
- Reason
-
The reason for the exception.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: