NotionSender Logo
Sign In

Your Ultimate Notion API Doc Reference for 2026

Your Ultimate Notion API Doc Reference for 2026

If you're looking to build custom integrations with Notion, the official API documentation is where you'll want to start. Think of it as the ultimate source of truth for understanding how to interact with Notion's core components—databases, pages, and blocks—programmatically.

Getting Around the Notion API Ecosystem

At its core, the Notion API is a powerful bridge connecting your custom scripts, apps, and other tools directly to your Notion workspace. This is exactly what makes tools like NotionSender possible, giving you the ability to set up slick automations like saving emails straight into a database.

By using the API, you can start building solutions that create pages, pull data from databases, and update content without ever having to do it by hand. The official Notion API doc is the first place you should look to understand the endpoints, authentication, and data structures you'll need. It's truly the single best resource for creating reliable integrations.

Why the API Is a Game-Changer for Productivity

The real magic of the API is its ability to automate all those tedious, repetitive tasks and pull all your information into one central hub. Instead of constantly copying and pasting data between different apps, you can create a seamless, automated flow.

  • Centralize Your Data: You can automatically funnel reports, customer feedback, or project updates from other platforms directly into a master database in Notion.
  • Automate Your Workflows: Imagine triggering actions in Notion based on things happening elsewhere—like creating a new project page the moment a deal is closed in your CRM.
  • Build Your Own Tools: You have the freedom to develop unique dashboards or internal tools that are perfectly tailored to your team's needs, all reading from and writing to your Notion workspace.

The public release of the API back in May 2021 was a huge moment for Notion's community, which has since ballooned to 100 million users worldwide as of 2026. With millions of daily active users, a huge chunk of them rely on tools built with the API to customize their productivity setups. The United States alone makes up 22% of this user base, which just goes to show how critical the API has become. You can dig into more Notion user statistics and adoption trends if you're curious.

Once you get comfortable with the API, you stop being just a user and start becoming an architect of your own productivity system. It opens up a level of customization that the standard interface just can't match. This guide is here to be your reference for doing exactly that.

2. Mastering API Authentication and Security

Before you can build anything cool with the Notion API, you have to get authentication right. It's the very first and, frankly, most important step. For tools like NotionSender, the main way we connect to your workspace is through an internal integration token.

Think of this token as a secret key or a password for your integration. It’s what gives an application permission to access your workspace, so keeping it safe is non-negotiable.

How to Get Your Integration Token

Getting started is pretty straightforward. You'll head over to your Notion settings and find the "My integrations" section. From there, you just create a new integration, give it a recognizable name, and decide what it should be allowed to do (its capabilities).

Once you hit save, Notion will generate a unique "Internal Integration Token." This is the secret key you'll use in your API requests to prove it's really you.

This simple key is what unlocks the API, allowing custom tools to be built and ultimately making you more productive.

Diagram showing Notion API impact flow from new endpoints to custom tools and enhanced user productivity.

As you can see, API access is the bridge between Notion's core features and the powerful, custom workflows you can build on top of it.

Handling Your Token Securely

I can't stress this enough: never, ever hardcode your integration token directly into your app's source code. If you expose that key publicly—say, in a GitHub repository—you're basically handing over the keys to your entire Notion workspace. It’s a huge security risk.

The standard and correct way to handle this is by using environment variables.

  • For Development: The common practice is to create a .env file in your project's root folder. Inside, you'll add your token like this: NOTION_API_KEY="secret_…"
  • For Production: When you deploy your app, you'll configure the environment variable directly in your hosting platform's settings, whether you're using Netlify, Vercel, Heroku, or something else.

Your code will then read this variable when it runs, keeping the actual token completely separate from your codebase. And please, always remember to add .env to your .gitignore file to avoid accidentally committing it.

A quick Python example of accessing the token

import os from notion_client import Client

This line grabs the token from the environment variable

notion_token = os.getenv("NOTION_API_KEY")

And this initializes the client with your secure token

notion = Client(auth=notion_token)

