Skip to main content
POST
/
v1
/
data_sources
TypeScript SDK
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. The 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.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Notion-Version
enum<string>
required

The API version to use for this request. The latest version is 2025-09-03.

Available options:
2025-09-03

Body

application/json
parent
Database Id · object
required

An object specifying the parent of the new data source to be created.

properties
object
required

Property schema of data source.

title
(Text · object | Mention · object | Equation · object)[]

Title of data source as it appears in Notion.

Maximum array length: 100
icon
File Upload · object

Page icon.

Response

object
string
required

The data source object type name.

Allowed value: "data_source"
id
string<uuid>
required

The ID of the data source.

properties
object
required

The properties schema of the data source.