Chat Thread - Update Chat Message
Updates a message.
PATCH {endpoint}/chat/threads/{chatThreadId}/messages/{chatMessageId}?api-version=2024-03-15-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
chat
|
path | True |
string |
The message id. |
chat
|
path | True |
string |
The thread id to which the message was sent. |
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 |
---|---|---|
attachments |
The array of attachments |
|
content |
string |
Chat message content. |
metadata |
object |
Message metadata. |
Responses
Name | Type | Description |
---|---|---|
204 No Content |
Message is 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 message content
Sample Request
PATCH https://contoso.westus.communications.azure.com/chat/threads/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/messages/1591768249318?api-version=2024-03-15-preview
{
"content": "Updated message content",
"metadata": {
"someKey1": "someValue1",
"someKey2": "someValue2"
}
}
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 |
---|---|
Chat |
An attachment in a chat message. Currently only supported in Teams Interop scenarios. |
Chat |
The type of attachment. |
Update |
Request payload for updating a chat message. |
ChatAttachment
An attachment in a chat message. Currently only supported in Teams Interop scenarios.
Name | Type | Description |
---|---|---|
attachmentType |
The type of attachment. |
|
id |
string |
Id of the attachment |
name |
string |
The name of the attachment content. |
previewUrl |
string |
The URL where the preview of attachment can be downloaded |
url |
string |
The URL where the attachment can be downloaded |
ChatAttachmentType
The type of attachment.
Name | Type | Description |
---|---|---|
file |
string |
|
image |
string |
UpdateChatMessageRequest
Request payload for updating a chat message.
Name | Type | Description |
---|---|---|
attachments |
The array of attachments |
|
content |
string |
Chat message content. |
metadata |
object |
Message metadata. |