Skip to content

Conversation

@typeoneerror
Copy link
Owner

@typeoneerror typeoneerror commented Oct 13, 2025

You can now create a page and apply a template at the same time using the Notion API.

Listing templates

Listing the available templates via the Data Source endpoint:

GET /v1/data_sources/:data_source_id/templates

Example:

[
  {
    "id": "e8007a4a-9a02-45c5-bb87-544ff7a6e8b3",
    "name": "Untitled",
    "is_default": true
  },
  {
    "id": "1861c1cc-e3f3-80bf-8823-f701d4e7a2c1",
    "name": "Album",
    "is_default": false
  },
  {
    "id": "28b1c1cc-e3f3-80a3-9327-c9d8a176a4e8",
    "name": "with linked view",
    "is_default": false
  }
]

Creating pages from templates

Create a page using a template:

POST /v1/pages

Pass the template option alongside properties:

template[type]=none (default behavior) doesn't use a template

template: {
  type: 'none'
}
  • template[type]=default uses the default template
template: { 
  type: 'default'
}

template[type]=template_id uses the provided template ID

template: {
  type: 'template_id',
  template_id: '28b1c1cc-e3f3-80a3-9327-c9d8a176a4e8'
}

How it works

Like the template duplication in the app, the page will be created in an "empty" state (apart from any properties you have supplied to the create request). Your template is applied in the background asynchronously.

You'll need to use webhooks or polling to determine when the page has content at this time.

Important note: this works out of the box with self-referencing views!

@typeoneerror typeoneerror merged commit 931e915 into main Oct 13, 2025
@typeoneerror typeoneerror deleted the create-with-template branch October 13, 2025 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants