SendChatIntegrationEvent
Processes chat integration events from AWS or external integrations to Amazon Connect. A chat integration event includes:
-
SourceId, DestinationId, and Subtype: a set of identifiers, uniquely representing a chat
-
ChatEvent: details of the chat action to perform such as sending a message, event, or disconnecting from a chat
When a chat integration event is sent with chat identifiers that do not map to an active chat contact, a new chat contact is also created before handling chat action.
Access to this API is currently restricted to AWS End User Messaging for supporting SMS integration.
Request Syntax
POST /chat-integration-event HTTP/1.1
Content-type: application/json
{
"DestinationId": "string
",
"Event": {
"Content": "string
",
"ContentType": "string
",
"Type": "string
"
},
"NewSessionDetails": {
"Attributes": {
"string
" : "string
"
},
"ParticipantDetails": {
"DisplayName": "string
"
},
"StreamingConfiguration": {
"StreamingEndpointArn": "string
"
},
"SupportedMessagingContentTypes": [ "string
" ]
},
"SourceId": "string
",
"Subtype": "string
"
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- DestinationId
-
Chat system identifier, used in part to uniquely identify chat. This is associated with the Amazon Connect instance and flow to be used to start chats. For AWS SMS, this is the phone number destination of inbound AWS SMS messages represented by an AWS End User Messaging phone number ARN.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: Yes
- Event
-
Chat integration event payload
Type: ChatEvent object
Required: Yes
- NewSessionDetails
-
Contact properties to apply when starting a new chat. If the integration event is handled with an existing chat, this is ignored.
Type: NewSessionDetails object
Required: No
- SourceId
-
External identifier of chat customer participant, used in part to uniquely identify a chat. For SMS, this is the E164 phone number of the chat customer participant.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: Yes
- Subtype
-
Classification of a channel. This is used in part to uniquely identify chat.
Valid value:
["connect:sms", connect:"WhatsApp"]
Type: String
Length Constraints: Minimum length of 1. Maximum length of 100.
Required: No
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"InitialContactId": "string",
"NewChatCreated": boolean
}
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.
- InitialContactId
-
Identifier of chat contact used to handle integration event. This may be null if the integration event is not valid without an already existing chat contact.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
- NewChatCreated
-
Whether handling the integration event resulted in creating a new chat or acting on existing chat.
Type: Boolean
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
You do not have sufficient permissions to perform this action.
HTTP Status Code: 403
- InternalServiceException
-
Request processing failed because of an error or failure with the service.
HTTP Status Code: 500
- InvalidRequestException
-
The request is not valid.
HTTP Status Code: 400
- ResourceNotFoundException
-
The specified resource was not found.
HTTP Status Code: 404
- ThrottlingException
-
The throttling limit has been exceeded.
HTTP Status Code: 429
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: