Skip to content

Instantly share code, notes, and snippets.

@stcalica
Last active January 30, 2024 23:33
Show Gist options
  • Save stcalica/af9cd78e76ec5292e313af8df1730db7 to your computer and use it in GitHub Desktop.
Save stcalica/af9cd78e76ec5292e313af8df1730db7 to your computer and use it in GitHub Desktop.
Notion_Postman_Overview

Notion APIs on Postman

Developers can use Notion’s public REST API to interact with Notion workspaces programmatically. Interactions include working with:

All workspace interactions, such as the above, need to be attributed to a Notion user. To accommodate this requirement for interactions made programmatically, Notion allows for API requests to be attributed to a "bot". To define the capabilities of a bot, developers build integrations, which handle authenticating API requests for the bot, defining when requests should be made, and the read/write capabilities of the integration.

In other words, using Notion’s public API means building an integration — the blueprint for how a bot can interact with your workspace — and attributing the REST API requests that are made to the bot.

There are two main types of integrations:

Below are the steps to get started with an itnernal integration using a database template we have provided.

1. To make use of this API collection collection as it's written, please duplicate this database template.

You will need to create an integration to retrieve an API token. You will also need additional values, such as a database ID and page ID, which can be found in your Notion workspace or from the database template mentioned above.

2. You will need to create an integration to retrieve an API token on our developer portal

Create an integration

3. Get your token for an internal integration under Secrets in your new integration

Get your token

3. Get the database ID of your database after cloning the template

Get the database ID

4. In Postman under the Variables tab, add your environment variables to start making requests.

For our full documentation, including sample integrations and guides, visit developers.notion.com.

Please note: Pages that are parented by a database must have the same properties as the parent database. If you are not using the database template provided, the request body for the page endpoints included in this collection should be updated to match the properties in the parent database being used. See documentation for Creating a page for more information.

To learn more about creating an access token, see our official documentation and read our Authorization guide. Need more help?

Join our developer community on Slack.

https://developers.notion.com/docs/getting-started

@ChrisPSTMN
Copy link

ChrisPSTMN commented Jan 30, 2024

See fork for changes.

Made some minor spelling and grammatical changes, but also re-ordered the steps and clarified where to locate the required information

@ChrisPSTMN
Copy link

need confirmation on page ID, and additional details for step #5 "Adding data to a variable"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment