Chat Thread - Update Chat Thread Properties
Updates a thread's properties.
PATCH {endpoint}/chat/threads/{chatThreadId}?api-version=2024-03-15-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
chat
|
path | True |
string |
The id of the thread to update. |
endpoint
|
path | True |
string |
The endpoint of the Azure Communication resource. |
api-version
|
query | True |
string |
Version of API to invoke. |
Request Header
Media Types: "application/merge-patch+json"
Name | Required | Type | Description |
---|---|---|---|
Authorization | True |
string |
An ACS (Azure Communication Services) user access token. |
Request Body
Media Types: "application/merge-patch+json"
Name | Type | Description |
---|---|---|
metadata |
object |
Contextual metadata for the thread. The metadata consists of name/value pairs. The total size of all metadata pairs can be up to 1KB in size. |
retentionPolicy | ChatRetentionPolicy: |
Data retention policy for auto deletion. |
topic |
string |
Chat thread topic. |
Responses
Name | Type | Description |
---|---|---|
204 No Content |
Thread was successfully updated. |
|
401 Unauthorized |
Communication |
Unauthorized. |
403 Forbidden |
Communication |
Forbidden. |
429 Too Many Requests |
Communication |
Too many requests. |
Other Status Codes |
Communication |
Service unavailable. |
Security
Authorization
An ACS (Azure Communication Services) user access token.
Type:
apiKey
In:
header
Examples
Update chat thread topic
Sample request
PATCH https://contoso.westus.communications.azure.com/chat/threads/19:uni01_zbnh3nt2dfuffezc3sox7dog7wfhk6y5qe2rwlnfhlhdzirihdpq@thread.v2?api-version=2024-03-15-preview
{
"topic": "Updated Thread Topic"
}
Sample response
{
"error": {
"code": "Unauthorized",
"message": "Request is not authorized."
}
}
{
"error": {
"code": "Forbidden",
"message": "User is not allowed to perform specified action."
}
}
{
"error": {
"code": "TooManyRequests",
"message": "Rate limit exceeded."
}
}
{
"error": {
"code": "ServiceUnavailable",
"message": "The server is currently unable to handle the request."
}
}
Definitions
Name | Description |
---|---|
None |
No thread retention policy. |
Thread |
Thread retention policy based on thread creation date. |
Update |
Request payload for updating a chat thread. |
NoneRetentionPolicy
No thread retention policy.
Name | Type | Description |
---|---|---|
kind |
string:
none |
Retention Policy Type |
ThreadCreationDateRetentionPolicy
Thread retention policy based on thread creation date.
Name | Type | Description |
---|---|---|
deleteThreadAfterDays |
integer |
Indicates how many days after the thread creation the thread will be deleted. |
kind |
string:
thread |
Retention Policy Type |
UpdateChatThreadRequest
Request payload for updating a chat thread.
Name | Type | Description |
---|---|---|
metadata |
object |
Contextual metadata for the thread. The metadata consists of name/value pairs. The total size of all metadata pairs can be up to 1KB in size. |
retentionPolicy | ChatRetentionPolicy: |
Data retention policy for auto deletion. |
topic |
string |
Chat thread topic. |