Update chat

Namespace: microsoft.graph

Update the properties of a chat object.

Note

When used with application permissions, this API is metered. It supports the model=A payment model. For details, see Payment models. If you don't specify a payment model in your query, the default evaluation mode will be used.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Chat.ReadWrite
Delegated (personal Microsoft account) Not supported.
Application Not supported.

HTTP request

PATCH /chats/{chat-id}

Request headers

Name Description
Authorization Bearer {token}. Required.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the chat object.

The following table shows the properties that can be used with this action.

Property Type Description
topic String The title of the chat. This can only be set for a chat with a chatType value of group. Maximum length is 250 characters. Use of ':' is not allowed.

Response

If successful, this method returns a 200 OK response code and the updated chat resource in the response body.

Examples

Request

PATCH https://graph.microsoft.com/v1.0/chats/19:1c5b01696d2e4a179c292bc9cf04e63b@thread.v2
Content-Type: application/json

{
    "topic": "Group chat title update"
}

Response

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-Type: application/json

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#chats/$entity",
    "id": "19:1c5b01696d2e4a179c292bc9cf04e63b@thread.v2",
    "topic": "Group chat title update",
    "createdDateTime": "2020-12-04T23:11:16.175Z",
    "lastUpdatedDateTime": "2020-12-04T23:12:19.943Z",
    "chatType": "group"
}