This isn't just a suggestion; it's a fundamental best practice for building secure applications. The power of the API is no joke. It's the same infrastructure that supported Notion's AI features, which saw its vector search capacity grow 10x between November 2023 and early 2024, while also cutting costs by a staggering 90%. For freelancers and marketers using integrations like NotionSender, that kind of efficiency is a game-changer.

Understanding Integration Types

Notion gives you two flavors of integrations, and which one you choose depends entirely on what you're trying to build.

  1. Internal Integrations: These are built for your own personal use or for your team's private workspace. They use a static, non-expiring integration token, which makes them perfect for personal scripts, internal automations, or tools like NotionSender that connect directly to your own databases. You'll find plenty of examples throughout our Notion API documentation.

  2. Public Integrations: If you're building an app that you want to distribute to other Notion users, this is the way to go. Public integrations use the OAuth 2.0 protocol. It's a more involved process, but it's the secure standard for allowing users to grant your app permission to access their Notion workspace without ever sharing their secrets with you.

If you're new to APIs in general and want to dive deeper into these concepts, this resource on general API authentication principles is a great place to start.

Understanding Core API Objects

To really get anywhere with the Notion API, you first have to wrap your head around its core building blocks. The entire Notion world is built on a clear hierarchy of three key objects: Databases, Pages, and Blocks. Understanding how these three fit together is the single most important step before you start building any kind of automation.

I find it helpful to think of them like a set of Russian nesting dolls. Databases are the big, outer containers. Pages are the individual dolls that live inside those databases. And Blocks? They're the fine-grained details painted on each doll—the actual content.

Every single thing you do with the API, whether you're pulling data out or pushing new content in, will touch one or more of these objects. It's the fundamental concept.

Tablet displaying "CORE API Objects" with Database, Page, and Block buttons, on a wooden desk.

Database Objects

A Database is essentially a structured folder for your pages. It’s what gives a collection of pages its shape, defining a schema of properties that every page inside it will share (think columns in a spreadsheet like 'Name', 'Status', or 'Date').

When you query a database, you're telling the API, "Go get me all the pages that fit these rules, organized by the structure I've already defined."

  • Primary Function: To store and organize pages that have a consistent set of properties.
  • Key Identifier: database_id. You'll need this ID to do almost anything with a database, from querying it to adding new pages.
  • Common Use Case: A simple CRM for tracking clients, a kanban board for tasks, or a content calendar.

Page Objects

A Page is a single item inside a database, though it can also just float on its own in your workspace. Each page is a totally unique object with its own ID, and it holds the specific values for the properties set by its parent database. For instance, a page in your 'Tasks' database might have its 'Due Date' property set to tomorrow.

But what about the actual content on the page? That's not one big text field. Instead, it’s a collection of block objects.

In practice: A Page is the fundamental unit of record in Notion. When a tool like NotionSender saves an email, it creates a brand new Page object in the database you picked. It then maps the email's subject, sender, and body to the page's properties and its content blocks.

Block Objects

Blocks are the smallest, most granular pieces of content you'll find on a page. Seriously, everything is a block. A paragraph of text? That's a block. A heading, a bullet point, an image, even a to-do checkbox—each one is its own distinct block with its own type and content.

This block-based structure is the magic behind Notion's "infinite canvas" feel, and it's what makes creating content through the API so powerful. If you want to add a sentence, you append a paragraph block. Need a checklist? You'll append a series of to_do blocks. The possibilities are huge, letting you generate rich, dynamic content programmatically.

A Guide to Database Properties and Schemas

To get anything done with Notion databases through the API, you first have to understand their underlying structure, or schema. Think of this schema as a collection of properties, which are just like the columns in a spreadsheet. The official Notion API documentation lays out exactly how you need to format the data for each property type when creating or updating pages.

Getting this structure right isn't just a suggestion—it's a requirement for your API calls to succeed. If the JSON payload you send for a new page doesn't perfectly match the database's property schema, the request will simply fail. Each property type has its own specific JSON object structure you must follow.

