- Create databases and pages directly in a user’s workspace
- Configure views with filters, sorts, and layout types
- Populate pages using database templates
How it works
1
User authorizes your connection
The user goes through the standard OAuth flow. You receive an
access_token with the capabilities your connection requested. No template URL is needed.2
3
Configure views
Use the views API to add views (table, board, calendar, etc.) to your newly created databases, with the filters and sorts your connection needs.
4
Optionally apply templates
If your databases have data source templates, you can create pages that start from those templates for a richer initial experience.
Creating workspace-level content
OAuth integrations, public integrations, and personal access tokens can create pages and databases at the workspace level by omitting theparent parameter (or setting it to { "type": "workspace", "workspace": true }). This places the content in the associated user’s Private section.
This applies to both scoped OAuth integrations and public integrations, as well as personal access tokens. Internal connections cannot create workspace-level content because they aren’t owned by a single user.
Create a database
database.id and database.data_sources[0].id — you’ll need them to create views and pages.
Create a standalone page
Adding views
After creating a database, you can add views that match your connection’s use cases. Each database starts with a default Table view, but you’ll likely want to create additional views with specific filters, sorts, and layout types. For a project tracker, you might want a Board view grouped by status and a Calendar view for due dates:Applying templates
If your connection pre-configures database templates for the data source, you can create pages that start from those templates. This is useful for providing users with structured starting points — for example, a “Bug report” template with pre-filled sections.Programmatic setup vs. template duplication
What’s next
Now that you know how to set up workspace content, explore the APIs used in this guide:
- Working with databases — schemas, querying, and page management
- Working with views — creating, updating, and querying views
- Creating pages from templates — using data source templates
- Authorization — the authorization flow for scoped OAuth integrations and public integrations