Microsoft Power Virtual Agents Conversations API

The Conversations API from Microsoft Power Virtual Agents — 3 operation(s) for conversations.

OpenAPI Specification

microsoft-power-virtual-agents-conversations-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Microsoft Copilot Studio Direct Line Conversations API
  description: 'Direct Line API 3.0 endpoints used to connect a custom application to a Microsoft Copilot Studio (formerly Power Virtual Agents) agent. The flow: (1) GET the token endpoint exposed by the agent (Mobile app channel) to obtain a Direct Line token, (2) start a conversation against https://directline.botframework.com, (3) post Activity objects to the bot and (4) poll for activities returned by the bot.'
  version: '3.0'
servers:
- url: https://directline.botframework.com
  description: Direct Line 3.0 service used by Copilot Studio agents
security:
- bearer: []
tags:
- name: Conversations
paths:
  /v3/directline/conversations:
    post:
      tags:
      - Conversations
      summary: Start a new conversation with the bot
      operationId: startConversation
      responses:
        '201':
          description: Conversation created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversation'
  /v3/directline/conversations/{conversationId}:
    get:
      tags:
      - Conversations
      summary: Reconnect to an existing conversation
      operationId: getConversation
      parameters:
      - name: conversationId
        in: path
        required: true
        schema:
          type: string
      - name: watermark
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Conversation details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversation'
  /v3/directline/conversations/{conversationId}/activities:
    get:
      tags:
      - Conversations
      summary: Retrieve activities from the bot
      description: Returns the ActivitySet of messages from both the user and the bot. Use the `watermark` query parameter to page through new activities.
      operationId: getActivities
      parameters:
      - name: conversationId
        in: path
        required: true
        schema:
          type: string
      - name: watermark
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: ActivitySet
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivitySet'
    post:
      tags:
      - Conversations
      summary: Send an activity to the bot
      operationId: postActivity
      parameters:
      - name: conversationId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Activity'
      responses:
        '200':
          description: Resource response with activity id
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
components:
  schemas:
    Conversation:
      type: object
      properties:
        conversationId:
          type: string
        token:
          type: string
        expires_in:
          type: integer
        streamUrl:
          type: string
          format: uri
        referenceGrammarId:
          type: string
    Activity:
      type: object
      properties:
        type:
          type: string
          example: message
        from:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
        text:
          type: string
        textFormat:
          type: string
          example: plain
        locale:
          type: string
    ActivitySet:
      type: object
      properties:
        activities:
          type: array
          items:
            $ref: '#/components/schemas/Activity'
        watermark:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Direct Line authentication uses either a long-lived secret or a short-lived token. Supply the value in the Authorization header as `Bearer {secret-or-token}`.
x-generated-from: https://learn.microsoft.com/en-us/microsoft-copilot-studio/publication-connect-bot-to-custom-application
x-generated-by: claude-genwave10-08-2026-05-23