Microsoft Word Documents API

Operations for creating, opening, and managing Word documents

Operations 5

POST /documents Microsoft Word Create Document #
GET /documents/{document-id} Microsoft Word Get Document #
DELETE /documents/{document-id} Microsoft Word Delete Word Document #
POST /documents/{document-id}/save Microsoft Word Save Document #
POST /documents/{document-id}/convert Microsoft Word Convert Document #

Documentation

Specifications

SDKs

Code Examples

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-schema/graph-api-drive-item-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-schema/graph-api-permission-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-structure/graph-api-drive-item-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-structure/graph-api-permission-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-schema/javascript-api-paragraph-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-schema/javascript-api-content-control-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-schema/javascript-api-table-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-schema/javascript-api-comment-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-structure/javascript-api-paragraph-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-structure/javascript-api-content-control-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-structure/javascript-api-table-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-structure/javascript-api-comment-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-schema/open-xml-sdk-document-properties-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-structure/open-xml-sdk-document-properties-structure.json

Other Resources

🔗
SDKs
https://www.nuget.org/packages/Microsoft.Graph
🔗
SDKs
https://pypi.org/project/msgraph-sdk/
🔗
SDKs
https://www.npmjs.com/package/@microsoft/microsoft-graph-client
🔗
SDKs
https://github.com/microsoftgraph/msgraph-sdk-java
🔗
SDKs
https://github.com/microsoftgraph/msgraph-sdk-go
🔗
SDKs
https://github.com/microsoftgraph/msgraph-sdk-php
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-ld/microsoft-word-graph-api-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/examples/graph-api-drive-item-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/examples/graph-api-permission-example.json
🔗
Tutorials
https://learn.microsoft.com/en-us/office/dev/add-ins/tutorials/word-tutorial
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-ld/microsoft-word-javascript-api-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/examples/javascript-api-paragraph-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/examples/javascript-api-content-control-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/examples/javascript-api-table-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/examples/javascript-api-comment-example.json
🔗
SDKs
https://www.nuget.org/packages/DocumentFormat.OpenXml
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/json-ld/microsoft-word-open-xml-sdk-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/microsoft-word/refs/heads/main/examples/open-xml-sdk-document-properties-example.json

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-word-documents-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

microsoft-word-documents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Word Documents API
  x-refined-note:
  - x-api-type differs across the merged source definitions and was not carried
  x-generated-from: documentation
  x-last-validated: '2026-04-18'
  version: '1.0'
  description: 'Operations tagged Documents across 2 of this provider''s published API definitions: microsoft-word-javascript-api.yaml, microsoft-word-open-xml-sdk.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://word.officeapps.live.com/api/v1
  description: Word JavaScript API conceptual endpoint
- url: https://localhost:5000/api/v1
  description: Local Open XML processing service
tags:
- name: Documents
  description: Operations for creating, opening, and managing Word documents
paths:
  /documents:
    post:
      operationId: createDocument
      summary: Microsoft Word Create Document
      description: Create a new blank Word document.
      tags:
      - Documents
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDocumentRequest'
      responses:
        '201':
          description: Successfully created a new document.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '401':
          $ref: '#/components/responses/Unauthorized'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - oauth2: []
    servers:
    - url: https://word.officeapps.live.com/api/v1
      description: Word JavaScript API conceptual endpoint
  /documents/{document-id}:
    get:
      operationId: getDocument
      summary: Microsoft Word Get Document
      description: Get the properties and metadata of a Word document.
      tags:
      - Documents
      parameters:
      - $ref: '#/components/parameters/documentId'
      responses:
        '200':
          description: Successfully retrieved document.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - oauth2: []
    delete:
      operationId: deleteWordDocument
      summary: Microsoft Word Delete Word Document
      description: Delete a Word document from the processing store.
      tags:
      - Documents
      parameters:
      - $ref: '#/components/parameters/documentId_2'
      responses:
        '204':
          description: Successfully deleted document.
        '404':
          $ref: '#/components/responses/NotFound'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - oauth2: []
    servers:
    - url: https://word.officeapps.live.com/api/v1
      description: Word JavaScript API conceptual endpoint
  /documents/{document-id}/save:
    post:
      operationId: saveDocument
      summary: Microsoft Word Save Document
      description: Save the document. This persists the file using the Word file format.
      tags:
      - Documents
      parameters:
      - $ref: '#/components/parameters/documentId'
      responses:
        '204':
          description: Successfully saved the document.
        '401':
          $ref: '#/components/responses/Unauthorized'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
      security:
      - oauth2: []
    servers:
    - url: https://word.officeapps.live.com/api/v1
      description: Word JavaScript API conceptual endpoint
  /documents/{document-id}/convert:
    post:
      operationId: convertDocument
      summary: Microsoft Word Convert Document
      description: Convert the document to a different format (PDF, HTML, plain text).
      tags:
      - Documents
      parameters:
      - $ref: '#/components/parameters/documentId_2'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConvertRequest'
      responses:
        '200':
          description: Successfully converted the document.
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          $ref: '#/components/responses/BadRequest'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    servers:
    - url: https://localhost:5000/api/v1
      description: Local Open XML processing service
