Microsoft Teams Chats.chat.Actions API

The chats.chat.Actions API from Microsoft Teams — 8 operation(s) for chats.chat.actions.

GitHub OpenAPI

Operations 8

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

POST /chats/{chat-id}/completeMigration Complete a chat migration · Invoke action completeMigration #
Ask an LLM
“How do I finish migrating external messages into a chat?”
“Can I remove migration mode from a chat after importing messages?”
Tell an agent
Complete the migration of chat {chat}.
Finish importing messages into chat {chat} and exit migration mode.
POST /chats/{chat-id}/hideForUser Hide a chat for a user · Invoke action hideForUser #
Ask an LLM
“How do I hide a chat from a specific user?”
“Can I hide a chat for one person without affecting others?”
Tell an agent
Hide chat {chat} for user {user}.
Hide chat {chat} from {user} so they can't see it.
POST /chats/{chat-id}/markChatReadForUser Mark a chat as read for a user · Invoke action markChatReadForUser #
Ask an LLM
“How do I mark a chat as read for a particular user?”
“Can I set a chat's read state for one person?”
Tell an agent
Mark chat {chat} as read for user {user}.
Set chat {chat} to read for {user}.
POST /chats/{chat-id}/markChatUnreadForUser Mark a chat as unread for a user · Invoke action markChatUnreadForUser #
Ask an LLM
“How do I mark a chat as unread for a user?”
“Can I reset a chat's read state for one person?”
Tell an agent
Mark chat {chat} as unread for user {user}.
Set chat {chat} to unread for {user} at {last}.
POST /chats/{chat-id}/removeAllAccessForUser Remove a user's access to a chat · Invoke action removeAllAccessForUser #
Ask an LLM
“How do I revoke a user's access to a chat?”
“Can I remove someone from a chat entirely?”
Tell an agent destructive · confirm first
Remove all access to chat {chat} for user {user}.
Revoke {user}'s access to chat {chat}.
POST /chats/{chat-id}/sendActivityNotification Send an activity feed notification in a chat · Invoke action sendActivityNotification #
Ask an LLM
“How do I post a notification to the activity feed of a chat?”
“Can I send a Teams app notification to a chat?”
Tell an agent
Send an activity notification to chat {chat}.
Notify {user} in chat {chat} about {activity} with preview {preview}.
POST /chats/{chat-id}/startMigration Start migrating external messages into a chat · Invoke action startMigration #
Ask an LLM
“How do I begin importing external messages into an existing chat?”
“Can I set a minimum timestamp for messages to import?”
Tell an agent
Start migrating external messages into chat {chat}.
Start importing messages into chat {chat} from {date}.
POST /chats/{chat-id}/unhideForUser Unhide a chat for a user · Invoke action unhideForUser #
Ask an LLM
“How do I unhide a chat for a user?”
“Can I restore a chat a user previously hid?”
Tell an agent
Unhide chat {chat} for user {user}.
Show chat {chat} again to {user}.

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-chat-actions-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-chat-actions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OData Service for namespace microsoft.graph…
  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:
- name: chats.chat.Actions
  x-ms-docs-toc-type: container
