Join us for our Developer Platform Hackathon, May 16-17. Apply now →
import { Client } from "@notionhq/client"
const notion = new Client({ auth: process.env.NOTION_API_KEY })
const response = await notion.dataSources.create({
parent: {
database_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
title: [{ text: { content: "My Data Source" } }],
properties: {
Name: { title: {} },
Status: {
select: {
options: [
{ name: "To Do", color: "red" },
{ name: "Done", color: "green" }
]
}
}
}
}){
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"properties": {}
}import { Client } from "@notionhq/client"
const notion = new Client({ auth: process.env.NOTION_API_KEY })
const response = await notion.dataSources.create({
parent: {
database_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
title: [{ text: { content: "My Data Source" } }],
properties: {
Name: { title: {} },
Status: {
select: {
options: [
{ name: "To Do", color: "red" },
{ name: "Done", color: "green" }
]
}
}
}
}){
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"properties": {}
}Use this API to add an additional data source to an existing database. TheDocumentation Index
Fetch the complete documentation index at: https://developers.notion.com/llms.txt
Use this file to discover all available pages before exploring further.
properties follow the same structure as the initial schema passed to initial_data_source[properties] in the Create a database API, but can be managed independently of the properties of any sibling data sources.
A standard “table” view is created alongside the new data source. To customize database views, use the Notion app. Managing views is not currently supported in the API.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The API version to use for this request. The latest version is 2026-03-11.
2026-03-11 An object specifying the parent of the new data source to be created.
Show child attributes
Property schema of data source.
Show child attributes
Title of data source as it appears in Notion.
100Show child attributes
Page icon.
Show child attributes