openapi: 3.0.3 info: title: Microsoft Graph Word Body Tables API description: REST API for interacting with Word documents in Microsoft 365 and OneDrive via the Microsoft Graph unified endpoint. Provides operations for file management, content access, sharing, permissions, versioning, and document metadata for DriveItem resources. version: 1.0.0 contact: name: Microsoft Graph Support url: https://developer.microsoft.com/graph/support license: name: Microsoft API License url: https://www.microsoft.com/en-us/legal/terms-of-use x-generated-from: documentation x-last-validated: '2026-04-18' servers: - url: https://graph.microsoft.com/v1.0 description: Microsoft Graph v1.0 production endpoint security: - oauth2: [] tags: - name: Tables description: Operations for creating and managing tables paths: /documents/{document-id}/tables: get: operationId: listTables summary: Microsoft Word List Tables description: Get the collection of table objects in the document body. tags: - Tables parameters: - $ref: '#/components/parameters/documentId' responses: '200': description: Successfully retrieved tables. content: application/json: schema: $ref: '#/components/schemas/TableCollection' '404': $ref: '#/components/responses/NotFound' x-microcks-operation: delay: 0 dispatcher: FALLBACK post: operationId: insertTable summary: Microsoft Word Insert Table description: Insert a table with the specified number of rows and columns. tags: - Tables parameters: - $ref: '#/components/parameters/documentId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InsertTableRequest' responses: '201': description: Successfully created the table. content: application/json: schema: $ref: '#/components/schemas/Table' '400': $ref: '#/components/responses/BadRequest' x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: TableCollection: type: object description: Collection of tables. properties: value: type: array items: $ref: '#/components/schemas/Table' Table: type: object description: Represents a table in a Word document. properties: id: type: string description: Unique identifier of the table. example: tbl-500123 rowCount: type: integer description: Number of rows in the table. example: 5 columnCount: type: integer description: Number of columns in the table. example: 3 style: type: string description: Style name applied to the table. example: Grid Table 1 Light alignment: type: string description: Table alignment (Left, Centered, Right). example: Centered headerRowCount: type: integer description: Number of header rows. example: 1 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. InsertTableRequest: type: object description: Request to insert a table. required: - rowCount - columnCount properties: rowCount: type: integer description: Number of rows for the new table. example: 3 columnCount: type: integer description: Number of columns for the new table. example: 4 insertLocation: type: string description: Where to insert the table (Start, End, Before, After). example: End values: type: array description: 2D array of cell values. items: type: array items: type: string example: - - Name - Age - City - Country responses: NotFound: description: Resource not found. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' BadRequest: description: Invalid request parameters. content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' parameters: documentId: name: document-id in: path required: true description: The unique identifier of the Word document. schema: type: string example: doc-a1b2c3d4 securitySchemes: oauth2: type: oauth2 description: OAuth 2.0 authorization code flow with Microsoft Identity Platform. flows: authorizationCode: authorizationUrl: https://login.microsoftonline.com/common/oauth2/v2.0/authorize tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token scopes: Files.Read: Read user files Files.ReadWrite: Read and write user files Files.Read.All: Read all files the user can access Files.ReadWrite.All: Read and write all files the user can access