components:
  schemas:
    Document:
      type: object
      description: Represents a Word document.
      properties:
        id:
          type: string
          description: Unique identifier for the document.
          example: doc-a1b2c3d4
        saved:
          type: boolean
          description: Whether the document has been saved.
          example: true
        changeTrackingMode:
          type: string
          description: Change tracking mode (Off, TrackAll, TrackMineOnly).
          example: 'Off'
    ErrorResponse:
      type: object
      description: Error response from the API.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code.
              example: InvalidArgument
            message:
              type: string
              description: Human-readable error message.
              example: The argument is invalid or missing.
    CreateDocumentRequest:
      type: object
      description: Request to create a new document.
      properties:
        base64File:
          type: string
          description: Base64-encoded document content for the new document.
    WordDocument:
      type: object
      description: Represents a Word document processed by the Open XML SDK.
      properties:
        id:
          type: string
          description: Unique identifier of the document.
          example: doc-openxml-a1b2c3
        filename:
          type: string
          description: Original filename of the document.
          example: quarterly-report.docx
        paragraphCount:
          type: integer
          description: Number of paragraphs in the document.
          example: 42
        tableCount:
          type: integer
          description: Number of tables in the document.
          example: 3
        imageCount:
          type: integer
          description: Number of images in the document.
          example: 5
        sectionCount:
          type: integer
          description: Number of sections in the document.
          example: 2
        createdDate:
          type: string
          format: date-time
          description: When the document was created.
          example: '2025-01-15T10:00:00Z'
        modifiedDate:
          type: string
          format: date-time
          description: When the document was last modified.
          example: '2025-03-15T14:30:00Z'
    ErrorResponse_2:
      type: object
      description: Error response from the API.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code.
              example: DocumentNotFound
            message:
              type: string
              description: Human-readable error message.
              example: The specified document could not be found.
    CreateDocumentRequest_2:
      type: object
      description: Request to create a new document.
      properties:
        filename:
          type: string
          description: Desired filename for the new document.
          example: new-document.docx
        title:
          type: string
          description: Document title property.
          example: My New Document
        author:
          type: string
          description: Document author property.
          example: Jane Smith
        initialContent:
          type: string
          description: Initial text content for the document body.
          example: This is the initial content.
    ConvertRequest:
      type: object
      description: Request to convert a document to another format.
      required:
      - targetFormat
      properties:
        targetFormat:
          type: string
          description: Target format (pdf, html, txt, rtf).
          example: pdf
  responses:
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Authentication required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    BadRequest:
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse_2'
  parameters:
    documentId:
      name: document-id
      in: path
      required: true
      description: The unique identifier of the Word document.
      schema:
        type: string
      example: doc-a1b2c3d4
    documentId_2:
      name: document-id
      in: path
      required: true
      description: The unique identifier of the document.
      schema:
        type: string
      example: doc-openxml-a1b2c3
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth 2.0 via Microsoft Identity Platform for Office Add-ins.
      flows:
        authorizationCode:
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
          tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token
          scopes:
            Files.ReadWrite: Read and write files
x-refined-from:
- microsoft-word-javascript-api.yaml
- microsoft-word-open-xml-sdk.yaml