REST API: Notion connection
Check organization Notion connectivity and manage which pages an agent indexes.
Notion connects at the organization level, not per agent. Use GET /notion/connection to check whether your organization has an active Notion connection before you attempt any per-agent Notion work; the connection itself is established from the dashboard, not through this API.
Once connected, GET /agents/{id}/notion/pages lists the Notion pages available to a given agent, including which ones are already enabled as sources. Use POST /agents/{id}/notion/pages/toggle to enable or disable a specific page as a source for that agent. Enabling a page creates a Notion source; the agent then needs to retrain before content from that page reaches its knowledge.
For the source records this creates, and for deleting or re-syncing an already-enabled Notion source, see REST API: sources and ingestion. That page's /agents/{id}/sources/notion endpoints and POST /agents/{id}/sources/notion/{notionSourceId}/sync operate on already-enabled Notion sources; the endpoints on this page manage the connection and which pages are eligible in the first place.
Notion page availability can change outside your integration, for example when someone edits sharing settings inside Notion. Re-list available pages rather than caching the list indefinitely.