Microsoft Teams Chats.chat Message API

The chats.chatMessage API from Microsoft Teams — 26 operation(s) for chats.chatmessage.

GitHub OpenAPI

Operations 42

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /chats/{chat-id}/messages List messages in a chat · List messages in a chat #
Ask an LLM
“What messages have been exchanged in a Teams chat?”
“Can I filter a chat's messages by sender or date?”
Tell an agent
List messages in chat {chat}.
Show chat {chat} messages matching {filter}.
POST /chats/{chat-id}/messages Send a message to a chat · Send message in a chat #
Ask an LLM
“How do I post a message in a Teams chat?”
“Can I attach files when sending a chat message?”
Tell an agent
Send a message in chat {chat}.
Post a message in chat {chat} with body {body}.
GET /chats/{chat-id}/messages/{chatMessage-id} Get a message in a chat · Get chatMessage in a channel or chat #
Ask an LLM
“How do I read one specific message from a chat?”
“Can I fetch a chat message reply by its ID?”
Tell an agent
Get message {message} in chat {chat}.
Show chat {chat} message {message}.
PATCH /chats/{chat-id}/messages/{chatMessage-id} Edit a message in a chat · Update the navigation property messages in chats #
Ask an LLM
“How do I edit a message I already sent in a chat?”
“Can I change the text of an existing chat message?”
Tell an agent
Edit message {message} in chat {chat}.
Update chat {chat} message {message} with body {body}.
DELETE /chats/{chat-id}/messages/{chatMessage-id} Delete a message from a chat · Delete navigation property messages for chats #
Ask an LLM
“How do I delete a message from a Teams chat?”
“Can I remove a single chat message by its ID?”
Tell an agent destructive · confirm first
Delete message {message} from chat {chat}.
Remove chat {chat} message {message}.
GET /chats/{chat-id}/messages/{chatMessage-id}/hostedContents List hosted content in a chat message · List hostedContents #
Ask an LLM
“Which files or images are attached to a chat message?”
“Can I list the hosted content objects in a message?”
Tell an agent
List hosted content in message {message} of chat {chat}.
Show the attachments on chat {chat} message {message}.
POST /chats/{chat-id}/messages/{chatMessage-id}/hostedContents Attach a file to a chat message · Create new navigation property to hostedContents for chats #
Ask an LLM
“How do I attach a file to a message in a Teams chat?”
“Can I upload a hosted content object to a chat message?”
Tell an agent
Attach a file to message {message} in chat {chat}.
Add hosted content to chat {chat} message {message}.
GET /chats/{chat-id}/messages/{chatMessage-id}/hostedContents/{chatMessageHostedContent-id} Get hosted content from a chat message · Get chatMessageHostedContent #
Ask an LLM
“How do I retrieve one hosted content object from a chat message?”
“Can I fetch a single attachment on a chat message by its ID?”
Tell an agent
Get hosted content {content} from message {message} in chat {chat}.
Show attachment {content} on chat {chat} message {message}.
PATCH /chats/{chat-id}/messages/{chatMessage-id}/hostedContents/{chatMessageHostedContent-id} Update hosted content in a chat message · Update the navigation property hostedContents in chats #
Ask an LLM
“How do I change the properties of an attachment on a chat message?”
“Can I edit a hosted content object on a message?”
Tell an agent
Update hosted content {content} on message {message} in chat {chat}.
Edit attachment {content} of chat {chat} message {message}.
DELETE /chats/{chat-id}/messages/{chatMessage-id}/hostedContents/{chatMessageHostedContent-id} Remove hosted content from a chat message · Delete navigation property hostedContents for chats #
Ask an LLM
“How do I remove an attachment from a chat message?”
“Can I delete a hosted content object from a message?”
Tell an agent destructive · confirm first
Delete hosted content {content} from message {message} in chat {chat}.
Remove attachment {content} on chat {chat} message {message}.
GET /chats/{chat-id}/messages/{chatMessage-id}/hostedContents/{chatMessageHostedContent-id}/$value Download hosted content from a chat message · List hostedContents #
Ask an LLM
“How do I download the file hosted in a chat message?”
“Can I fetch the bytes of an attachment on a message?”
Tell an agent
Download hosted content {content} from message {message} in chat {chat}.
Get the file bytes of attachment {content} on chat {chat} message {message}.
PUT /chats/{chat-id}/messages/{chatMessage-id}/hostedContents/{chatMessageHostedContent-id}/$value Replace hosted content in a chat message · Update media content for the navigation property hostedContents in chats #
Ask an LLM
“How do I replace the file in a hosted content object on a chat message?”
“Can I upload new bytes to an existing attachment on a message?”
Tell an agent
Replace hosted content {content} in message {message} of chat {chat}.
Upload new bytes to attachment {content} on chat {chat} message {message}.
DELETE /chats/{chat-id}/messages/{chatMessage-id}/hostedContents/{chatMessageHostedContent-id}/$value Delete hosted content bytes from a chat message · Delete media content for the navigation property hostedContents in chats #
Ask an LLM
“How do I delete the file bytes of an attachment on a chat message?”
“Can I remove the content of an existing hosted content object?”
Tell an agent destructive · confirm first
Delete the file bytes of hosted content {content} in message {message} of chat {chat}.
Remove attachment {content} content on chat {chat} message {message}.
GET /chats/{chat-id}/messages/{chatMessage-id}/hostedContents/$count Count hosted content objects in a chat message · Get the number of the resource #
Ask an LLM
“How many attachments are on a chat message?”
“Can I count hosted content objects in a message?”
Tell an agent
Count hosted content objects in message {message} of chat {chat}.
Tell me how many attachments chat {chat} message {message} has.
POST /chats/{chat-id}/messages/{chatMessage-id}/setReaction React to a chat message · Invoke action setReaction #
Ask an LLM
“How do I react to a message in a Teams chat?”
“Can I add a like reaction to a chat message?”
Tell an agent
React {reaction} to message {message} in chat {chat}.
Like message {message} in chat {chat}.
POST /chats/{chat-id}/messages/{chatMessage-id}/softDelete Soft delete a chat message · Invoke action softDelete #
Ask an LLM
“How do I delete a chat message without removing it permanently?”
“Can I soft delete a message in a channel or chat?”
Tell an agent destructive · confirm first
Soft delete message {message} in chat {chat}.
Delete chat {chat} message {message} without removing it.
POST /chats/{chat-id}/messages/{chatMessage-id}/undoSoftDelete Undo a soft delete of a chat message · Invoke action undoSoftDelete #
Ask an LLM
“How do I bring back a chat message I soft deleted?”
“Can I undo a soft deletion of a message in a channel or chat?”
Tell an agent
Undo the soft delete of message {message} in chat {chat}.
Restore chat {chat} message {message}.
POST /chats/{chat-id}/messages/{chatMessage-id}/unsetReaction Remove a reaction from a chat message · Invoke action unsetReaction #
Ask an LLM
“How do I remove my reaction from a chat message?”
“Can I undo a like on a Teams message?”
Tell an agent
Remove reaction {reaction} from message {message} in chat {chat}.
Unlike message {message} in chat {chat}.
GET /chats/{chat-id}/messages/{chatMessage-id}/replies List replies to a chat message · Get replies from chats #
Ask an LLM
“What replies have been posted to a message in a chat?”
“Can I list the replies on a chat message?”
Tell an agent
List replies to message {message} in chat {chat}.
Show the replies on chat {chat} message {message}.
POST /chats/{chat-id}/messages/{chatMessage-id}/replies Reply to a chat message · Create new navigation property to replies for chats #
Ask an LLM
“How do I reply to a message in a Teams chat?”
“Can I post a reply to a chat message with a body?”
Tell an agent
Reply to message {message} in chat {chat}.
Post a reply to chat {chat} message {message} with body {body}.
GET /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1} Read one specific reply to a chat message · Get replies from chats #
Ask an LLM
“What does one particular reply under a Teams chat message say?”
“Can I return only certain properties when reading a single chat reply?”
Tell an agent
Look up reply {reply} under message {message} in chat {chat}.
Pull up reply {reply} beneath message {message} in chat {chat}, returning only {select}.
PATCH /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1} Edit a reply on a chat message · Update the navigation property replies in chats #
Ask an LLM
“Can I change the text of a reply someone posted in a chat?”
“How do I edit a chat reply that's already posted?”
Tell an agent
Edit the body of reply {reply} on chat message {message} in chat {chat} to {body}.
Mark reply {reply} to message {message} in chat {chat} as important {imp}.
DELETE /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1} Delete a reply on a chat message · Delete navigation property replies for chats #
Ask an LLM
“How do I delete a reply on a message in a chat?”
“Can I remove a specific reply from a chat message?”
Tell an agent destructive · confirm first
Delete reply {reply} on chat message {message} in chat {chat}.
Remove the chat reply {reply} from message {message} in chat {chat}.
GET /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1}/hostedContents List hosted content in a chat reply · Get hostedContents from chats #
Ask an LLM
“What hosted content is attached to a reply in a Teams chat?”
“Can I list the images or code snippets in a chat message reply?”
Tell an agent
List hosted content in reply {reply} to message {message} in chat {chat}.
Show the hosted content attached to reply {reply} on chat message {message} in chat {chat}.
POST /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1}/hostedContents Add hosted content to a chat reply · Create new navigation property to hostedContents for chats #
Ask an LLM
“How do I attach an image or code snippet to a reply in a Teams chat?”
“Can I add hosted content to a chat message reply?”
Tell an agent
Add hosted content to reply {reply} on message {message} in chat {chat}.
Attach a new hosted content item to reply {reply} of chat message {message} in chat {chat}.
GET /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1}/hostedContents/{chatMessageHostedContent-id} Get hosted content in a chat reply · Get hostedContents from chats #
Ask an LLM
“How do I download an image someone posted in a chat reply?”
“What hosted files are attached to a reply in a chat?”
Tell an agent
Get hosted content {content} from reply {reply} on message {message} in chat {chat}.
Download the image in chat reply {reply} to message {message} in chat {chat}.
PATCH /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1}/hostedContents/{chatMessageHostedContent-id} Edit hosted content in a chat reply · Update the navigation property hostedContents in chats #
Ask an LLM
“How do I edit the details of hosted content in a reply to a Teams chat message?”
“Can I change a hosted content attachment on a chat message reply?”
Tell an agent
Update hosted content {content} in reply {reply} to message {message} in chat {chat}.
Edit hosted content {content} on reply {reply} of chat message {message} in chat {chat}.
DELETE /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1}/hostedContents/{chatMessageHostedContent-id} Delete hosted content from a chat reply · Delete navigation property hostedContents for chats #
Ask an LLM
“How do I remove an image or code snippet from a reply in a Teams chat?”
“Can I delete a hosted content attachment on a chat message reply?”
Tell an agent destructive · confirm first
Delete hosted content {content} from reply {reply} to message {message} in chat {chat}.
Remove hosted content {content} on reply {reply} of chat message {message} in chat {chat}.
GET /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1}/hostedContents/{chatMessageHostedContent-id}/$value Download hosted content from a chat reply · Get media content for the navigation property hostedContents from chats #
Ask an LLM
“How do I download the image or code snippet attached to a reply in a Teams chat?”
“Can I fetch the media of hosted content in a chat message reply?”
Tell an agent
Download hosted content {content} from reply {reply} to message {message} in chat {chat}.
Get the media of hosted content {content} on reply {reply} of chat message {message} in chat {chat}.
PUT /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1}/hostedContents/{chatMessageHostedContent-id}/$value Replace hosted content in a chat reply · Update media content for the navigation property hostedContents in chats #
Ask an LLM
“How do I replace an image or code snippet in a reply to a Teams chat message?”
“Can I upload new media to hosted content on a chat message reply?”
Tell an agent
Replace hosted content {content} in reply {reply} to message {message} in chat {chat}.
Upload new media to hosted content {content} on reply {reply} of chat message {message} in chat {chat}.
DELETE /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1}/hostedContents/{chatMessageHostedContent-id}/$value Delete hosted content from a chat reply · Delete media content for the navigation property hostedContents in chats #
Ask an LLM
“How do I remove an image from a chat reply?”
“Can I delete the hosted file attached to a chat reply?”
Tell an agent destructive · confirm first
Delete hosted content {content} from reply {reply} on message {message} in chat {chat}.
Remove the image in chat reply {reply} to message {message} in chat {chat}.
GET /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1}/hostedContents/$count Count hosted content in a chat reply · Get the number of the resource #
Ask an LLM
“How many hosted content items are attached to a reply in a Teams chat?”
“Can I count the attachments on a chat message reply?”
Tell an agent
Count hosted content in reply {reply} to message {message} in chat {chat}.
Tell me how many attachments reply {reply} on chat message {message} in chat {chat} has.
POST /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1}/setReaction React to a reply in a Teams chat · Invoke action setReaction #
Ask an LLM
“How do I react to a reply in a Teams chat?”
“Can I add a like or emoji to a chat message reply?”
Tell an agent
React {reaction} to reply {reply} on message {message} in chat {chat}.
Like reply {reply} of chat message {message} in chat {chat}.
POST /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1}/softDelete Soft delete a reply in a chat · Invoke action softDelete #
Ask an LLM
“How do I soft delete a reply in a Teams chat thread?”
“Can I soft delete a single reply to a chat message instead of the whole message?”
Tell an agent destructive · confirm first
Mark reply {reply} of message {message} in chat {chat} as soft deleted.
Run softDelete on reply {reply} under message {message} in chat {chat}.
POST /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1}/undoSoftDelete Undo the soft-delete of a reply · Invoke action undoSoftDelete #
Ask an LLM
“How do I restore a reply I soft-deleted in a Teams chat?”
“Can I undo a soft-delete on a chat message reply?”
Tell an agent
Undo the soft-delete of reply {reply} to message {message} in chat {chat}.
Restore reply {reply} on chat message {message} in chat {chat}.
POST /chats/{chat-id}/messages/{chatMessage-id}/replies/{chatMessage-id1}/unsetReaction Remove a reaction from a reply · Invoke action unsetReaction #
Ask an LLM
“How do I remove my reaction from a reply in a Teams chat?”
“Can I undo a like on a chat message reply?”
Tell an agent
Remove reaction {reaction} from reply {reply} on message {message} in chat {chat}.
Undo my like on reply {reply} of chat message {message} in chat {chat}.
GET /chats/{chat-id}/messages/{chatMessage-id}/replies/$count Count replies to a chat message · Get the number of the resource #
Ask an LLM
“How many replies does a message in a Teams chat have?”
“Can I count the replies to a chat message?”
Tell an agent
Count replies to message {message} in chat {chat}.
Tell me how many replies chat message {message} has in chat {chat}.
GET /chats/{chat-id}/messages/{chatMessage-id}/replies/delta() Track changes to replies in a chat · Invoke function delta #
Ask an LLM
“How do I get new or updated replies to a message in a Teams chat?”
“Can I use a change-tracking link to see replies that changed since my last sync?”
Tell an agent
Track replies to message {message} in chat {chat} with delta.
Get changed replies on chat message {message} in chat {chat}.
POST /chats/{chat-id}/messages/{chatMessage-id}/replies/replyWithQuote Reply to chat messages with a quote · Invoke action replyWithQuote #
Ask an LLM
“What's the way to quote earlier Teams chat messages inside a reply?”
“Can I quote more than one earlier message in a single chat reply?”
Tell an agent
Reply in chat {chat} to message {message} quoting {messageIds} with the text {replyMessage}.
Quote message {message} in chat {chat} and reply with {replyMessage}.
GET /chats/{chat-id}/messages/$count Count messages in a chat · Get the number of the resource #
Ask an LLM
“How many messages are in a Teams chat?”
“Can I count the messages in a chat?”
Tell an agent
Count the messages in chat {chat}.
Tell me how many messages chat {chat} has.
GET /chats/{chat-id}/messages/delta() Track new or updated messages in a chat · Invoke function delta #
Ask an LLM
“How do I get new messages from a chat since my last sync?”
“Can I track changes to chat messages over time with a state token?”
Tell an agent
Get new messages in chat {chat}.
Track changes to chat {chat} messages since the last sync.
POST /chats/{chat-id}/messages/replyWithQuote Quote-reply to messages in a chat · Invoke action replyWithQuote #
Ask an LLM
“How do I reply to a chat message quoting the original text?”
“Can I reply to several messages in a chat at once with a quote?”
Tell an agent
Reply to chat {chat} with a quote of {replyMessage}.
Quote-reply to messages {messageIds} in chat {chat}.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-teams:microsoft-teams-chats-chatmessage-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-teams-chats-chatmessage-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OData Service for namespace microsoft.graph Chats.chat…
  description: This OData service is located at https://graph.microsoft.com/v1.0
  version: v1.0
  x-ms-generated-by:
    toolName: Microsoft.OpenApi.OData
    toolVersion: 0.0.0.0
servers:
- url: https://graph.microsoft.com/v1.0
tags:


# --- truncated at 32 KB (234 KB total) ---
# Full source: https://artifacts.apis.io/microsoft-teams/openapi/microsoft-teams-chats-chatmessage-api-openapi.yml