The Views API requires API version
2025-09-03 or later. If your connection uses an older version, see the upgrade guide for migration steps.Overview
Database views let users see the same data in different ways — for example, as a table, board, calendar, timeline, gallery, list, form, chart, map, or dashboard. Each view can have its own filters, sorts, and layout configuration, so a single database can serve many different workflows. The Notion API exposes views as first-class resources. This means connections can programmatically manage the same view presets that users create in the UI, enabling use cases like workspace bootstrapping, migration tooling, and automated view setup. In this guide, you’ll learn:How views relate to databases and data sources.
What happens by default when you create a database.
How to list, create, and delete views.
How to configure view-specific settings.
How to create and manage dashboard views.
How to query data through a view.
Structure
A view is scoped to a single data source within a database. It defines how pages in that data source are filtered, sorted, and displayed. The view object looks like this:type— The layout type. One of:table,board,list,calendar,timeline,gallery,form,chart,map, ordashboard.data_source_id— Which data source this view is “over”. A database can have multiple data sources, and each view targets exactly one. For dashboard views this isnullsince dashboards contain multiple widget views, each with their own data source.filterandsorts— Use the same shapes as the filter and sort parameters in data source queries.quick_filters— A map of property-level filters that appear in the view’s filter bar. Keys are property names or IDs, values are filter conditions (same shape as property filters, without thepropertyfield). See Quick filters.configuration— Type-specific presentation settings that vary by view type. This is a discriminated union keyed ontype— see View configuration for the full schema per view type. This field isnullwhen no custom configuration has been set.parent— Always a database. Views are retrieved and managed through their parent database.dashboard_view_id— Only present on widget views that belong to a dashboard. References the parent dashboard view’s ID.
Default behavior
When you create a database through the API, Notion automatically provisions:- One data source under the database container
- One Table view named “Default view” over that data source
Listing views
Use the list endpoint to discover views. You can filter by the view’s parentdatabase_id or by the data_source_id that the view references.
By database
Passdatabase_id to list the views belonging to a specific database block.
By data source
Passdata_source_id to list all views that reference a given data source (collection), including linked views on other pages across the workspace.
Results are filtered by your connection’s access permissions. Views on pages the connection cannot access are excluded.
The list endpoint returns minimal view references (just
object and id). To get full view details including filters, sorts, and configuration, retrieve each view individually.Retrieving a view
Retrieve a view by its ID to see its full configuration, including filters, sorts, and layout settings.Creating a view
Create a new view by specifying the target data source, a name, and a view type. You must also provide one ofdatabase_id (to create a top-level view on a database), view_id (to add a widget view to an existing dashboard), or create_database (to create a linked database view on a page). You can optionally include filters, sorts, and a configuration object. For the full parameter reference, see Create a view.
database_id and data_source_id are different IDs. The database_id is the database container’s ID (the same ID returned by the Retrieve a database endpoint). The data_source_id is the ID of a specific data source within that database (found in the database’s data_sources array). Most databases have a single data source, but both IDs are required.Required parameters
Optional parameters
You must provide exactly one of
database_id, view_id, or create_database. Use database_id to create a top-level view on a database. Use view_id to add a widget view to an existing dashboard — see Dashboard views for details. Use create_database to create a linked database view on a page — see Creating a linked database view.Finding the data source IDIf you already have a database ID, call the Retrieve a database endpoint. The response includes a
data_sources array with each data source’s id and name.Creating different view types
Here’s an example of creating a Board view with grouping, cover images, and property configuration:View positioning
When creating a top-level database view (usingdatabase_id), you can control where it appears in the view tab bar with the position parameter. This is a discriminated union on the type field:
The
position parameter is only valid when database_id is provided. It cannot be used with view_id (dashboard widget creation).Creating a linked database view
Use thecreate_database parameter to create a lightweight linked database view on a page that references an existing data source. This creates a new database container on the target page with a single view over the specified data source — similar to inserting a “linked view of database” in the Notion UI.
This differs from POST /v1/databases, which creates a full standalone database with its own schema, data source, and default view. With create_database, the view points to an existing data source owned by another database, so no new schema is created.
create_database object accepts the following fields:
All view types are supported with
create_database, including form views with full form configuration and dashboard views. Dashboard views are created with an empty layout — add widgets to them via separate POST /v1/views calls with view_id.
Your connection must have access to both the target page (where the new database container is created) and the database that owns the data source being referenced.
Updating a view
Update a view to change its name, filters, sorts, or configuration. All fields are optional — only include the fields you want to change.null. See Clearing configuration with null for concrete examples.
Deleting a view
Delete a view by its ID. This permanently removes the view from the database’s view list.object, id, parent, and type). Full view details like filters, sorts, and configuration are not included since the view has been deleted.
A database must always have at least one view. Attempting to delete the last remaining view returns a
validation_error. To remove the database entirely, set in_trash to true via the update database endpoint instead.View configuration
Theconfiguration field on a view object controls type-specific presentation settings — things like column widths, grouping, cover images, subtasks, and more. It is a discriminated union keyed on the type field, which must match the view’s top-level type.
You can pass configuration when creating or updating a view. Nullable fields accept null to clear the setting.
Feature support by view type
Table configuration
Board configuration
Calendar configuration
Timeline configuration
Timeline preference object:
Timeline arrows_by object:
Gallery configuration
List configuration
Map configuration
In responses, an additional read-only field
map_by_property_name may be present, containing the display name of the map_by property.
Form configuration
Chart configuration
Chart views display database data as visual charts. The configuration uses a flat object withchart_type as a required discriminator. Available fields vary by chart type.
color_by_value is enabled on a bar or column chart, each bar is shaded along a gradient based on its numeric value — higher values appear in a darker shade and lower values in a lighter shade. This is useful for quickly spotting relative magnitude across categories. Combine with color_theme to control the gradient’s base color.
Required fields:
Data configuration fields:
Charts support two data modes: grouped data (aggregate values by grouping on a property) and results (use raw property values directly).
Format fields (all optional, all nullable):
Line-specific fields:
Bar/column-specific fields:
Donut-specific fields:
Number-specific fields:
Chart aggregation
They_axis and value fields use an aggregation object:
Supported aggregation operators:
count, count_values, sum, average, median, min, max, range, unique, empty, not_empty, percent_empty, percent_not_empty, checked, unchecked, percent_checked, percent_unchecked, earliest_date, latest_date, date_range.
Chart reference lines
Reference lines are horizontal lines drawn at specific y-axis values for visual comparison:Dashboard configuration
Dashboard row object:
Dashboard widget object:
Dashboard configuration is read-only — it is returned when retrieving a dashboard view but cannot be set directly when creating or updating a view. The layout structure is managed by creating and deleting widget views via the
view_id parameter on the create endpoint.Property configuration
Theproperties array controls which database properties are visible in the view and how they are displayed. Each entry targets a single property by its ID or name.
Group-by configuration
Group-by lets you organize rows or cards into sections based on a property’s values. The shape varies by property type, forming a discriminated union on thetype field.
All group-by variants share these fields:
The following table shows which
type values are supported and what extra fields each variant accepts:
Formula group-by uses a nested
group_by object that describes how to group the formula’s result type. The nested object does not include property_id (it inherits from the parent). Supported formula result types:
Subtask configuration
Subtask (sub-item) configuration controls how parent-child relationships are displayed in table views. This uses a self-referencing relation property to establish hierarchy.Cover configuration
Cover configuration controls the image displayed at the top of each card in board and gallery views.Clearing configuration with null
When updating a view, you can passnull for any nullable configuration field to remove that setting. Only include the fields you want to change — omitted fields are left unchanged.
Here are common scenarios:
Configuration updates use shallow merge — only the fields you include are changed, and omitted optional fields are preserved. The
configuration field itself is optional (omit it to leave config unchanged). When present, you must include type and any fields marked as required for that view type (e.g., board views always require group_by, calendar/timeline views always require date_property_id). See Feature support by view type for which fields are required vs optional per view type.Quick filters
Quick filters appear in the view’s filter bar and let users quickly toggle property-level filters without opening the full filter panel. In the API,quick_filters is a map where keys are property names or IDs, and values are filter conditions using the same shape as property filters but without the property field.
People filters accept "me" as a value for contains and does_not_contain to match the current user, so you can create filters like “assigned to me” without hardcoding a user ID.
Adding quick filters on create
Adding or updating a quick filter
To add a new quick filter or update an existing one, include the property key with the new filter condition. Other existing quick filters are preserved.Removing a quick filter
Set a specific quick filter tonull to remove it from the filter bar. Other quick filters are preserved.
Clearing all quick filters
Set the entirequick_filters field to null to remove all quick filters from the view.
Dashboard views
Dashboard views let you arrange multiple widget views in a grid layout on a single database. Each widget is itself a view (table, board, list, etc.) that can reference a different data source.Creating a dashboard
Create a dashboard view the same way as any other view — passtype: "dashboard" with a database_id:
Adding widget views
To add a widget to a dashboard, create a view withview_id set to the dashboard’s ID instead of database_id. Each widget can use a different data_source_id. Dashboards support all view types as widgets except for other dashboards (no nested dashboards).
Widget placement
When adding a widget to a dashboard, you can control where it appears in the layout using theplacement parameter. This is a discriminated union on the type field:
The
placement parameter is only valid when view_id is provided (dashboard widget creation). It cannot be used with database_id. Each dashboard row supports a maximum of 4 widgets.Retrieving a dashboard
When you retrieve a dashboard view, itsconfiguration contains the full layout structure — rows of widgets with their positions and sizes:
dashboard_view_id field that references their parent dashboard. Their parent.database_id always resolves to the underlying database, even though they are positioned inside a dashboard layout.
Deleting widget views
Delete a widget view using the standard delete endpoint. This also removes the widget from the dashboard’s layout structure.Dashboard views cannot be nested — you cannot create a dashboard widget inside another dashboard.
Querying a view
Use a view query to fetch pages using the view’s saved filter and sort configuration. This lets connections reproduce what a user sees in the Notion UI for a particular view, without needing to manually reconstruct the filter/sort logic. View queries use a three-step pattern:- Create a query — executes the view’s filters/sorts and returns the first page of results along with a
query_id. - Paginate results — use the
query_idto fetch additional pages from the cached result set. - Delete the query (recommended) — free the cached result set when you’re done paginating.
Step 1: Create a view query
Step 2: Paginate results
Step 3: Delete the query (recommended)
Once you’ve finished paginating, delete the query to free the cached result set. This is optional — queries expire automatically after approximately 15 minutes — but recommended as good practice, especially if your connection runs queries frequently.Query expirationCached query results expire after a short TTL (approximately 15 minutes). If a query expires, create a new one. This caching approach provides stable pagination — results won’t shift between pages due to concurrent data changes.
View queries do not support stacking additional filters or sorts on top of the saved view definition. If you need different filter/sort criteria, create a new view (or update an existing one) and query that instead.
Permissions
View endpoints reuse existing database connection capabilities:
The connection must also have access to the parent database. If it doesn’t, the API returns a
404 rather than a 403.
Next steps
- Explore the database object and data source object reference docs for the parent resources that views live under.
- Learn about filters and sorts — these shapes are shared between data source queries and view configuration.
- Review Working with databases for a broader overview of database concepts.
- See Preparing your connection for users to learn how to set up databases, views, and pages automatically when users install your connection.