Microsoft Azure Messages API

The Messages API from Microsoft Azure, for messages.

GitHub OpenAPI

Operations 5

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 /chat/threads/{chatThreadId}/messages Send a message to a chat thread · Microsoft Azure Sends A Message To A Thread #
Ask an LLM
“Can I post a message into a chat thread from my backend?”
“Is it possible to set the sender display name when sending a chat message?”
Tell an agent
Send {content} to chat thread {thread}.
Post {content} to thread {thread} as {senderDisplayName}.
GET /chat/threads/{chatThreadId}/messages List messages in a chat thread · Microsoft Azure Gets A List Of Messages From A Thread #
Ask an LLM
“What messages have been posted in a chat thread?”
“Can I get only chat messages sent after a certain time?”
Tell an agent
List messages in chat thread {thread}.
List messages in thread {thread} since {startTime}, {maxPageSize} per page.
GET /chat/threads/{chatThreadId}/messages/{chatMessageId} Get a chat message by ID · Microsoft Azure Gets A Message By Id #
Ask an LLM
“Can I retrieve a single chat message by its ID?”
“What content and metadata does one message in a thread have?”
Tell an agent
Get message {message} from chat thread {thread}.
Show chat message {message} in thread {thread}.
PATCH /chat/threads/{chatThreadId}/messages/{chatMessageId} Edit a chat message · Microsoft Azure Updates A Message #
Ask an LLM
“Can I edit the text of a chat message after it's sent?”
“Is it possible to update a chat message's metadata or attachments?”
Tell an agent
Change message {message} in chat thread {thread} to read {content}.
Update the metadata of chat message {message} in thread {thread} to {metadata}.
DELETE /chat/threads/{chatThreadId}/messages/{chatMessageId} Delete a chat message · Microsoft Azure Deletes A Message #
Ask an LLM
“Can I delete a message that was posted in a chat thread?”
“Is there a way to remove one chat message from a thread?”
Tell an agent destructive · confirm first
Delete message {message} from chat thread {thread}.
Remove chat message {message} in thread {thread}.

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-azure:microsoft-azure-messages-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-azure-messages-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Azure Azure Communication Chat Service Messages…
  description: Azure Communication Chat Service
  version: 2024-03-15-preview
security:
- Authorization: []
tags:
- name: Messages
paths:
  /chat/threads/{chatThreadId}/messages:
    post:
      tags:
      - Messages
      summary: Microsoft Azure Sends A Message To A Thread
      operationId: microsoftAzureChatthreadSendchatmessage
      parameters:
      - in: path
        name: chatThreadId
        description: The thread id to send the message to.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '201':
          description: Message sent, the `Location` header contains the URL for the newly sent message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendChatMessageResult'
        '401':
          description: Unauthorized.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '403':
          description: Forbidden.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '429':
          description: Too many requests.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '503':
          description: Service unavailable.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
      x-ms-examples:
        Send Message:
          $ref: ./examples/Messages_SendChatMessage.json
      description: Needs a more full description created.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendChatMessageRequest'
        description: Details of the message to send.
        required: true
    get:
      tags:
      - Messages
      summary: Microsoft Azure Gets A List Of Messages From A Thread
      operationId: microsoftAzureChatthreadListchatmessages
      parameters:
      - in: path
        name: chatThreadId
        description: The thread id of the message.
        required: true
        schema:
          type: string
      - in: query
        name: maxPageSize
        description: The maximum number of messages to be returned per page.
        schema:
          type: integer
          format: int32
      - in: query
        name: startTime
        description: 'The earliest point in time to get messages after. The timestamp should be in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.'
        schema:
          type: string
          format: date-time
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatMessagesCollection'
        '401':
          description: Unauthorized.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '403':
          description: Forbidden.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '429':
          description: Too many requests.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '503':
          description: Service unavailable.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
      x-ms-examples:
        Get messages with pagination (max page size):
          $ref: ./examples/Messages_ListChatMessagesWithPageSize.json
      x-ms-pageable:
        nextLinkName: nextLink
        itemName: value
      description: Needs a more full description created.
  /chat/threads/{chatThreadId}/messages/{chatMessageId}:
    get:
      tags:
      - Messages
      summary: Microsoft Azure Gets A Message By Id
      operationId: microsoftAzureChatthreadGetchatmessage
      parameters:
      - in: path
        name: chatThreadId
        description: The thread id to which the message was sent.
        required: true
        schema:
          type: string
      - in: path
        name: chatMessageId
        description: The message id.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '200':
          description: Request successful. The action returns a `Message` resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatMessage'
        '401':
          description: Unauthorized.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '403':
          description: Forbidden.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '429':
          description: Too many requests.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '503':
          description: Service unavailable.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
      x-ms-examples:
        Get Message:
          $ref: ./examples/Messages_GetChatMessage.json
      description: Needs a more full description created.
    patch:
      tags:
      - Messages
      summary: Microsoft Azure Updates A Message
      operationId: microsoftAzureChatthreadUpdatechatmessage
      parameters:
      - in: path
        name: chatThreadId
        description: The thread id to which the message was sent.
        required: true
        schema:
          type: string
      - in: path
        name: chatMessageId
        description: The message id.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '204':
          description: Message is successfully updated.
        '401':
          description: Unauthorized.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '403':
          description: Forbidden.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '429':
          description: Too many requests.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '503':
          description: Service unavailable.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
      x-ms-examples:
        Update message content:
          $ref: ./examples/Messages_UpdateChatMessage.json
      description: Needs a more full description created.
      requestBody:
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/UpdateChatMessageRequest'
        description: Details of the request to update the message.
        required: true
    delete:
      tags:
      - Messages
      summary: Microsoft Azure Deletes A Message
      operationId: microsoftAzureChatthreadDeletechatmessage
      parameters:
      - in: path
        name: chatThreadId
        description: The thread id to which the message was sent.
        required: true
        schema:
          type: string
      - in: path
        name: chatMessageId
        description: The message id.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      responses:
        '204':
          description: Request successful.
        '401':
          description: Unauthorized.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '403':
          description: Forbidden.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '429':
          description: Too many requests.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
        '503':
          description: Service unavailable.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationErrorResponse'
      x-ms-examples:
        Delete message:
          $ref: ./examples/Messages_DeleteChatMessage.json
      description: Needs a more full description created.
