Skip to content

Latest commit

 

History

History
130 lines (100 loc) · 4.43 KB

File metadata and controls

130 lines (100 loc) · 4.43 KB
title Update chat
description Update the properties of a chat object.
author anandjo
ms.localizationpriority medium
ms.subservice teams
doc_type apiPageType
ms.date 07/30/2024

Update chat

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Update the properties of a chat object.

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

Note

The ChatSettings.ReadWrite.Chat permission uses resource-specific consent.

HTTP request

PATCH /chats/{chat-id}

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
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. topic can only be set for a chat with a chatType value of group. Maximum length is 250 characters. Use of ':' isn't 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/beta/chats/19:1c5b01696d2e4a179c292bc9cf04e63b@thread.v2
Content-Type: application/json

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

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


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/beta/$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",
    "webUrl": "https://teams.microsoft.com/l/chat/19%3A1c5b01696d2e4a179c292bc9cf04e63b@thread.v2/0?tenantId=b33cbe9f-8ebe-4f2a-912b-7e2a427f477f"
}