다음을 통해 공유


Chat Thread - Update Chat Message

메시지를 업데이트합니다.

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

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
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"

Name 필수 형식 Description
Authorization True

string

ACS(Azure Communication Services) 사용자 액세스 토큰입니다.

요청 본문

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

Name 형식 Description
attachments

ChatAttachment[]

첨부 파일의 배열

content

string

채팅 메시지 콘텐츠.

metadata

object

메시지 메타데이터.

응답

Name 형식 Description
204 No Content

메시지가 성공적으로 업데이트되었습니다.

401 Unauthorized

CommunicationErrorResponse

권한이 없습니다.

403 Forbidden

CommunicationErrorResponse

사용할 수 없습니다.

429 Too Many Requests

CommunicationErrorResponse

요청이 너무 많습니다.

Other Status Codes

CommunicationErrorResponse

서비스를 사용할 수 없습니다.

보안

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

정의

Name Description
ChatAttachment

채팅 메시지의 첨부 파일입니다. 현재 Teams Interop 시나리오에서만 지원됩니다.

ChatAttachmentType

첨부 파일의 형식입니다.

UpdateChatMessageRequest

채팅 메시지를 업데이트하기 위한 페이로드를 요청합니다.

ChatAttachment

채팅 메시지의 첨부 파일입니다. 현재 Teams Interop 시나리오에서만 지원됩니다.

Name 형식 Description
attachmentType

ChatAttachmentType

첨부 파일의 형식입니다.

id

string

첨부 파일의 ID

name

string

첨부 파일 콘텐츠의 이름입니다.

previewUrl

string

첨부 파일 미리 보기를 다운로드할 수 있는 URL

url

string

첨부 파일을 다운로드할 수 있는 URL

ChatAttachmentType

첨부 파일의 형식입니다.

Name 형식 Description
file

string

image

string

UpdateChatMessageRequest

채팅 메시지를 업데이트하기 위한 페이로드를 요청합니다.

Name 형식 Description
attachments

ChatAttachment[]

첨부 파일의 배열

content

string

채팅 메시지 콘텐츠.

metadata

object

메시지 메타데이터.