Supported REST operations
Applies to: Consumer notebooks on OneDrive | Enterprise notebooks on Office 365
This article lists the REST operations that you can use with the OneNote API.
Important
The API Console Service is no longer available. For more information, see We're Sunsetting Classic API Consoles.
Page operations
/pages
Get all pages.
/sections/{id}/pages
Get all pages in a specific section.
/sections/{id}/pages?pagelevel
Get the indentation level and order of pages in a section. GET /pages/{id}?pagelevel
is also supported.
/pages/{id}
Get a specific page.
/pages/{id}/preview
Get text and image preview content for a specific page.
/pages/{id}/content
Get the HTML content of a specific page.
/pages
Create a page in the default section. (Personal notebooks on OneDrive or OneDrive for Business only)
/pages?sectionName
Create a page in a named section in the default notebook. (Personal notebooks on OneDrive or OneDrive for Business only)
/sections/{id}/pages
Create a page in a specific section.
/pages/{id}/copyToSection
Copy a page to a section. (Office 365 only)
/pages/{id}/content
Update the HTML content of a page.
/pages/{id}
Delete a specific page.
Warning
Using the OneNote API to delete pages is permanent. Deleted pages cannot be recovered.
Learn more about GET requests (including supported query string options) and how to create pages, update page content, and copy pages.
Section operations
/sections
Get all sections.
/notebooks/{id}/sections
Get all sections in a specific notebook.
/sectionGroups/{id}/sections
Get all sections in a specific section group.
/sections/{id}
Get a specific section.
/notebooks/{id}/sections
Create a section in a specific notebook.
/sectionGroups/{id}/sections
Create a section in a specific section group.
/sections/{id}
Change the name of a section. Send the new name using the application/json content type in the message body, like this: { "name": "New section name" }
/sections/{id}/copyToNotebook
Copy a section to a notebook. (Office 365 only)
/sections/{id}/copyToSectionGroup
Copy a section to a section group. (Office 365 only)
/sections/{id}/permissions
Get permissions for the section. (Office 365 only)
/sections/{id}/permissions/{id}
Get a specific permission for the section. (Office 365 only)
/sections/{id}/permissions
Create or update a permission for the section. (Office 365 only)
/sections/{id}/permissions/{id}
Delete a permission for the section. (Office 365 only)
Learn more about GET requests (including supported query string options) and how to copy sections.
Section group operations
/sectionGroups
Get all section groups.
/notebooks/{id}/sectionGroups
Get all section groups in a specific notebook.
/sectionGroups/{id}/sectionGroups
Get all section groups in a specific section group.
/sectionGroups/{id}
Get a specific section group.
/notebooks/{id}/sectionGroups
Create a section group in a specific notebook.
/sectionGroups/{id}/sectionGroups
Create a section group in a specific section group.
/sectiongroups/{id}/permissions
Get permissions for the section group. (Office 365 only)
/permissions/{id}
Get a specific permission for the section group. (Office 365 only)
/permissions
Create or update a permission for the section group. (Office 365 only)
/permissions/{id}
Delete a permission for the section group. (Office 365 only)
Learn more about GET requests (including supported query string options).
Notebook operations
/notebooks
Get all notebooks.
/notebooks/{id}
Get a specific notebook.
/notebooks
Create a notebook.
/notebooks/{id}/copyNotebook
Copy a notebook. (Office 365 only)
/notebooks/{id}/permissions
Get permissions for the notebook. (Office 365 only)
/permissions/{id}
Get a specific permission for the notebook. (Office 365 only)
/permissions
Create or update a permission for the notebook. (Office 365 only)
/permissions/{id}
Delete a permission for the notebook. (Office 365 only)
Learn more about GET requests (including supported query string options) and how to copy notebooks.
Note
Use the classNotebooks
endpoint to work with class notebooks and the staffNotebooks
endpoint to work with staff notebooks.
Resource operations
/resources/{id}/content
Get the binary content of an image or file resource.
Learn more about GET requests and how to add images and files to a page.
See also
- Get OneNote content and structure
- Create OneNote pages
- Update OneNote page content
- Add images and files to OneNote pages
- Copy notebooks, sections, and pages
- Input and output HTML for OneNote pages
- OneNote development
- OneNote Dev Center
- OneNote Developer Blog
- OneNote development questions on Stack Overflow
- OneNote GitHub repos