共用方式為


Chat Thread - Delete Chat Message

刪除訊息。

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

URI 參數

名稱 位於 必要 類型 Description
chatMessageId
path True

string

訊息 ID。

chatThreadId
path True

string

訊息傳送至其中的線程標識碼。

endpoint
path True

string

Azure 通訊資源的端點。

api-version
query True

string

要叫用的 API 版本。

要求標頭

名稱 必要 類型 Description
Authorization True

string

ACS (Azure 通訊服務) 使用者存取令牌。

回應

名稱 類型 Description
204 No Content

要求成功。

401 Unauthorized

CommunicationErrorResponse

未經授權。

403 Forbidden

CommunicationErrorResponse

禁止。

429 Too Many Requests

CommunicationErrorResponse

太多要求。

Other Status Codes

CommunicationErrorResponse

服務無法使用。

安全性

Authorization

ACS (Azure 通訊服務) 使用者存取令牌。

Type: apiKey
In: header

範例

Delete message

Sample Request

DELETE https://contoso.westus.communications.azure.com/chat/threads/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/messages/1591768249318?api-version=2024-03-15-preview

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