Skip to main content
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:
Key fields:
  • type — The layout type. One of: table, board, list, calendar, timeline, gallery, form, chart, map, or dashboard.
  • 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 is null since dashboards contain multiple widget views, each with their own data source.
  • filter and sorts — 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 the property field). See Quick filters.
  • configuration — Type-specific presentation settings that vary by view type. This is a discriminated union keyed on type — see View configuration for the full schema per view type. This field is null when 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:
  1. One data source under the database container
  2. One Table view named “Default view” over that data source
This means every newly created database is immediately usable — it has a data source to hold pages and a view to display them.
After creating the database, you can list the views to discover the default view, then create additional views as needed.

Listing views

Use the list endpoint to discover views. You can filter by the view’s parent database_id or by the data_source_id that the view references.

By database

Pass database_id to list the views belonging to a specific database block.

By data source

Pass data_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.
Both variants return a paginated list of view references:
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.
The response is a full view object.

Creating a view

Create a new view by specifying the target data source, a name, and a view type. You must also provide one of database_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.
The response is the newly created view object with all fields populated.
Views in a database can be configured to show pages from a data source that’s owned by another database. In Notion, this is called a linked database (or linked view), and it’s useful for showing the same underlying data in multiple places—for example, putting filtered views of your Tasks, Projects, and Bugs on a single dashboard page.In the API, the main requirement is that your connection has access to both the database that owns the data source, and the database you’re creating the view in.
Filtering by multiple select or status valuesSelect, status, and multi_select filter operators accept an array of strings to filter by multiple values at once. For example, to match Priority “Low” or “Medium”:
You can also exclude multiple values:
The API validates each value in the array against the property’s configured options. For status properties, group names (e.g. “To-do”, “In progress”, “Complete”) are also accepted. If any value doesn’t match an existing option or group, the API returns a descriptive error listing the available values.

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 (using database_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 the create_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.
The 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.
To clear a view’s filter, sorts, or specific configuration fields, set them to 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.
The response is a partial view object containing only identity fields (object, id, parent, and type). Full view details like filters, sorts, and configuration are not included since the view has been deleted.
Deleting a view cannot be undone through the API. The view will no longer appear in the database’s view list.
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

The configuration 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:

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 with chart_type as a required discriminator. Available fields vary by chart type.
When 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

The y_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

The properties 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 the type 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 pass null 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 to null to remove it from the filter bar. Other quick filters are preserved.

Clearing all quick filters

Set the entire quick_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 — pass type: "dashboard" with a database_id:

Adding widget views

To add a widget to a dashboard, create a view with view_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 the placement 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, its configuration contains the full layout structure — rows of widgets with their positions and sizes:
Widget views include a 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:
  1. Create a query — executes the view’s filters/sorts and returns the first page of results along with a query_id.
  2. Paginate results — use the query_id to fetch additional pages from the cached result set.
  3. Delete the query (recommended) — free the cached result set when you’re done paginating.

Step 1: Create a view query

The response includes the first page of results inline:

Step 2: Paginate results

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.
The response confirms deletion:
This endpoint is idempotent — calling it on an already-deleted or expired query still returns success.
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