For instance, a title property needs a completely different format than a date property. This level of precision is what keeps the data in your Notion workspace clean and reliable, which in turn makes your automations predictable and dependable.

Common Database Property Types

Let's walk through the most common property types you'll be working with. Each one has a specific job and demands a unique format when you're writing your code. Getting comfortable with these is the key to building any kind of powerful integration.

  • Title: This is the main property of any page. Every database has to have one, and it serves as the page's name. It’s actually a special kind of rich_text array.
  • Rich Text: Perfect for multiline text content. This property can handle basic formatting like bold, italics, and even links within the text.
  • Number: Use this for storing any numerical values, like prices, quantities, or ratings. You can also define the display format (e.g., currency, percent).
  • Select: Gives you a dropdown list of options you define beforehand. A page can only have one option chosen for this property.
  • Multi-select: Works just like a select property, but it allows you to pick multiple options from your predefined list.
  • Date: Stores a specific date or a date range. The API is strict about this one—it requires dates to be in ISO 8601 format (like YYYY-MM-DD).

Knowing the difference between select and multi-select is especially important for things like categorizing entries or adding tags. For more real-world examples, you should check out our guide on how saving emails to Notion works with properties.

Formatting Properties in API Requests

When you're putting together the JSON payload to create a new page, the properties object is where all the action is. You need to provide a key for every property you want to set, using the property's name as that key. The value will then be another object that spells out the property type and its content.

Key Takeaway: You can't just send a simple key-value pair like "Status": "In Progress". You absolutely have to wrap the value in the specific object format that the Notion API documentation requires for that property type.

For example, to set a "Status" property (which is a select type), you wouldn't just send the string "In Progress." Instead, you'd build a small object that identifies the select option by its name.

The table below provides a quick reference for the JSON structure of the most common property types you'll use.

Notion API Database Property Types Reference

Property Type JSON Structure Example Key Use Case
title {"title": [{"text": {"content": "My Page Title"}}]} The primary identifier and name for a database page.
rich_text {"rich_text": [{"text": {"content": "Some notes here."}}]} Storing multi-line text with basic formatting.
number {"number": 42} Storing numerical data like quantities, scores, or prices.
select {"select": {"name": "In Progress"}} Categorizing an item with a single, predefined option.
multi_select {"multi_select": [{"name": "TagA"}, {"name": "TagB"}]} Adding multiple tags or labels to an item.
date {"date": {"start": "2026-09-25"}} Assigning deadlines, event dates, or time ranges.
checkbox {"checkbox": true} Marking tasks as complete or tracking binary states (yes/no).
url {"url": "https://www.notionsender.com"} Storing a web link.
email {"email": "contact@example.com"} Storing an email address.
relation {"relation": [{"id": "page-id-goes-here"}]} Linking a page to one or more pages in another database.

This table is a great starting point, but always have the official API documentation handy for more complex types or when you run into trouble.

Practical JSON Examples

Let's see what this looks like in practice. Imagine we're creating a new page in a task manager database.

Example 1: Setting a Title To set the page's title to "Finalize Q3 Report," your JSON object would need to look like this. The title property is always an array that contains a text object.

{ "Task Name": { "title": [ { "text": { "content": "Finalize Q3 Report" } } ] } }

Example 2: Assigning a Date If you want to set a "Due Date" property, you must use the date object format with an ISO 8601 string.

{ "Due Date": { "date": { "start": "2026-09-25" } } }

Example 3: Using a Select Property If you have a "Priority" select property, you assign an option simply by referencing its name.

{ "Priority": { "select": { "name": "High" } } }

As you can see, each structure is a little different. My best advice is to always refer back to the official Notion API documentation for the specific property type you're working with. A little extra attention to detail here will save you a lot of headaches from failed API calls later on.

Implementing Rate Limits and Error Handling

To build a stable application on top of the Notion API, you have to play by its rules. That means understanding its built-in guardrails: rate limits and the potential errors you'll encounter. The official Notion API documentation is clear that integrations are limited to an average of three requests per second. If you ignore this, you'll find your application temporarily blocked.

