Skip to main content

chat_thread

Creates, updates, deletes, gets or lists a chat_thread resource.

Overview

Namechat_thread
TypeResource
Idazure.communication_chat.chat_thread

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe id of the chat message. This id is server generated. Required.
contentobjectContent of a chat message.
createdOnstring (date-time)The timestamp when the chat message arrived at the server. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ. Required.
deletedOnstring (date-time)The timestamp (if applicable) when the message was deleted. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ.
editedOnstring (date-time)The last timestamp (if applicable) when the message was edited. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ.
metadataobjectMessage metadata.
senderCommunicationIdentifierobjectIdentifies a participant in Azure Communication services. A participant is, for example, a phone number or an Azure communication user. This model is polymorphic: Apart from kind and rawId, at most one further property may be set which must match the kind enum value.
senderDisplayNamestringThe display name of the chat message sender. This property is used to populate sender name for push notifications.
sequenceIdstringSequence of the chat message in the conversation. Required.
typestringThe chat message type. Required. Known values are: "text", "html", "topicUpdated", "participantAdded", and "participantRemoved".
versionstringVersion of the chat message. Required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_chat_messageselectchat_thread_id, chat_message_id, endpointGets a message by id. Gets a message by id.
list_chat_read_receiptsselectchat_thread_id, endpointmaxPageSize, skipGets chat message read receipts for a thread. Gets chat message read receipts for a thread.
update_chat_thread_propertiesupdatechat_thread_id, endpointUpdates a thread's properties. Updates a thread's properties.
get_chat_thread_propertiesexecchat_thread_id, endpointGets a chat thread's properties. Gets a chat thread's properties.
send_chat_read_receiptexecchat_thread_id, endpoint, chatMessageIdSends a read receipt event to a thread, on behalf of a user. Sends a read receipt event to a thread, on behalf of a user.
list_chat_messagesexecchat_thread_id, endpointmaxPageSize, startTimeGets a list of messages from a thread. Gets a list of messages from a thread.
send_chat_messageexecchat_thread_id, endpoint, contentSends a message to a thread. Sends a message to a thread.
list_chat_participantsexecchat_thread_id, endpointmaxPageSize, skipGets the participants of a thread. Gets the participants of a thread.
update_chat_messageexecchat_thread_id, chat_message_id, endpointUpdates a message. Updates a message.
delete_chat_messageexecchat_thread_id, chat_message_id, endpointDeletes a message. Deletes a message.
remove_chat_participantexecchat_thread_id, endpointRemove a participant from a thread. Remove a participant from a thread.
add_chat_participantsexecchat_thread_id, endpoint, participantsAdds thread participants to a thread. If participants already exist, no change occurs. Adds thread participants to a thread. If participants already exist, no change occurs.
send_typing_notificationexecchat_thread_id, endpointPosts a typing event to a thread, on behalf of a user. Posts a typing event to a thread, on behalf of a user.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
chat_message_idstringThe message id. Required.
chat_thread_idstringId of the thread. Required.
endpointstringThe service endpoint host (no scheme). (default: )
maxPageSizeintegerThe maximum number of participants to be returned per page. Default value is None.
skipintegerSkips participants up to a specified position in response. Default value is None.
startTimestring (date-time)The earliest point in time to get messages up to. The timestamp should be in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ. Default value is None.

SELECT examples

Gets a message by id. Gets a message by id.

SELECT
id,
content,
createdOn,
deletedOn,
editedOn,
metadata,
senderCommunicationIdentifier,
senderDisplayName,
sequenceId,
type,
version
FROM azure.communication_chat.chat_thread
WHERE chat_thread_id = '{{ chat_thread_id }}' -- required
AND chat_message_id = '{{ chat_message_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;

UPDATE examples

Updates a thread's properties. Updates a thread's properties.

UPDATE azure.communication_chat.chat_thread
SET
topic = '{{ topic }}'
WHERE
chat_thread_id = '{{ chat_thread_id }}' --required
AND endpoint = '{{ endpoint }}' --required;

Lifecycle Methods

Gets a chat thread's properties. Gets a chat thread's properties.

EXEC azure.communication_chat.chat_thread.get_chat_thread_properties 
@chat_thread_id='{{ chat_thread_id }}' --required,
@endpoint='{{ endpoint }}' --required
;