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

# Notion data source pages

> Mount Notion data source pages on your app.

Follow the [REST mounting guide](https://docs.bijection.com/integrations/native-rest.md#mount-and-bind).
Bind the reviewed endpoint with `providerEndpoint` from `@bijectionhq/app-rest`.

Use a sealed bearer connection token with Read content capability. Share the database with that connection and bind the data source ID in the query path.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
export const remote = providerEndpoint(
  "notion.data-source.pages.observations",
  "https://api.notion.com",
  "/v1/data_sources/d9824bdc-8445-4327-be8b-5b47500af6ce/query",
  auth,
  data,
);
```

Pass `remote` as `receivers.provider` and bind the mount under the same `data` label. Call `source.initialize`
with this profile.

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{ profile: { mode: "provider", provider: "notion.data-source.pages.observations", limit: 15 } }
```

One data source’s page objects and properties keyed by page ID. `next_cursor` continues the sweep and terminal pages restart it at the next poll. A provider-reported incomplete query refuses advancement. Missing pages stay published. Page blocks and File content are outside the mode.

Each response is bounded to 100 pages and 36 KiB. The app commits observations with their
next position. [Source health and controls](https://docs.bijection.com/integrations/native-rest.md#feed-contracts)
report failures and allow recovery.

[Provider API reference](https://developers.notion.com/reference/query-a-data-source)

## Blocks, comments, users and databases

Bind a separate REST mount for each mode and collection. Use the same
sealed bearer authorization and bind the receiver and the mount under the same protected `data` label. Use each row's mode as `profile.provider`.

| Mode | Installed path | Terms and keys |
| - | - | - |
| `notion.blocks.children.observations` | `/v1/blocks/BLOCK_ID/children` | Direct children keyed by block ID. Install another binding to read a child block's children. |
| `notion.comments.observations` | `/v1/comments` | Set `selection` to the page or block ID. Comments visible to the connection use comment IDs. Enable Read comments for the connection. |
| `notion.users.observations` | `/v1/users` | Users visible to the connection, keyed by user ID. Available attributes depend on its user capability. |
| `notion.database.observations` | `/v1/databases/DATABASE_ID` | Set `limit: 1`. One database keyed by ID includes its data source references. |

List modes accept up to 100 rows and 36 KiB per response. Each sweep
uses Notion's `next_cursor` with the same terms and restarts at the end.
Database reads use a single response and start fresh on each poll.
An explicit trash marker withdraws a block or database. Missing objects
remain published. Block bodies may include attachment metadata.

[Block children](https://developers.notion.com/reference/get-block-children) ·
[Comments](https://developers.notion.com/reference/list-comments) ·
[Users](https://developers.notion.com/reference/get-users) ·
[Databases](https://developers.notion.com/reference/database-retrieve)

## Create and update pages

Follow the [REST writer guide](https://docs.bijection.com/integrations/native-rest.md#native-provider-writes).
Create a `providerWriter` with mode `notion.pages.create-update`, origin
`https://api.notion.com` and the mount's protected label. Pass it in `receivers.writers` under its mode. Seal a connection token with Insert content for create
and Update content for updates on the shared resources.

Submit up to 24 KiB of JSON using one exact command key per intent.
Create supplies a provider page parent and properties. Update supplies the
hyphenated page UUID and the Page API body, including `in_trash` when
moving a page to or out of Trash. A matching HTTP 200 page object
acknowledges the command. The writer retains command evidence
and leaves read positions independent.

[Create a page](https://developers.notion.com/reference/post-page) ·
[Update page](https://developers.notion.com/reference/patch-page)

## Append, update and delete blocks and comments

Use `providerWriter` at `https://api.notion.com` with a protected label and
a sealed bearer connection token. Pass each writer in `receivers.writers` under its mode.
Both modes use exact command keys and accept up to 24 KiB of JSON.

| Mode | Commands |
| - | - |
| `notion.blocks.append-update-delete` | Set `scope: ["PARENT_UUID"]`. Submit `create` with one object in `children` to append to that parent. Submit `update` or `delete` with an exact credential-accessible block UUID. Delete moves the block to Trash. |
| `notion.comments.create-update-delete` | Submit `create` with a page parent or discussion ID and rich text. Update and delete target an exact UUID for a comment created by the connection. |

Enable the appropriate Notion content or comment capabilities. An HTTP
200 response must identify the appended, changed or deleted object.
The writer's `once` evidence stays under the mount's label and carries
no read cursor.

[Append blocks](https://developers.notion.com/reference/patch-block-children) ·
[Create comments](https://developers.notion.com/reference/create-a-comment) ·
[Update comments](https://developers.notion.com/reference/update-a-comment) ·
[Delete comments](https://developers.notion.com/reference/delete-a-comment)


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