Microsoft Graph OneNote API

The Microsoft Graph OneNote API provides programmatic access to OneNote notebooks, sections, section groups, and pages stored in OneDrive or SharePoint. Developers can create, read, update, and delete notebook content, extract text from images using OCR, perform full-text search, and sync changes across devices.

OpenAPI Specification

microsoft-onenote-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Microsoft OneNote API (Microsoft Graph)
  description: >-
    Minimal OpenAPI definition for the OneNote REST API exposed via Microsoft
    Graph for managing notebooks, sections, sectionGroups, and pages.
  version: v1.0
  x-generated-from: https://learn.microsoft.com/en-us/graph/integrate-with-onenote
  x-generated-by: claude-crawl-2026-05-08
servers:
  - url: https://graph.microsoft.com/v1.0
    description: Microsoft Graph v1.0
security:
  - bearerAuth: []
tags:
  - name: Notebooks
  - name: Sections
  - name: SectionGroups
  - name: Pages
paths:
  /me/onenote/notebooks:
    get:
      tags: [Notebooks]
      summary: List notebooks
      operationId: listNotebooks
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericList'
    post:
      tags: [Notebooks]
      summary: Create notebook
      operationId: createNotebook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenericObject'
      responses:
        '201':
          description: Created
  /me/onenote/notebooks/{notebookId}:
    parameters:
      - $ref: '#/components/parameters/NotebookId'
    get:
      tags: [Notebooks]
      summary: Get notebook
      operationId: getNotebook
      responses:
        '200':
          description: OK
  /me/onenote/notebooks/{notebookId}/sections:
    parameters:
      - $ref: '#/components/parameters/NotebookId'
    get:
      tags: [Sections]
      summary: List sections in notebook
      operationId: listNotebookSections
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericList'
    post:
      tags: [Sections]
      summary: Create section in notebook
      operationId: createNotebookSection
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenericObject'
      responses:
        '201':
          description: Created
  /me/onenote/notebooks/{notebookId}/sectionGroups:
    parameters:
      - $ref: '#/components/parameters/NotebookId'
    get:
      tags: [SectionGroups]
      summary: List section groups in notebook
      operationId: listNotebookSectionGroups
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericList'
    post:
      tags: [SectionGroups]
      summary: Create section group in notebook
      operationId: createNotebookSectionGroup
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenericObject'
      responses:
        '201':
          description: Created
  /me/onenote/sections:
    get:
      tags: [Sections]
      summary: List sections
      operationId: listSections
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericList'
  /me/onenote/sections/{sectionId}:
    parameters:
      - $ref: '#/components/parameters/SectionId'
    get:
      tags: [Sections]
      summary: Get section
      operationId: getSection
      responses:
        '200':
          description: OK
  /me/onenote/sections/{sectionId}/pages:
    parameters:
      - $ref: '#/components/parameters/SectionId'
    get:
      tags: [Pages]
      summary: List pages in section
      operationId: listSectionPages
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericList'
    post:
      tags: [Pages]
      summary: Create page in section
      operationId: createSectionPage
      requestBody:
        required: true
        content:
          text/html:
            schema:
              type: string
          application/xhtml+xml:
            schema:
              type: string
          multipart/form-data:
            schema:
              type: object
              additionalProperties: true
      responses:
        '201':
          description: Created
  /me/onenote/pages:
    get:
      tags: [Pages]
      summary: List pages
      operationId: listPages
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericList'
  /me/onenote/pages/{pageId}:
    parameters:
      - $ref: '#/components/parameters/PageId'
    get:
      tags: [Pages]
      summary: Get page metadata
      operationId: getPage
      responses:
        '200':
          description: OK
    delete:
      tags: [Pages]
      summary: Delete page
      operationId: deletePage
      responses:
        '204':
          description: No Content
  /me/onenote/pages/{pageId}/content:
    parameters:
      - $ref: '#/components/parameters/PageId'
    get:
      tags: [Pages]
      summary: Get page HTML content
      operationId: getPageContent
      responses:
        '200':
          description: OK
          content:
            text/html:
              schema:
                type: string
    patch:
      tags: [Pages]
      summary: Update page content
      operationId: updatePageContent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/GenericObject'
      responses:
        '204':
          description: No Content
  /me/onenote/sectionGroups:
    get:
      tags: [SectionGroups]
      summary: List section groups
      operationId: listSectionGroups
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericList'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  parameters:
    NotebookId:
      in: path
      name: notebookId
      required: true
      schema: { type: string }
    SectionId:
      in: path
      name: sectionId
      required: true
      schema: { type: string }
    PageId:
      in: path
      name: pageId
      required: true
      schema: { type: string }
  schemas:
    GenericObject:
      type: object
      additionalProperties: true
    GenericList:
      type: object
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/GenericObject'
      additionalProperties: true