Exceeding this threshold will get you a 429 Too Many Requests error, which will stop your integration cold. A well-built application anticipates this and includes logic to slow down, wait, and retry requests intelligently instead of just crashing.

Managing Request Frequency

Being proactive about how often you make requests is always better than just reacting to errors. If your app needs to make a bunch of requests in a short time—say, when syncing a large dataset—it’s a good idea to implement a queuing system or simply add a delay between your API calls.

A common and highly effective strategy for this is exponential backoff. The idea is to wait for a progressively longer period before retrying a failed request.

For instance, if a request fails, you might wait 1 second before trying again. If it fails a second time, you wait 2 seconds, then 4, and so on. This simple technique prevents you from hammering the API and gives it a moment to recover.

When working with any API, not just Notion's, it's critical to have robust error monitoring solutions in place. This lets you spot patterns of rate-limiting or other issues before they start affecting your users.

Handling Common HTTP Errors

Beyond just rate limits, your code needs to be ready to handle a variety of HTTP status codes. Wrapping your API calls in try-catch blocks is the standard way to manage these situations gracefully and keep your application from failing unexpectedly.

Here are some of the most common errors you’ll run into:

  • 400 Bad Request: This almost always means something is wrong with the JSON body you sent. Double-check that your properties match the database schema and that every required field is formatted correctly.
  • 401 Unauthorized: Your API token is either missing, invalid, or expired. Make sure your integration token is being passed correctly in the authorization header.
  • 404 Not Found: The resource you’re trying to access (like a specific page or database ID) either doesn't exist or your integration doesn't have permission to view it. Verify the ID is correct and confirm the page has been shared with your integration.
  • 500 Internal Server Error or 503 Service Unavailable: These errors point to a problem on Notion's end. Your best bet here is to use an exponential backoff strategy and simply retry the request after a short delay.

Alright, let's move from the technical guts of the Notion API to something more hands-on. The previous sections were all about the "how"—authentication, objects, and properties. Now, we'll see how that theory comes alive with NotionSender, a tool designed to tackle one of the most common automation requests: getting emails into your Notion databases.

Think of NotionSender as a smart assistant that sits between your inbox and Notion. It handles all the messy API calls and JSON formatting behind the scenes. So instead of you having to write code to create pages and map email fields to database properties, you just forward an email. That's it. NotionSender does the heavy lifting, making it a perfect real-world example of the API's power.

Getting Connected

The first step is to get NotionSender talking to your workspace, which follows the same authentication dance we walked through earlier.

  1. Generate an Integration Token: Just like you would for a custom script, you'll need to create a new internal integration inside your Notion settings.
  2. Provide the Token: Copy that "Internal Integration Token" and paste it into the NotionSender setup. This is what gives NotionSender permission to work its magic in your workspace.
  3. Share a Database: Finally, you have to tell the integration which database it's allowed to touch. Share the specific database you want to save emails to with the integration you just created. This is a critical step; skipping it is a common reason for getting 404 Not Found errors.

Once that connection is live, NotionSender gives you a unique email address tied directly to that database. Any email you forward to that address will get turned into a brand new page.

A laptop and tablet on a wooden table with a 'EMAIL TO NOTION' overlay, showing digital productivity.

This is the whole idea in a nutshell—bridging the gap between the chaos of your inbox and the structure of your Notion workspace. The tool essentially becomes your personal email-to-Notion engine.

How NotionSender Maps Email Fields to Properties

This is where all that talk about database schemas and property types really pays off. NotionSender is smart enough to look at an incoming email, parse its contents, and figure out where everything should go in your database. This is the automation that saves you from tedious copy-pasting.

By reading your database's schema, NotionSender can populate properties without you lifting a finger. For instance, it automatically grabs the email's subject line and uses it for the title property of the new page.

Here’s a typical breakdown of how it works:

  • Subject Line to Title: The email's subject naturally becomes the page's main title property.
  • Email Body to Page Content: The entire body of the email—text, lists, and all—is added as block objects inside the new page.
  • Sender Information to Text/Email Properties: The sender's name and email address can be mapped to your rich_text or email properties.
  • Attachments to Files Property: Any files attached to the email are automatically uploaded to Notion and linked up in a files property.

