---
title: "Sends a message to a thread."
method: POST
path: "/chat/threads/{chatThreadId}/messages"
tags: ["Messages"]
---

# Sends a message to a thread.

`POST /chat/threads/{chatThreadId}/messages`

## Path parameters

- `chatThreadId` string, required

## Query parameters

- `api-version` string, required

## Request body

- SendChatMessageRequest — Details of the message to send.
  - `content` string, required — Chat message content.
  - `senderDisplayName` string — 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.
  - `metadata` object — Message metadata.
  - `attachments` ChatAttachment[] — The array of attachments
    - `id` string, required — Id of the attachment
    - `attachmentType` 'image' | 'file', required — The type of attachment.
    - `name` string — The name of the attachment content.
    - `url` string, uri — The URL where the attachment can be downloaded
    - `previewUrl` string, uri — The URL where the preview of attachment can be downloaded

## Response `201`

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

- SendChatMessageResult — Result of the send message operation.
  - `id` string, required — A server-generated message id.

## Other responses

- `401` — Unauthorized.
- `403` — Forbidden.
- `429` — Too many requests.
- `503` — Service unavailable.

## Changes

- **2026-07-13** `e3e45a46545e` — 1 info
  - api operation id `SendChatMessage` removed and replaced with `ChatThread_SendChatMessage`
- **2021-05-19** `4c5323153682` — 1 info
  - api operation id `ChatThread_SendChatMessage` removed and replaced with `SendChatMessage`

[Change history](https://skmtc.dev/azure/apis/communication-chat/changes/chat/threads/:chatThreadId/messages/post.md)

---

[API](https://skmtc.dev/azure/apis/communication-chat.md) · [All operations](https://skmtc.dev/azure/apis/communication-chat/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/communication-chat/revisions/57a59d1b8530/schema)
