Skip to main content
GET
/
v1
/
data_sources
/
{data_source_id}
/
templates
TypeScript SDK
import { Client } from "@notionhq/client"

const notion = new Client({ auth: process.env.NOTION_API_KEY })

const response = await notion.dataSources.listTemplates({
  data_source_id: "d9824bdc-8445-4327-be8b-5b47500af6ce"
})
{
  "templates": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "is_default": true
    }
  ],
  "has_more": true,
  "next_cursor": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
The response object contains an array page_size results (up to 100) under the templates key. Each element of the array is a JSON object with the following attributes:
KeyData TypeMeaning
idString (UUIDv4 format)The ID of the template.
nameStringThe display name of the template.
is_defaultBooleanWhether that template is the data source’s default.
Pagination: When there are more templates than the current API response contains, the has_more boolean field is set to true, and the next_cursor is set to the ID of the next template to use as the start_cursor of your next API request. Only templates under the data source identified by the data_source_id in the URL are returned. Also, the bot must have access to the template for it to appear in this API. However, in most cases, as long as the bot is connected to the data source’s parent database (check the “Connections” list under the 3-dot menu), this access also extends to all of the child templates. Templates are also valid Notion pages, so you can retrieve a template’s full properties and content using the Retrieve a page API. This also means that opening a template in the Notion app and copying its URL is an alternative way to get its ID.

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

Path Parameters

data_source_id
string
required

ID of a Notion data source.

Query Parameters

name
string

Filter templates by name (case-insensitive substring match).

start_cursor
string

If supplied, this endpoint will return a page of results starting after the cursor provided. If not supplied, this endpoint will return the first page of results.

page_size
integer

The number of items from the full list desired in the response. Maximum: 100

Required range: 1 <= x <= 100

Response

templates
object[]
required

Array of templates available in this data source.

Maximum array length: 100
has_more
boolean
required

Whether there are more templates available beyond this page.

next_cursor
string<uuid> | null
required

Cursor to use for the next page of results. Null if there are no more results.