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.views.create({
database_id: "248104cd-477e-80fd-b757-e945d38000bd",
data_source_id: "248104cd-477e-80af-bc30-000bd28de8f9",
name: "High priority items",
type: "table"
}){
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent": {
"type": "<string>",
"database_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Create a new view on a database or add a widget view to a dashboard.
import { Client } from "@notionhq/client"
const notion = new Client({ auth: process.env.NOTION_API_KEY })
const response = await notion.views.create({
database_id: "248104cd-477e-80fd-b757-e945d38000bd",
data_source_id: "248104cd-477e-80af-bc30-000bd28de8f9",
name: "High priority items",
type: "table"
}){
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent": {
"type": "<string>",
"database_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}For a successful request, the response is a View object. Provide exactly one of the following to specify where the view is created:Documentation Index
Fetch the complete documentation index at: https://developers.notion.com/llms.txt
Use this file to discover all available pages before exploring further.
database_id — create a view directly on an existing database.view_id — add a widget view inside an existing dashboard view.create_database — create a new linked database block on a page and add the view to it.database_id, view_id, or create_database is provided, or if none is provided.
Returns a 400 or 429 HTTP response if the request exceeds the request limits.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 The ID of the data source this view should be scoped to.
The name of the view.
The type of view to create.
table, board, list, calendar, timeline, gallery, form, chart, map, dashboard The ID of the database to create a view in. Mutually exclusive with view_id and create_database.
The ID of a dashboard view to add this view to as a widget. Mutually exclusive with database_id and create_database.
Filter to apply to the view. Uses the same format as the data source query filter.
Sorts to apply to the view. Uses the same format as the data source query sorts.
100Quick filters to pin in the view's filter bar. Keys are property names or IDs. Values are filter conditions (same shape as a property filter but without the property field). Each quick filter appears as a clickable pill above the view, independent of the advanced filter.
Show child attributes
Create a new linked database block on a page and add the view to it. Mutually exclusive with database_id and view_id.
Show child attributes
View presentation configuration. The type field must match the view type.
Show child attributes
Where to place the new view in the database's view tab bar. Only applicable when database_id is provided. Defaults to "end" (append).
Show child attributes
Where to place the new widget in a dashboard view. Only applicable when view_id is provided. Defaults to creating a new row at the end.
Show child attributes
The object type name.
"view"The ID of the view.
The parent database of the view.
Show child attributes
The view type.
table, board, list, calendar, timeline, gallery, form, chart, map, dashboard