This automatic mapping is a massive time-saver. You can get started and create your first Notion database connection in just a couple of minutes. The whole process is designed to be user-friendly, even if you've never touched an API in your life.

Ultimately, using a tool like NotionSender lets you tap into the full potential of the Notion API without writing a single line of code. It’s a great showcase of how the API fosters a rich ecosystem of apps that build on top of Notion, turning it from a great note-taking tool into a truly integrated hub for all your work.

Common Questions About the Notion API

Getting started with any API can feel like learning a new language, and the Notion API is no different. It’s incredibly powerful, but that power comes with its own set of rules and quirks. I've seen plenty of people get tripped up by the same few things, so let's clear up the most common questions right away.

Quick Answers to Common API Questions

Before we get into the details, here are some quick-fire answers to the questions we see most often. This should give you a solid starting point.

Question Answer
What is the Notion API and what is it used for? It's a bridge that lets external tools and custom scripts talk to your Notion workspace. The main goal is automation—like syncing your CRM or automatically creating tasks—turning Notion into a programmable platform.
How do I get an API key (integration token) for Notion? You'll create an "Internal Integration" from your Notion settings. Go to Settings & Members > Integrations > Develop your own integrations to generate a new token. Think of it as a password for your app.
Can I send emails directly from Notion using the API? Not directly. The API doesn't have a built-in function to send emails. However, it allows tools like NotionSender to connect to your databases, read the content, and then handle the email sending for you.

Hopefully, that clears up some initial confusion. Now, let's explore some of these topics with a bit more depth.

Getting Your Notion API Key (Integration Token)

In the world of Notion, an "API Key" is officially called an Internal Integration Token. It’s the secret key that proves your script or service has permission to access your workspace. Getting one is actually pretty simple.

  1. Head to Settings & Members inside your Notion workspace.
  2. Find the Integrations tab in the sidebar.
  3. Click on Develop your own integrations.
  4. Hit the + New integration button, give it a memorable name, and make sure it's associated with the right workspace.
  5. On the next screen, you’ll find your Internal Integration Token. Copy this key and keep it somewhere safe—it's a secret!

A critical step that many people miss is sharing the specific pages or databases with your new integration. If you skip this, your app won't have permission to see anything, which is a frequent cause of 404 Not Found errors.

Adding Content to a Page with the API

Yes, you can absolutely add content, but not in the way you might think. You can't just append a string of text. The Notion API is structured around block objects, which represent every piece of content on a page—a paragraph, a heading, an image, you name it.

To add a simple paragraph, for instance, you'd send a request to the v1/blocks/{block_id}/children endpoint. The body of that request would contain a JSON object defining a paragraph block with your text inside. It feels a bit strange at first, but this block-based system is what lets you programmatically build beautifully formatted pages with lists, callouts, and more.

Why Isn't My Integration Working? A Quick Troubleshooting Guide

If you've built an integration and it's just not working, don't panic. It's almost always one of a few usual suspects. Before you dive deep into your code, check these things first.

Common Problem The Likely Culprit & Solution
401 Unauthorized Error Your API token is probably wrong or missing. Double-check that you copied the Internal Integration Token correctly and that it's included in your request header.
404 Not Found Error This almost always means one of two things: either the database/page ID is incorrect, or you forgot to share that specific page/database with your integration inside Notion.
400 Bad Request Error Your JSON payload has a mistake. This often happens when a property in your request doesn't match the format required by the database schema (e.g., sending a string for a number property).

From my experience, verifying the token and the sharing permissions solves over 90% of initial setup headaches. Always start there.


Ready to see the API in action without writing a single line of code? NotionSender harnesses the power of the Notion API to turn your databases into an email command center. You can start saving emails and automating your workflows in just a few minutes. Grab your unique Notion email address at https://www.notionsender.com and see for yourself.

More articles

© 2022 Notion Sender.

Twitter