Skip to content

Latest commit

 

History

History
183 lines (147 loc) · 6.02 KB

File metadata and controls

183 lines (147 loc) · 6.02 KB
title chatMessage: replyWithQuote
description Reply with quote to a single chat message or multiple chat messages in a chat.
author AdityaSharma6
ms.subservice teams
doc_type apiPageType
ms.localizationpriority medium
ms.date 02/20/2025

chatMessage: replyWithQuote

Namespace: microsoft.graph

Reply with quote to a single chat message or multiple chat messages in a chat.

Note

When replying with a quote to multiple messages, a maximum of 10 messages can be used for the reply.

[!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]

HTTP request

POST /chats/{chatId}/messages/replyWithQuote

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 parameters.

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

Parameter Type Description
messageIds String collection List of message IDs in a chat that are replied to with a quote.
replyMessage chatMessage The message body for the reply.

Response

If successful, this method returns a 201 Created response code and a new chatMessage object in the response body.

Examples

Request

The following example shows a request.

POST https://graph.microsoft.com/v1.0/chats/19:97641583cf154265a237da28ebbde27a@thread.v2/messages/replyWithQuote
Content-Type: application/json

{
  "messageIds": [
    "1728088338580"
  ],
  "replyMessage": {
    "body": {
      "content": "Hello World"
    }
  }
}

[!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

The following example shows the response.

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

HTTP/1.1 201 Created
Content-type: application/json

{
  "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#chats('19%3A97641583cf154265a237da28ebbde27a%40thread.v2')/messages/$entity",
  "@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET chats('<key>')/messages('<key>')?$select=attachments,body",
  "id": "1729091934196",
  "replyToId": null,
  "etag": "1729091934196",
  "messageType": "message",
  "createdDateTime": "2024-10-16T15:18:54.196Z",
  "lastModifiedDateTime": "2024-10-16T15:18:54.196Z",
  "lastEditedDateTime": null,
  "deletedDateTime": null,
  "subject": null,
  "summary": null,
  "chatId": "19:97641583cf154265a237da28ebbde27a@thread.v2",
  "importance": "normal",
  "locale": "en-us",
  "webUrl": null,
  "channelIdentity": null,
  "policyViolation": null,
  "eventDetail": null,
  "from": {
    "application": null,
    "device": null,
    "user": {
      "@odata.type": "#microsoft.graph.teamworkUserIdentity",
      "id": "28c10244-4bad-4fda-993c-f332faef94f0",
      "displayName": "Adele Vance",
      "userIdentityType": "aadUser",
      "tenantId": "2432b57b-0abd-43db-aa7b-16eadd115d34"
    }
  },
  "body": {
    "contentType": "html",
    "content": "<p></p>\n<attachment id=\"1728422677844\"></attachment>\ntest reply\n<p></p>"
  },
  "attachments": [
    {
      "id": "1728422677844",
      "contentType": "messageReference",
      "contentUrl": null,
      "content": "{\"messageId\":\"1728422677844\",\"messagePreview\":\"Hello World Jane Smith\",\"messageSender\":{\"application\":null,\"device\":null,\"user\":{\"userIdentityType\":\"aadUser\",\"tenantId\":\"2432b57b-0abd-43db-aa7b-16eadd115d34\",\"id\":\"28c10244-4bad-4fda-993c-f332faef94f0\",\"displayName\":\"Adele Vance\"}}}",
      "name": null,
      "thumbnailUrl": null,
      "teamsAppId": null
    }
  ],
  "mentions": [],
  "reactions": []
}