2026/08/13 - Amazon Connect Service - 1 new 1 updated api methods
Changes Adds the StartAssistantContact API to start chat contacts handled by an AI agent. Adds SegmentAttributes to StartWebRTCContact, and corrects its error response to now receive AccessDeniedException (previously returned as an internal server error due to a missing error declaration).
Starts a chat contact with an AI agent.
Use the returned ParticipantToken to call the CreateParticipantConnection API.
For more information about chat, see the following topics in the Connect Customer Administrator Guide:
See also: AWS API Documentation
Request Syntax
client.start_assistant_contact(
InstanceId='string',
AiAgent={
'AiAgentId': 'string'
},
ParticipantDetails={
'DisplayName': 'string'
},
InitialMessage={
'ContentType': 'string',
'Content': 'string'
},
Attributes={
'string': 'string'
},
ClientToken='string',
PersistentChat={
'RehydrationType': 'ENTIRE_PAST_SESSION'|'FROM_SEGMENT',
'SourceContactId': 'string'
},
RelatedContactId='string'
)
string
[REQUIRED]
The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
dict
[REQUIRED]
The AI agent that participates in the contact.
AiAgentId (string) -- [REQUIRED]
The identifier of the AI agent that participates in the contact.
dict
[REQUIRED]
The display name and other details that identify the chat participant.
DisplayName (string) -- [REQUIRED]
Display name of the participant.
dict
The initial message to send to the newly created chat.
ContentType (string) -- [REQUIRED]
The type of the content. Supported types are text/plain, text/markdown, application/json, and application/vnd.amazonaws.connect.message.interactive.response.
Content (string) -- [REQUIRED]
The content of the chat message. Maximum of 16,384 bytes for all content types ( text/plain, text/markdown, application/json, and application/vnd.amazonaws.connect.message.interactive.response).
Some messaging channels enforce lower limits. For channel-specific message size limits, see Chat message size limits by channel in the Amazon Connect Customer Administrator Guide.
dict
A map of key-value pairs to associate with the contact. Amazon Connect makes these attributes available to flows as standard contact attributes.
You can provide up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can contain only alphanumeric characters, dashes, and underscores.
(string) --
(string) --
string
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
This field is autopopulated if not provided.
dict
The configuration that enables persistent chat. For more information about persistent chat and its use cases, see Enable persistent chat.
RehydrationType (string) --
The contactId that is used for rehydration depends on the rehydration type. RehydrationType is required for persistent chat.
ENTIRE_PAST_SESSION: Rehydrates a chat from the most recently terminated past chat contact of the specified past ended chat session. To use this type, provide the initialContactId of the past ended chat session in the sourceContactId field. In this type, Connect Customer determines the most recent chat contact on the specified chat session that has ended, and uses it to start a persistent chat.
FROM_SEGMENT: Rehydrates a chat from the past chat contact that is specified in the sourceContactId field.
The actual contactId used for rehydration is provided in the response of this API.
SourceContactId (string) --
The contactId from which a persistent chat session must be started.
string
The identifier of an Connect Customer contact related to the new assistant contact.
dict
Response Syntax
{
'ContactId': 'string',
'ParticipantId': 'string',
'ParticipantToken': 'string',
'ContinuedFromContactId': 'string'
}
Response Structure
(dict) --
ContactId (string) --
The identifier of the contact within the Connect Customer instance.
ParticipantId (string) --
The identifier of the chat participant. The participant identifier remains the same throughout the chat lifecycle.
ParticipantToken (string) --
The token that the chat participant uses to call the CreateParticipantConnection API. The token remains valid for the lifetime of the chat participant.
ContinuedFromContactId (string) --
For a persistent chat, the identifier of the contact from which the chat continues. Amazon Connect returns this field only for persistent chats.
{'SegmentAttributes': {'string': {'ValueArn': 'string',
'ValueInteger': 'integer',
'ValueList': [()],
'ValueMap': {'string': ()},
'ValueString': 'string'}}}
Places an inbound in-app, web, or video call to a contact, and then initiates the flow. It performs the actions in the flow that are specified (in ContactFlowId) and present in the Connect Customer instance (specified as InstanceId).
See also: AWS API Documentation
Request Syntax
client.start_web_rtc_contact(
Attributes={
'string': 'string'
},
ClientToken='string',
ContactFlowId='string',
InstanceId='string',
AllowedCapabilities={
'Customer': {
'Video': 'SEND',
'ScreenShare': 'SEND'
},
'Agent': {
'Video': 'SEND',
'ScreenShare': 'SEND'
}
},
ParticipantDetails={
'DisplayName': 'string'
},
RelatedContactId='string',
References={
'string': {
'Value': 'string',
'Type': 'URL'|'ATTACHMENT'|'CONTACT_ANALYSIS'|'NUMBER'|'STRING'|'DATE'|'EMAIL'|'EMAIL_MESSAGE'|'EMAIL_MESSAGE_PLAIN_TEXT'|'EMAIL_MESSAGE_PLAIN_TEXT_REDACTED'|'EMAIL_MESSAGE_REDACTED',
'Status': 'AVAILABLE'|'DELETED'|'APPROVED'|'REJECTED'|'PROCESSING'|'FAILED',
'Arn': 'string',
'StatusReason': 'string'
}
},
Description='string',
SegmentAttributes={
'string': {
'ValueString': 'string',
'ValueMap': {
'string': {'... recursive ...'}
},
'ValueInteger': 123,
'ValueList': [
{'... recursive ...'},
],
'ValueArn': 'string'
}
}
)
dict
A custom key-value pair using an attribute map. The attributes are standard Connect Customer attributes, and can be accessed in flows just like any other contact attributes.
There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, -, and _ characters.
(string) --
(string) --
string
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
The token is valid for 7 days after creation. If a contact is already started, the contact ID is returned.
This field is autopopulated if not provided.
string
[REQUIRED]
The identifier of the flow for the call. To see the ContactFlowId in the Connect Customer admin website, on the navigation menu go to Routing, Flows. Choose the flow. On the flow page, under the name of the flow, choose Show additional flow information. The ContactFlowId is the last part of the ARN, shown here in bold:
arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx
string
[REQUIRED]
The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
dict
Information about the video sharing capabilities of the participants (customer, agent).
Customer (dict) --
Information about the customer's video sharing capabilities.
Video (string) --
The configuration having the video and screen sharing capabilities for participants over the call.
ScreenShare (string) --
The screen sharing capability that is enabled for the participant. SEND indicates the participant can share their screen.
Agent (dict) --
Information about the agent's video sharing capabilities.
Video (string) --
The configuration having the video and screen sharing capabilities for participants over the call.
ScreenShare (string) --
The screen sharing capability that is enabled for the participant. SEND indicates the participant can share their screen.
dict
[REQUIRED]
The details of the participant, including their display name.
DisplayName (string) -- [REQUIRED]
Display name of the participant.
string
The unique identifier for an Connect Customer contact. This identifier is related to the contact starting.
dict
A formatted URL that is shown to an agent in the Contact Control Panel (CCP). Tasks can have the following reference types at the time of creation: URL | NUMBER | STRING | DATE | EMAIL. ATTACHMENT is not a supported reference type during task creation.
(string) --
(dict) --
Well-formed data on a contact, used by agents to complete a contact request. You can have up to 4,096 UTF-8 bytes across all references for a contact.
Value (string) --
A valid value for the reference. For example, for a URL reference, a formatted URL that is displayed to an agent in the Contact Control Panel (CCP).
Type (string) -- [REQUIRED]
The type of the reference. DATE must be of type Epoch timestamp.
Status (string) --
Status of the attachment reference type.
Arn (string) --
The Amazon Resource Name (ARN) of the reference
StatusReason (string) --
Relevant details why the reference was not successfully created.
string
A description of the task that is shown to an agent in the Contact Control Panel (CCP).
dict
Use this map to specify system-defined attributes for the WebRTC contact segment. Use the connect:Subtype attribute to specify the channel subtype, such as connect:WebRTC.
Attribute keys can contain only alphanumeric characters, hyphens, and underscores.
(string) --
(dict) --
A value for a segment attribute. This is structured as a map where the key is valueString and the value is a string.
ValueString (string) --
The value of a segment attribute.
ValueMap (dict) --
The value of a segment attribute.
(string) --
(dict) --
A value for a segment attribute. This is structured as a map where the key is valueString and the value is a string.
ValueInteger (integer) --
The value of a segment attribute.
ValueList (list) --
The value of a segment attribute. This is only supported for system-defined attributes, not for user-defined attributes.
(dict) --
A value for a segment attribute. This is structured as a map where the key is valueString and the value is a string.
ValueArn (string) --
The value of a segment attribute that has to be a valid ARN. This is only supported for system-defined attributes, not for user-defined attributes.
dict
Response Syntax
{
'ConnectionData': {
'Attendee': {
'AttendeeId': 'string',
'JoinToken': 'string'
},
'Meeting': {
'MediaRegion': 'string',
'MediaPlacement': {
'AudioHostUrl': 'string',
'AudioFallbackUrl': 'string',
'SignalingUrl': 'string',
'TurnControlUrl': 'string',
'EventIngestionUrl': 'string'
},
'MeetingFeatures': {
'Audio': {
'EchoReduction': 'AVAILABLE'|'UNAVAILABLE'
}
},
'MeetingId': 'string'
}
},
'ContactId': 'string',
'ParticipantId': 'string',
'ParticipantToken': 'string'
}
Response Structure
(dict) --
ConnectionData (dict) --
Information required for the client application (mobile application or website) to connect to the call.
Attendee (dict) --
The attendee information, including attendee ID and join token.
AttendeeId (string) --
The Amazon Chime SDK attendee ID.
JoinToken (string) --
The join token used by the Amazon Chime SDK attendee.
Meeting (dict) --
A meeting created using the Amazon Chime SDK.
MediaRegion (string) --
The Amazon Web Services Region in which you create the meeting.
MediaPlacement (dict) --
The media placement for the meeting.
AudioHostUrl (string) --
The audio host URL.
AudioFallbackUrl (string) --
The audio fallback URL.
SignalingUrl (string) --
The signaling URL.
TurnControlUrl (string) --
The turn control URL.
EventIngestionUrl (string) --
The event ingestion URL to which you send client meeting events.
MeetingFeatures (dict) --
The configuration settings of the features available to a meeting.
Audio (dict) --
The configuration settings for the audio features available to a meeting.
EchoReduction (string) --
Makes echo reduction available to clients who connect to the meeting.
MeetingId (string) --
The Amazon Chime SDK meeting ID.
ContactId (string) --
The identifier of the contact in this instance of Connect Customer.
ParticipantId (string) --
The identifier for a contact participant. The ParticipantId for a contact participant is the same throughout the contact lifecycle.
ParticipantToken (string) --
The token used by the contact participant to call the CreateParticipantConnection API. The participant token is valid for the lifetime of a contact participant.