v18

latestSwagger 2.02026-07-13194165.4 KB
Messages

Sends a message to a thread.

post/chat/threads/{chatThreadId}/messages

Path parameters

chatThreadIdstring required

The thread id to send the message to.

Query parameters

api-versionstring required

Version of API to invoke.

Request body

contentstring required

Chat message content.

senderDisplayNamestring

The display name of the chat message sender. This property is used to populate sender name for push notifications.

type'text' | 'html' | 'topicUpdated' | 'participantAdded' | 'participantRemoved' | 'azureBotActivity'

The chat message type.

metadataobject

Message metadata.

Example request

{
  "content": "<p>Come one guys, lets go for lunch together.</p>",
  "senderDisplayName": "Bob Admin",
  "type": "html",
  "attachments": [
    {
      "id": "f508ce15-e878-431f-b871-f530cac5331d",
      "name": "SomeImage.png",
      "url": "https://{geoChatGW}/threads/{chatThreadId}/images/{imageId}/views/original",
      "previewUrl": "https://{geoChatGW}/threads/{chatThreadId}/images/{imageId}/views/small"
    }
  ]
}

Response

Message sent, the Location header contains the URL for the newly sent message.

idstring required

A server-generated message id.

Example response

{
  "id": "123456789"
}