paths:
  /chats/{chat-id}/completeMigration:
    description: Provides operations to call the completeMigration method.
    parameters:
    - name: chat-id
      in: path
      description: The unique identifier of chat
      required: true
      schema:
        type: string
      x-ms-docs-key-type: chat
    post:
      tags:
      - chats.chat.Actions
      summary: Invoke action completeMigration
      description: 'Complete the migration of external messages by removing migration mode from a chat. Complete migration operations were initially restricted to newly created standard channels using migration templates specifically designed for the initial migration process. For more information, see Import third-party platform messages to Teams using Microsoft Graph. After a completeMigration request is made for an existing or new chat, you can start a migration session by calling chat: startMigration. This API supportes the following channel types.'
      externalDocs:
        description: Find more info here
        url: https://learn.microsoft.com/graph/api/chat-completemigration?view=graph-rest-1.0
      operationId: chats.chat.completeMigration
      responses:
        '204':
          description: Success
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: action
  /chats/{chat-id}/hideForUser:
    description: Provides operations to call the hideForUser method.
    parameters:
    - name: chat-id
      in: path
      description: The unique identifier of chat
      required: true
      schema:
        type: string
      x-ms-docs-key-type: chat
    post:
      tags:
      - chats.chat.Actions
      summary: Invoke action hideForUser
      description: Hide a chat for a user.
      externalDocs:
        description: Find more info here
        url: https://learn.microsoft.com/graph/api/chat-hideforuser?view=graph-rest-1.0
      operationId: chats.chat.hideForUser
      requestBody:
        description: Action parameters
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  anyOf:
                  - $ref: '#/components/schemas/microsoft.graph.teamworkUserIdentity'
                  - type:
                    - object
                    - 'null'
        required: true
      responses:
        '204':
          description: Success
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: action
  /chats/{chat-id}/markChatReadForUser:
    description: Provides operations to call the markChatReadForUser method.
    parameters:
    - name: chat-id
      in: path
      description: The unique identifier of chat
      required: true
      schema:
        type: string
      x-ms-docs-key-type: chat
    post:
      tags:
      - chats.chat.Actions
      summary: Invoke action markChatReadForUser
      description: Mark a chat as read for a user.
      externalDocs:
        description: Find more info here
        url: https://learn.microsoft.com/graph/api/chat-markchatreadforuser?view=graph-rest-1.0
      operationId: chats.chat.markChatReadForUser
      requestBody:
        description: Action parameters
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  anyOf:
                  - $ref: '#/components/schemas/microsoft.graph.teamworkUserIdentity'
                  - type:
                    - object
                    - 'null'
        required: true
      responses:
        '204':
          description: Success
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: action
  /chats/{chat-id}/markChatUnreadForUser:
    description: Provides operations to call the markChatUnreadForUser method.
    parameters:
    - name: chat-id
      in: path
      description: The unique identifier of chat
      required: true
      schema:
        type: string
      x-ms-docs-key-type: chat
    post:
      tags:
      - chats.chat.Actions
      summary: Invoke action markChatUnreadForUser
      description: Mark a chat as unread for a user.
      externalDocs:
        description: Find more info here
        url: https://learn.microsoft.com/graph/api/chat-markchatunreadforuser?view=graph-rest-1.0
      operationId: chats.chat.markChatUnreadForUser
      requestBody:
        description: Action parameters
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  anyOf:
                  - $ref: '#/components/schemas/microsoft.graph.teamworkUserIdentity'
                  - type:
                    - object
                    - 'null'
                lastMessageReadDateTime:
                  pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
                  type:
                  - string
                  - 'null'
                  format: date-time
        required: true
      responses:
        '204':
          description: Success
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: action
  /chats/{chat-id}/removeAllAccessForUser:
    description: Provides operations to call the removeAllAccessForUser method.
    parameters:
    - name: chat-id
      in: path
      description: The unique identifier of chat
      required: true
      schema:
        type: string
      x-ms-docs-key-type: chat
    post:
      tags:
      - chats.chat.Actions
      summary: Invoke action removeAllAccessForUser
      description: Remove access to a chat for a user.
      externalDocs:
        description: Find more info here
        url: https://learn.microsoft.com/graph/api/chat-removeallaccessforuser?view=graph-rest-1.0
      operationId: chats.chat.removeAllAccessForUser
      requestBody:
        description: Action parameters
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  anyOf:
                  - $ref: '#/components/schemas/microsoft.graph.teamworkUserIdentity'
                  - type:
                    - object
                    - 'null'
        required: true
      responses:
        '204':
          description: Success
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: action
  /chats/{chat-id}/sendActivityNotification:
    description: Provides operations to call the sendActivityNotification method.
    parameters:
    - name: chat-id
      in: path
      description: The unique identifier of chat
      required: true
      schema:
        type: string
      x-ms-docs-key-type: chat
    post:
      tags:
      - chats.chat.Actions
      summary: Invoke action sendActivityNotification
      description: Send an activity feed notification in scope of a chat. For more information about sending notifications and the requirements for doing so, see sending Teams activity notifications.
      externalDocs:
        description: Find more info here
        url: https://learn.microsoft.com/graph/api/chat-sendactivitynotification?view=graph-rest-1.0
      operationId: chats.chat.sendActivityNotification
      requestBody:
        description: Action parameters
        content:
          application/json:
            schema:
              type: object
              properties:
                topic:
                  anyOf:
                  - $ref: '#/components/schemas/microsoft.graph.teamworkActivityTopic'
                  - type:
                    - object
                    - 'null'
                activityType:
                  type:
                  - string
                  - 'null'
                chainId:
                  type:
                  - number
                  - 'null'
                  format: int64
                previewText:
                  anyOf:
                  - $ref: '#/components/schemas/microsoft.graph.itemBody'
                  - type:
                    - object
                    - 'null'
                teamsAppId:
                  type:
                  - string
                  - 'null'
                templateParameters:
                  type: array
                  items:
                    $ref: '#/components/schemas/microsoft.graph.keyValuePair'
                recipient:
                  anyOf:
                  - $ref: '#/components/schemas/microsoft.graph.teamworkNotificationRecipient'
                  - type:
                    - object
                    - 'null'
                iconId:
                  type:
                  - string
                  - 'null'
        required: true
      responses:
        '204':
          description: Success
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: action
  /chats/{chat-id}/startMigration:
    description: Provides operations to call the startMigration method.
    parameters:
    - name: chat-id
      in: path
      description: The unique identifier of chat
      required: true
      schema:
        type: string
      x-ms-docs-key-type: chat
    post:
      tags:
      - chats.chat.Actions
      summary: Invoke action startMigration
      description: 'Start the migration of external messages by enabling migration mode in an existing chat. Import operations were limited to newly created standard channels that were in an empty state. For more information, see Import third-party platform messages to Teams using Microsoft Graph. You can define a minimum timestamp for content migration that enables the import of messages from the past. The specified timestamp must be earlier than the current createdDateTime of the chat. Imported content is always limited by the createdDateTime of the target thread. An optional createdDateTime property in the payload allows you to update this value, but with strict rules: This API supportes the following channel types.'
      externalDocs:
        description: Find more info here
        url: https://learn.microsoft.com/graph/api/chat-startmigration?view=graph-rest-1.0
      operationId: chats.chat.startMigration
      requestBody:
        description: Action parameters
        content:
          application/json:
            schema:
              type: object
              properties:
                conversationCreationDateTime:
                  pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
                  type:
                  - string
                  - 'null'
                  format: date-time
        required: true
      responses:
        '204':
          description: Success
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: action
  /chats/{chat-id}/unhideForUser:
    description: Provides operations to call the unhideForUser method.
    parameters:
    - name: chat-id
      in: path
      description: The unique identifier of chat
      required: true
      schema:
        type: string
      x-ms-docs-key-type: chat
    post:
      tags:
      - chats.chat.Actions
      summary: Invoke action unhideForUser
      description: Unhide a chat for a user.
      externalDocs:
        description: Find more info here
        url: https://learn.microsoft.com/graph/api/chat-unhideforuser?view=graph-rest-1.0
      operationId: chats.chat.unhideForUser
      requestBody:
        description: Action parameters
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  anyOf:
                  - $ref: '#/components/schemas/microsoft.graph.teamworkUserIdentity'
                  - type:
                    - object
                    - 'null'
        required: true
      responses:
        '204':
          description: Success
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: action
components:
  schemas:
    microsoft.graph.itemBody:
      title: itemBody
      required:
      - '@odata.type'
      type: object
      properties:
        content:
          type:
          - string
          - 'null'
          description: The content of the item.
        contentType:
          anyOf:
          - $ref: '#/components/schemas/microsoft.graph.bodyType'
          - type:
            - object
            - 'null'
          description: The type of the content. Possible values are text and html.
        '@odata.type':
          type: string
    microsoft.graph.teamworkUserIdentity:
      allOf:
      - $ref: '#/components/schemas/microsoft.graph.identity'
      - title: teamworkUserIdentity
        required:
        - '@odata.type'
        type: object
        properties:
          userIdentityType:
            anyOf:
            - $ref: '#/components/schemas/microsoft.graph.teamworkUserIdentityType'
            - type:
              - object
              - 'null'
            description: 'Type of user. The possible values are: aadUser, onPremiseAadUser, anonymousGuest, federatedUser, personalMicrosoftAccountUser, skypeUser, phoneUser, unknownFutureValue and emailUser.'
          '@odata.type':
            type: string
            default: '#microsoft.graph.teamworkUserIdentity'
      x-ms-discriminator-value: '#microsoft.graph.teamworkUserIdentity'
    microsoft.graph.bodyType:
      title: bodyType
      enum:
      - text
      - html
      type: string
    microsoft.graph.teamworkActivityTopicSource:
      title: teamworkActivityTopicSource
      enum:
      - entityUrl
      - text
      type: string
    microsoft.graph.teamworkNotificationRecipient:
      title: teamworkNotificationRecipient
      required:
      - '@odata.type'
      type: object
      properties:
        '@odata.type':
          type: string
      discriminator:
        propertyName: '@odata.type'
        mapping:
          '#microsoft.graph.aadUserNotificationRecipient': '#/components/schemas/microsoft.graph.aadUserNotificationRecipient'
          '#microsoft.graph.channelMembersNotificationRecipient': '#/components/schemas/microsoft.graph.channelMembersNotificationRecipient'
          '#microsoft.graph.chatMembersNotificationRecipient': '#/components/schemas/microsoft.graph.chatMembersNotificationRecipient'
          '#microsoft.graph.teamMembersNotificationRecipient': '#/components/schemas/microsoft.graph.teamMembersNotificationRecipient'
    microsoft.graph.ODataErrors.InnerError:
      title: InnerError
      required:
      - '@odata.type'
      type: object
      properties:
        request-id:
          type:
          - string
          - 'null'
          description: Request Id as tracked internally by the service
        client-request-id:
          type:
          - string
          - 'null'
          description: Client request Id as sent by the client application.
        date:
          pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$
          type:
          - string
          - 'null'
          description: Date when the error occured.
          format: date-time
        '@odata.type':
          type: string
    microsoft.graph.teamworkUserIdentityType:
      title: teamworkUserIdentityType
      enum:
      - aadUser
      - onPremiseAadUser
      - anonymousGuest
      - federatedUser
      - personalMicrosoftAccountUser
      - skypeUser
      - phoneUser
      - unknownFutureValue
      - emailUser
      type: string
    microsoft.graph.keyValuePair:
      title: keyValuePair
      required:
      - '@odata.type'
      type: object
      properties:
        name:
          type: string
          description: Name for this key-value pair
        value:
          type:
          - string
          - 'null'
          description: Value for this key-value pair
        '@odata.type':
          type: string
    microsoft.graph.ODataErrors.ErrorDetails:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        target:
          type:
          - string
          - 'null'
    microsoft.graph.teamworkActivityTopic:
      title: teamworkActivityTopic
      required:
      - '@odata.type'
      type: object
      properties:
        source:
          anyOf:
          - $ref: '#/components/schemas/microsoft.graph.teamworkActivityTopicSource'
          - type:
            - object
            - 'null'
          description: 'Type of source. The possible values are: entityUrl, text. For supported Microsoft Graph URLs, use entityUrl. For custom text, use text.'
        value:
          type: string
          description: The topic value. If the value of the source property is entityUrl, this must be a Microsoft Graph URL. If the value is text, this must be a plain text value.
        webUrl:
          type:
          - string
          - 'null'
          description: The link the user clicks when they select the notification. Optional when source is entityUrl; required when source is text.
        '@odata.type':
          type: string
    microsoft.graph.ODataErrors.ODataError:
      required:
      - error
      type: object
      properties:
        error:
          $ref: '#/components/schemas/microsoft.graph.ODataErrors.MainError'
    microsoft.graph.ODataErrors.MainError:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
        message:
          type: string
          x-ms-primary-error-message: true
        target:
          type:
          - string
          - 'null'
        details:
          type: array
          items:
            $ref: '#/components/schemas/microsoft.graph.ODataErrors.ErrorDetails'
        innerError:
          $ref: '#/components/schemas/microsoft.graph.ODataErrors.InnerError'
    microsoft.graph.identity:
      title: identity
      required:
      - '@odata.type'
      type: object
      properties:
        displayName:
          type:
          - string
          - 'null'
          description: The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta.
        id:
          type:
          - string
          - 'null'
          description: Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review.
        '@odata.type':
          type: string
      discriminator:
        propertyName: '@odata.type'
        mapping:
          '#microsoft.graph.azureCommunicationServicesUserIdentity': '#/components/schemas/microsoft.graph.azureCommunicationServicesUserIdentity'
          '#microsoft.graph.communicationsApplicationIdentity': '#/components/schemas/microsoft.graph.communicationsApplicationIdentity'
          '#microsoft.graph.communicationsApplicationInstanceIdentity': '#/components/schemas/microsoft.graph.communicationsApplicationInstanceIdentity'
          '#microsoft.graph.communicationsEncryptedIdentity': '#/components/schemas/microsoft.graph.communicationsEncryptedIdentity'
          '#microsoft.graph.communicationsGuestIdentity': '#/components/schemas/microsoft.graph.communicationsGuestIdentity'
          '#microsoft.graph.communicationsPhoneIdentity': '#/components/schemas/microsoft.graph.communicationsPhoneIdentity'
          '#microsoft.graph.communicationsUserIdentity': '#/components/schemas/microsoft.graph.communicationsUserIdentity'
          '#microsoft.graph.copilotPackageRequestPrincipal': '#/components/schemas/microsoft.graph.copilotPackageRequestPrincipal'
          '#microsoft.graph.emailIdentity': '#/components/schemas/microsoft.graph.emailIdentity'
          '#microsoft.graph.initiator': '#/components/schemas/microsoft.graph.initiator'
          '#microsoft.graph.provisionedIdentity': '#/components/schemas/microsoft.graph.provisionedIdentity'
          '#microsoft.graph.provisioningServicePrincipal': '#/components/schemas/microsoft.graph.provisioningServicePrincipal'
          '#microsoft.graph.provisioningSystem': '#/components/schemas/microsoft.graph.provisioningSystem'
          '#microsoft.graph.servicePrincipalIdentity': '#/components/schemas/microsoft.graph.servicePrincipalIdentity'
          '#microsoft.graph.sharePointGroupIdentity': '#/components/schemas/microsoft.graph.sharePointGroupIdentity'
          '#microsoft.graph.sharePointIdentity': '#/components/schemas/microsoft.graph.sharePointIdentity'
          '#microsoft.graph.teamworkApplicationIdentity': '#/components/schemas/microsoft.graph.teamworkApplicationIdentity'
          '#microsoft.graph.teamworkConversationIdentity': '#/components/schemas/microsoft.graph.teamworkConversationIdentity'
          '#microsoft.graph.teamworkTagIdentity': '#/components/schemas/microsoft.graph.teamworkTagIdentity'
          '#microsoft.graph.teamworkUserIdentity': '#/components/schemas/microsoft.graph.teamworkUserIdentity'
          '#microsoft.graph.userIdentity': '#/components/schemas/microsoft.graph.userIdentity'
          '#microsoft.graph.callRecords.userIdentity': '#/components/schemas/microsoft.graph.callRecords.userIdentity'
  responses:
    error:
      description: error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/microsoft.graph.ODataErrors.ODataError'