Create page

Create a new OneNote page in the default section of the default notebook.

To create a page in a different section in the default notebook, you can use the sectionName query parameter. Example: ../onenote/pages?sectionName=My%20section

The POST /onenote/pages operation is used only to create pages in the current user's default notebook. If you're targeting other notebooks, you can create pages in a specified section.


One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Notes.Create, Notes.ReadWrite, Notes.ReadWrite.All
Delegated (personal Microsoft account) Notes.Create, Notes.ReadWrite
Application Notes.ReadWrite.All

HTTP request

POST /me/onenote/pages
POST /users/{id | userPrincipalName}/onenote/pages
POST /groups/{id}/onenote/pages
POST /sites/{id}/onenote/pages

Request headers

Name Type Description
Authorization string Bearer {token}. Required.
Content-Type string text/html or application/xhtml+xml for the HTML content, including for the required "Presentation" part of multipart requests. Multipart requests use the multipart/form-data; boundary=your-boundary content type.

Request body

In the request body, supply the HTML content for the page.

The body can contain HTML placed directly in the request body, or it can contain a multipart message format as shown in the example. If you're sending binary data, then you must send a multipart request.


If successful, this method returns a 201 Created response code and the new page object in the response body.



Here is an example of the request.

In the ../onenote/pages path, you can use the sectionName query parameter to create a page in a specific section in the default notebook. Example: ../onenote/pages?sectionName=My%20section. If the section doesn't exist (or was renamed), the API will create a new section.

Content-length: 312
Content-type: multipart/form-data; boundary=MyPartBoundary198374

Content-Disposition:form-data; name="Presentation"

<!DOCTYPE html>
    <title>A page with <i>rendered</i> images and an <b>attached</b> file</title>
    <meta name="created" content="2015-07-22T09:00:00-08:00" />
    <p>Here's an image from an online source:</p>
    <img src="https://..." alt="an image on the page" width="500" />
    <p>Here's an image uploaded as binary data:</p>
    <img src="name:imageBlock1" alt="an image on the page" width="300" />
    <p>Here's a file attachment:</p>
    <object data-attachment="FileName.pdf" data="name:fileBlock1" type="application/pdf" />

Content-Disposition:form-data; name="imageBlock1"

... binary image data ...

Content-Disposition:form-data; name="fileBlock1"

... binary file data ...


Here is an example of the response. Note: The response object shown here is truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json
Content-length: 312

  "title": "title-value",
  "createdByAppId": "createdByAppId-value",
  "links": {
    "oneNoteClientUrl": {
      "href": "href-value"
    "oneNoteWebUrl": {
      "href": "href-value"
  "contentUrl": "contentUrl-value",
  "content": "content-value",
  "lastModifiedDateTime": "2016-10-19T10:37:00Z"