Udostępnij za pośrednictwem


Chat Thread - Update Chat Message

Aktualizuje komunikat.

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

Parametry identyfikatora URI

Nazwa W Wymagane Typ Opis
chatMessageId
path True

string

Identyfikator wiadomości.

chatThreadId
path True

string

Identyfikator wątku, do którego wysłano wiadomość.

endpoint
path True

string

Punkt końcowy zasobu usługi Azure Communication.

api-version
query True

string

Wersja interfejsu API do wywołania.

Nagłówek żądania

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

Nazwa Wymagane Typ Opis
Authorization True

string

Token dostępu użytkownika usług ACS (Azure Communication Services).

Treść żądania

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

Nazwa Typ Opis
content

string

Zawartość wiadomości czatu.

metadata

object

Metadane wiadomości.

Odpowiedzi

Nazwa Typ Opis
204 No Content

Komunikat został pomyślnie zaktualizowany.

401 Unauthorized

CommunicationErrorResponse

Nieautoryzowanych.

403 Forbidden

CommunicationErrorResponse

Zakazany.

429 Too Many Requests

CommunicationErrorResponse

Zbyt wiele żądań.

Other Status Codes

CommunicationErrorResponse

Usługa jest niedostępna.

Zabezpieczenia

Authorization

Token dostępu użytkownika usług ACS (Azure Communication Services).

Typ: apiKey
W: header

Przykłady

Update message content

Przykładowe żądanie

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

{
  "content": "Updated message content",
  "metadata": {
    "someKey1": "someValue1",
    "someKey2": "someValue2"
  }
}

Przykładowa odpowiedź

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

Definicje

UpdateChatMessageRequest

Zażądaj ładunku w celu zaktualizowania wiadomości czatu.

Nazwa Typ Opis
content

string

Zawartość wiadomości czatu.

metadata

object

Metadane wiadomości.