Develop with the OneNote API

You can find how-to articles and coding tips and tricks for using the Microsoft OneNote API here.

Applies to: OneNote service

In this article
Preliminaries
Essential steps
Doing useful things
Stay connected with the team

Note

Please use our new documentation site for consumer and enterprise OneNote APIs.

If you want to do something that you don't see listed here, feel free to share your ideas in the communities. If you just want a step-by-step run through a "Hello World" application, check out the tutorials in the Getting started with the OneNote API section.

Tip

Many of the How To topics give information about the different platforms together. We did that so if you're writing a multi-platform app, you can easily compare the code side-by-side. If you're not using one of the platforms we have code examples for, let us know, and in the meantime check out the interactive REST documentation.

Preliminaries

These How To's give more details about things you might need before you start using the API:

Essential steps

These How-To's are things that most app will do:

Doing useful things

These How-To's describe how to use the API in your app to work with OneNote:

  • Get OneNote content and structure
    Shows how to get the content and structure of OneNote pages, sections, section groups, and notebooks using OData query string options.

  • Make simple captures
    Shows how to create simple OneNote pages by sending HTML in the body of the request.

  • Capture pages in a specific section
    Shows how to specify a named OneNote notebook section where the captured pages get put.

  • Create structure using HTML
    Shows how to create OneNote pages using more-complex multi-part POST requests and HTML.

  • Capture photos and images
    Shows how to include image data directly in the POST request for app that need to send the image data directly from the device.

  • Capture webpage snapshots
    Shows how to have the API render publicly visible webpages as snapshot images and save the images on the OneNote page.

  • Capture embedded files
    Shows how to have OneNote store binary file data as an embedded file on the page.

  • Capture and embed PDF files
    Shows how to include PDF files so they appear as both embedded files, and display the PDF document pages as images.

  • Create absolutely positioned elements
    Shows how to create divs, images, and file attachments that can be positioned independently of each other on the page.

  • Enrich captured content
    Shows how to use the API to render enriched content for a business card, online recipe, or online product listing.

  • Use note tags
    Shows how to use the data-tag attribute to add and update check boxes, stars, and other note tags on a OneNote page.

  • Update page content
    Shows how to build PATCH requests and defines supported page elements and actions.

  • Input and output HTML for OneNote pages
    Shows input HTML elements, attributes, and properties that you can use to create a OneNote page and the output HTML that's returned when you retrieve page content.

  • OneNote API error and warning codes
    Shows example error and warning JSON responses and describes error and warning codes.

Stay connected with the team

We want to hear from you, and we want you to know what's going on and get the help you need. You can catch up by visiting these sites:

See also

Concepts

Getting started with the OneNote API

Other resources

OneNote API interactive reference