Notion API Endpoints
Complete reference for all Notion API endpoints
The Notion plugin provides access to Notion's API for managing blocks, databases, pages, and users.
New to Corsair? Learn about core concepts like API access, authentication, and error handling.
Full Implementation: For the complete, up-to-date list, see the Notion plugin source code.
Blocks
appendBlock
blocks.appendBlock
Append new blocks to a block or page.
await corsair.notion.api.blocks.appendBlock({
block_id: "page-or-block-id",
children: [
{
type: "paragraph",
paragraph: {
rich_text: [{ type: "text", text: { content: "Hello, world!" } }],
},
},
],
});Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
block_id | string | Yes | Page or block ID to append to |
children | object[] | Yes | Array of block objects to append |
getManyChildBlocks
blocks.getManyChildBlocks
Retrieve child blocks of a block or page.
const blocks = await corsair.notion.api.blocks.getManyChildBlocks({
block_id: "page-id",
page_size: 100,
});Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
block_id | string | Yes | Page or block ID |
page_size | number | No | Max results per page |
start_cursor | string | No | Pagination cursor |
Databases
getDatabase
databases.getDatabase
Get info about a database.
const db = await corsair.notion.api.databases.getDatabase({
database_id: "database-id",
});Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
database_id | string | Yes | Notion database ID |
getManyDatabases
databases.getManyDatabases
List databases accessible to the integration.
const databases = await corsair.notion.api.databases.getManyDatabases({
page_size: 50,
});Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
page_size | number | No | Max results per page |
start_cursor | string | No | Pagination cursor |
searchDatabase
databases.searchDatabase
Search and filter databases.
const databases = await corsair.notion.api.databases.searchDatabase({
query: "Tasks",
});Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
query | string | No | Text to search for in database titles |
page_size | number | No | Max results per page |
Database Pages
createDatabasePage
databasePages.createDatabasePage
Create a new page in a database.
const page = await corsair.notion.api.databasePages.createDatabasePage({
database_id: "database-id",
properties: {
Name: {
title: [{ text: { content: "New Task" } }],
},
Status: {
select: { name: "In Progress" },
},
},
});Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
database_id | string | Yes | Target database ID |
properties | object | Yes | Page properties matching the database schema |
children | object[] | No | Initial content blocks |
getDatabasePage
databasePages.getDatabasePage
Get a page from a database.
const page = await corsair.notion.api.databasePages.getDatabasePage({
page_id: "page-id",
});Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
page_id | string | Yes | Page ID |
getManyDatabasePages
databasePages.getManyDatabasePages
List and filter pages in a database.
const pages = await corsair.notion.api.databasePages.getManyDatabasePages({
database_id: "database-id",
filter: {
property: "Status",
select: { equals: "In Progress" },
},
page_size: 50,
});Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
database_id | string | Yes | Database ID |
filter | object | No | Filter conditions |
sorts | object[] | No | Sort configuration |
page_size | number | No | Max results per page |
start_cursor | string | No | Pagination cursor |
updateDatabasePage
databasePages.updateDatabasePage
Update properties of a database page.
await corsair.notion.api.databasePages.updateDatabasePage({
page_id: "page-id",
properties: {
Status: {
select: { name: "Done" },
},
},
});Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
page_id | string | Yes | Page ID |
properties | object | Yes | Properties to update |
Pages
archivePage
pages.archivePage
Archive (trash) a page.
await corsair.notion.api.pages.archivePage({
page_id: "page-id",
});Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
page_id | string | Yes | Page ID to archive |
createPage
pages.createPage
Create a new page.
const page = await corsair.notion.api.pages.createPage({
parent: { page_id: "parent-page-id" },
properties: {
title: {
title: [{ text: { content: "Meeting Notes" } }],
},
},
});Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
parent | object | Yes | Parent page or database (page_id or database_id) |
properties | object | Yes | Page properties |
children | object[] | No | Initial content blocks |
searchPage
pages.searchPage
Search pages and databases by title.
const results = await corsair.notion.api.pages.searchPage({
query: "Meeting Notes",
page_size: 20,
});Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
query | string | No | Text to search for |
filter | object | No | Filter by object type (page or database) |
page_size | number | No | Max results per page |
Users
getUser
users.getUser
Get info about a user.
const user = await corsair.notion.api.users.getUser({
user_id: "user-id",
});Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
user_id | string | Yes | Notion user ID |
getManyUsers
users.getManyUsers
List all users in the workspace.
const users = await corsair.notion.api.users.getManyUsers({
page_size: 100,
});Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
page_size | number | No | Max results per page |
start_cursor | string | No | Pagination cursor |