Share via


Chat Thread - Update Chat Message

メッセージを更新します。

PATCH {endpoint}/chat/threads/{chatThreadId}/messages/{chatMessageId}?api-version=2024-03-15-preview

URI パラメーター

名前 / 必須 説明
chatMessageId
path True

string

メッセージ ID。

chatThreadId
path True

string

メッセージが送信されたスレッド ID。

endpoint
path True

string

Azure Communication リソースのエンドポイント。

api-version
query True

string

呼び出す API のバージョン。

要求ヘッダー

Media Types: "application/merge-patch+json"

名前 必須 説明
Authorization True

string

ACS (Azure Communication Services) ユーザー アクセス トークン。

要求本文

Media Types: "application/merge-patch+json"

名前 説明
attachments

ChatAttachment[]

添付ファイルの配列

content

string

チャット メッセージの内容。

metadata

object

メッセージ メタデータ。

応答

名前 説明
204 No Content

メッセージが正常に更新されました。

401 Unauthorized

CommunicationErrorResponse

権限がありません。

403 Forbidden

CommunicationErrorResponse

Forbidden.

429 Too Many Requests

CommunicationErrorResponse

要求が多すぎます。

Other Status Codes

CommunicationErrorResponse

Service unavailable. (サービス利用不可。)

セキュリティ

Authorization

ACS (Azure Communication Services) ユーザー アクセス トークン。

Type: apiKey
In: header

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."
  }
}

定義

名前 説明
ChatAttachment

チャット メッセージの添付ファイル。 現在、Teams 相互運用シナリオでのみサポートされています。

ChatAttachmentType

添付ファイルの種類。

UpdateChatMessageRequest

チャット メッセージを更新するためのペイロードを要求します。

ChatAttachment

チャット メッセージの添付ファイル。 現在、Teams 相互運用シナリオでのみサポートされています。

名前 説明
attachmentType

ChatAttachmentType

添付ファイルの種類。

id

string

添付ファイルの ID

name

string

添付ファイルの内容の名前。

previewUrl

string

添付ファイルのプレビューをダウンロードできる URL

url

string

添付ファイルをダウンロードできる URL

ChatAttachmentType

添付ファイルの種類。

名前 説明
file

string

image

string

UpdateChatMessageRequest

チャット メッセージを更新するためのペイロードを要求します。

名前 説明
attachments

ChatAttachment[]

添付ファイルの配列

content

string

チャット メッセージの内容。

metadata

object

メッセージ メタデータ。