Microsoft Visio API Pages API

Operations for listing and managing pages within a Visio document

Operations 4

GET /document/pages List Pages #
GET /document/pages/{pageName} Get Page #
GET /document/getActivePage Get Active Page #
PATCH /document/pages/{pageName}/view Update Page View #

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/visio-pages-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

visio-pages-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Visio JavaScript Pages API
  description: The Visio JavaScript API enables building Office Add-ins that interact with Visio diagrams embedded in classic SharePoint Online pages.
  version: '1.1'
  contact:
    name: Microsoft Office Dev
    url: https://developer.microsoft.com/office
    email: officedevfeedback@microsoft.com
  license:
    name: Microsoft APIs Terms of Use
    url: https://learn.microsoft.com/en-us/legal/microsoft-apis/terms-of-use
  termsOfService: https://www.microsoft.com/en-us/legal/terms-of-use
servers:
- url: https://appsforoffice.microsoft.com/embedded/1.0
  description: Visio Office Add-ins embedded endpoint
security:
- EmbeddedSession: []
tags:
- name: Pages
  description: Operations for listing and managing pages within a Visio document
paths:
  /document/pages:
    get:
      operationId: listPages
      summary: List Pages
      description: Returns all pages in the current Visio document. Each page includes its name, index, background status, and view settings.
      tags:
      - Pages
      responses:
        '200':
          description: Collection of pages
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageCollection'
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
  /document/pages/{pageName}:
    get:
      operationId: getPage
      summary: Get Page
      description: Returns a specific page from the Visio document by its name. Includes page properties, view configuration, and associated shapes.
      tags:
      - Pages
      parameters:
      - name: pageName
        in: path
        required: true
        description: Name of the Visio page to retrieve
        schema:
          type: string
      responses:
        '200':
          description: Page object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page'
        '404':
          description: Page not found
        '500':
          description: Internal server error
  /document/getActivePage:
    get:
      operationId: getActivePage
      summary: Get Active Page
      description: Returns the currently active page in the Visio document embedded in the SharePoint page. Includes all shapes and view configuration for the page.
      tags:
      - Pages
      responses:
        '200':
          description: Active page object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page'
        '500':
          description: Internal server error
  /document/pages/{pageName}/view:
    patch:
      operationId: updatePageView
      summary: Update Page View
      description: Updates the view settings for a specific Visio page, including zoom level and scroll position.
      tags:
      - Pages
      parameters:
      - name: pageName
        in: path
        required: true
        description: Name of the Visio page
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PageViewUpdate'
      responses:
        '200':
          description: Updated page view
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageView'
        '404':
          description: Page not found
        '500':
          description: Internal server error
components:
  schemas:
    Shape:
      type: object
      description: Represents a shape element on a Visio page
      properties:
        id:
          type: integer
          description: Numeric shape identifier
        name:
          type: string
          description: Name of the shape
        text:
          type: string
          description: Text content displayed inside the shape
        select:
          type: boolean
          description: Whether this shape is currently selected by the user
        view:
          $ref: '#/components/schemas/ShapeView'
        shapeDataItems:
          $ref: '#/components/schemas/ShapeDataItemCollection'
        hyperlinks:
          $ref: '#/components/schemas/HyperlinkCollection'
        comments:
          $ref: '#/components/schemas/CommentCollection'
        boundingBox:
          $ref: '#/components/schemas/BoundingBox'
    HyperlinkCollection:
      type: object
      description: Collection of hyperlinks on a shape
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Hyperlink'
    Page:
      type: object
      description: Represents a page in the Visio document
      properties:
        id:
          type: integer
          description: Numeric page identifier
        name:
          type: string
          description: Name of the page
        index:
          type: integer
          description: Zero-based index of the page in the document
        isBackground:
          type: boolean
          description: Whether this page is a background page
        view:
          $ref: '#/components/schemas/PageView'
        shapes:
          $ref: '#/components/schemas/ShapeCollection'
    Hyperlink:
      type: object
      description: A hyperlink attached to a Visio shape
      properties:
        address:
          type: string
          description: URL or file path the hyperlink points to
        description:
          type: string
          description: Display description for the hyperlink
        subAddress:
          type: string
          description: Sub-address within the target (e.g. page name)
        extraInfo:
          type: string
          description: Additional information passed with the URL
    CommentCollection:
      type: object
      description: Collection of comments on a shape
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Comment'
    PageView:
      type: object
      description: View settings for a Visio page
      properties:
        zoom:
          type: integer
          description: Zoom level as a percentage (e.g. 100 for 100%)
    ShapeCollection:
      type: object
      description: A collection of shapes on a Visio page
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Shape'
    Comment:
      type: object
      description: A comment associated with a Visio shape
      properties:
        author:
          type: string
          description: Name of the comment author
        date:
          type: string
          format: date-time
          description: Timestamp when the comment was created
        text:
          type: string
          description: Content of the comment
    PageCollection:
      type: object
      description: A collection of Visio pages
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Page'
    Highlight:
      type: object
      description: Highlight decoration applied to a shape
      properties:
        color:
          type: string
          description: CSS color string for the highlight (e.g.
        width:
          type: integer
          description: Width of the highlight border in points
    ShapeDataItem:
      type: object
      description: A structured data item (label-value pair) associated with a shape
      properties:
        label:
          type: string
          description: Label or key for the data item
        value:
          type: string
          description: Value associated with the label
        format:
          type: string
          description: Optional display format for the value
        formattedValue:
          type: string
          description: Value after applying the format string
    BoundingBox:
      type: object
      description: Bounding box coordinates of a shape
      properties:
        x:
          type: number
          description: X coordinate of the top-left corner
        y:
          type: number
          description: Y coordinate of the top-left corner
        width:
          type: number
          description: Width of the bounding box
        height:
          type: number
          description: Height of the bounding box
    ShapeView:
      type: object
      description: Visual presentation settings for a shape
      properties:
        highlight:
          $ref: '#/components/schemas/Highlight'
        tooltip:
          type: string
          description: Tooltip text shown on hover
    ShapeDataItemCollection:
      type: object
      description: Collection of data items associated with a shape
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ShapeDataItem'
    PageViewUpdate:
      type: object
      description: Partial update to page view settings
      properties:
        zoom:
          type: integer
          description: Zoom level as a percentage
  securitySchemes:
    EmbeddedSession:
      type: apiKey
      in: header
      name: X-Embedded-Session
      description: Visio EmbeddedSession token obtained via OfficeExtension.EmbeddedSession initialization
externalDocs:
  description: Visio JavaScript API Documentation
  url: https://learn.microsoft.com/en-us/office/dev/add-ins/visio/visio-overview