components:
  schemas:
    ChatMessageType:
      description: The chat message type.
      enum:
      - text
      - html
      - topicUpdated
      - participantAdded
      - participantRemoved
      type: string
      x-ms-enum:
        name: ChatMessageType
        modelAsString: true
      example: html
    UpdateChatMessageRequest:
      description: Request payload for updating a chat message.
      type: object
      properties:
        content:
          description: Chat message content.
          type: string
          example: Let's go for lunch together.
        metadata:
          description: Message metadata.
          type: object
          additionalProperties:
            type: string
        attachments:
          description: The array of attachments
          type: array
          items:
            $ref: '#/components/schemas/ChatAttachment'
    ChatAttachment:
      description: An attachment in a chat message. Currently only supported in Teams Interop scenarios.
      required:
      - id
      - attachmentType
      type: object
      properties:
        id:
          description: Id of the attachment
          type: string
          example: f508ce15-e878-431f-b871-f530cac5331d
        attachmentType:
          $ref: '#/components/schemas/ChatAttachmentType'
        name:
          description: The name of the attachment content.
          type: string
          example: SomeImage.png
        url:
          description: The URL where the attachment can be downloaded
          type: string
          format: uri
          example: https://{geoChatGW}/threads/{chatThreadId}/images/{imageId}/views/original
        previewUrl:
          description: The URL where the preview of attachment can be downloaded
          type: string
          format: uri
          example: https://{geoChatGW}/threads/{chatThreadId}/images/{imageId}/views/small
    ChatAttachmentType:
      description: The type of attachment.
      enum:
      - image
      - file
      type: string
      x-ms-enum:
        name: ChatAttachmentType
        modelAsString: true
    CommunicationIdentifierModel:
      $ref: ../../../Common/stable/2023-11-15/common.json#/definitions/CommunicationIdentifierModel
    ChatMessage:
      description: Chat message.
      required:
      - createdOn
      - id
      - sequenceId
      - type
      - version
      type: object
      properties:
        id:
          description: The id of the chat message. This id is server generated.
          type: string
          example: '123456789'
        type:
          $ref: '#/components/schemas/ChatMessageType'
        sequenceId:
          description: Sequence of the chat message in the conversation.
          type: string
        version:
          description: Version of the chat message.
          type: string
        content:
          $ref: '#/components/schemas/ChatMessageContent'
        senderDisplayName:
          description: The display name of the chat message sender. This property is used to populate sender name for push notifications.
          type: string
          example: Jane
        createdOn:
          format: date-time
          description: 'The timestamp when the chat message arrived at the server. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.'
          type: string
          example: '2020-10-30T10:50:50Z'
        senderCommunicationIdentifier:
          $ref: '#/components/schemas/CommunicationIdentifierModel'
        deletedOn:
          format: date-time
          description: 'The timestamp (if applicable) when the message was deleted. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.'
          type: string
          example: '2020-10-30T10:50:50Z'
        editedOn:
          format: date-time
          description: 'The last timestamp (if applicable) when the message was edited. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.'
          type: string
          example: '2020-10-30T10:50:50Z'
        metadata:
          description: Message metadata.
          type: object
          additionalProperties:
            type: string
    ChatParticipant:
      description: A participant of the chat thread.
      required:
      - communicationIdentifier
      type: object
      properties:
        communicationIdentifier:
          $ref: '#/components/schemas/CommunicationIdentifierModel'
        displayName:
          description: Display name for the chat participant.
          type: string
          example: Bob
        shareHistoryTime:
          format: date-time
          description: 'Time from which the chat history is shared with the participant. The timestamp is in RFC3339 format: `yyyy-MM-ddTHH:mm:ssZ`.'
          type: string
          example: '2020-10-30T10:50:50Z'
        metadata:
          description: Contextual metadata for the chat participant. The metadata consists of name/value pairs. The total size of all metadata pairs can be up to 1KB in size.
          type: object
          additionalProperties:
            type: string
    SendChatMessageResult:
      description: Result of the send message operation.
      required:
      - id
      type: object
      properties:
        id:
          description: A server-generated message id.
          type: string
          example: '123456789'
    ChatMessagesCollection:
      description: Collection of chat messages for a particular chat thread.
      required:
      - value
      type: object
      properties:
        value:
          description: Collection of chat messages.
          type: array
          items:
            $ref: '#/components/schemas/ChatMessage'
        nextLink:
          description: If there are more chat messages that can be retrieved, the next link will be populated.
          type: string
          readOnly: true
    CommunicationErrorResponse:
      $ref: ../../../Common/stable/2023-11-15/common.json#/definitions/CommunicationErrorResponse
    ChatMessageContent:
      description: Content of a chat message.
      type: object
      properties:
        message:
          description: Chat message content for messages of types text or html.
          type: string
          example: <p>Come one guys, lets go for lunch together.</p><img id="f508ce15-e878-431f-b871-f530cac5331d">
        topic:
          description: Chat message content for messages of type topicUpdated.
          type: string
          example: Lunch Chat thread
        participants:
          description: Chat message content for messages of types participantAdded or participantRemoved.
          type: array
          items:
            $ref: '#/components/schemas/ChatParticipant'
        attachments:
          description: List of attachments for this message
          type: array
          items:
            $ref: '#/components/schemas/ChatAttachment'
        initiatorCommunicationIdentifier:
          $ref: '#/components/schemas/CommunicationIdentifierModel'
    SendChatMessageRequest:
      description: Details of the message to send.
      required:
      - content
      type: object
      properties:
        content:
          description: Chat message content.
          type: string
          example: <p>Come one guys, lets go for lunch together.</p>
        senderDisplayName:
          description: The display name of the chat message sender. This property is used to populate sender name for push notifications.
          type: string
          example: Bob Admin
        type:
          $ref: '#/components/schemas/ChatMessageType'
        metadata:
          description: Message metadata.
          type: object
          additionalProperties:
            type: string
        attachments:
          description: The array of attachments
          type: array
          items:
            $ref: '#/components/schemas/ChatAttachment'
  parameters:
    ApiVersionParameter:
      in: query
      name: api-version
      description: Version of API to invoke.
      required: true
      x-ms-parameter-location: method
      schema:
        type: string
  securitySchemes:
    Authorization:
      type: apiKey
      name: Authorization
      in: header
      description: An ACS (Azure Communication Services) user access token.
x-ms-parameterized-host:
  hostTemplate: '{endpoint}'
  useSchemePrefix: false
  parameters:
  - $ref: '#/components/parameters/Endpoint'