Chat Thread - Remove Chat Participant

Remove a participant from a thread.

POST {endpoint}/chat/threads/{chatThreadId}/participants/:remove?api-version=2024-03-07

URI Parameters

Name In Required Type Description
chatThreadId
path True

string

Thread id to remove the participant from.

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/json", "application/merge-patch+json"

Name Required Type Description
Authorization True

string

An ACS (Azure Communication Services) user access token.

Request Body

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

Name Type Description
participantCommunicationIdentifier

CommunicationIdentifierModel

Id of the thread participant to remove from the thread.

Responses

Name Type Description
204 No Content

Request successful.

401 Unauthorized

CommunicationErrorResponse

Unauthorized.

403 Forbidden

CommunicationErrorResponse

Forbidden.

429 Too Many Requests

CommunicationErrorResponse

Too many requests.

Other Status Codes

CommunicationErrorResponse

Service unavailable.

Security

Authorization

An ACS (Azure Communication Services) user access token.

Type: apiKey
In: header

Examples

Remove participant

Sample request

POST https://contoso.westus.communications.azure.com/chat/threads/19:f2167429acf6482880c6b7790a9086c1@thread.v2/participants/:remove?api-version=2024-03-07

{
  "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b",
  "communicationUser": {
    "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"
  }
}

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