> ## Documentation Index
> Fetch the complete documentation index at: https://developers.bottari.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List templates

> List a database's templates, in the same order as the app.

Lists a database's templates, in the same order as the app. Templates are made in the app. To create a page from one, see [Create a page](https://developers.bottari.ai/api-reference/pages/create.md#templates).

**Authorization** `string` *required*

`Bearer <token>`. See [Tokens](https://developers.bottari.ai/auth/tokens.md).

**Bottari-Version** `string`

Optional. Only `2026-03-11` is accepted. Without it, the current version is used. A different value returns 400.

**id** `string` *required*

The data source ID. Use the database ID.

**name** `string`

Keeps templates whose name contains this text, ignoring case. An empty value returns 400.

**page\_size** `number` (default: 100)

1 to 100.

**start\_cursor** `string`

`next_cursor` from the previous response.

**templates** `object[]`

**properties**

**id** `string`

The template's ID. Use it as `template_id`.

**name** `string`

The template's title. A template with no title is `New page`.

**is\_default** `boolean`

`true` for the database's default template.

**next\_cursor** `string | null`

The cursor for the next set.

**has\_more** `boolean`

`true` if there's more.

Templates deleted through the API stay in this list until they're removed for good.

## Templates as pages

A template's ID works like a page's ID.

| Request | Template |
| - | - |
| `GET /v1/pages/{id}` and writes to it | Works like a row. |
| Blocks and Markdown | Read and write like any document. |
| `POST /v1/search` with `query` | Appears if its title matches. |
| `POST /v1/search` without `query` | Doesn't appear. |
| `POST /v1/data_sources/{id}/query` | Doesn't appear. |
| A value in a relation | 404 |
| Webhooks | No events. |

## Errors

| Status | `code` | Cause |
| - | - | - |
| 400 | `validation_error` | `page_size` or `name` is wrong, or `start_cursor` isn't in the list: `The start_cursor provided is invalid: ...` |
| 404 | `object_not_found` | The database isn't connected. |

See [Common rules](https://developers.bottari.ai/api-reference/overview.md#errors) for shared errors.

```bash curl theme={null}
curl "https://api.bottari.ai/v1/data_sources/exampleDb001/templates?name=weekly" \
  -H "Authorization: Bearer $BOTTARI_TOKEN" \
  -H "Bottari-Version: 2026-03-11"
```

```json 200 theme={null}
{
  "templates": [
    {
      "id": "exampleTpl01",
      "name": "Weekly report",
      "is_default": false
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "request_id": "33333333-3333-4333-8333-333333333333"
}
```

```json 400 theme={null}
{
  "object": "error",
  "status": 400,
  "code": "validation_error",
  "message": "The start_cursor provided is invalid: exampleTpl09",
  "request_id": "33333333-3333-4333-8333-333333333333"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.