A Notion API mock for creating pages.
Your agent reads seeded customer feedback and creates a page. Check the page-creation request and retrieve its title and block content.
page_createdCalls POST /v1/pages
Starting records
pages
- ref
product- title
Product
users
- ref
ellen- name
Ellen Priceellen@acme.example
Connect your agent to the Notion mock
When ancha runs your agent, it sets:
NOTION_API_URLNOTION_TOKEN
Point the client you already use at them.
import { Client } from '@notionhq/client';
const notion = new Client({ auth: process.env.NOTION_TOKEN, baseUrl: process.env.NOTION_API_URL });
const { results } = await notion.search({ query: 'runbook' });Locally, ancha runs your agent as an ordinary process, so keep real Notion credentials out of its environment.
See all 19 endpoints
blocks
/v1/blocks/:block_id/v1/blocks/:block_id/v1/blocks/:block_id/v1/blocks/:block_id/children/v1/blocks/:block_id/childrencomments
/v1/comments/v1/comments/v1/comments/:comment_iddata_sources
/v1/data_sources/:data_source_id/v1/data_sources/:data_source_id/querydatabases
/v1/databases/:database_idpages
/v1/pages/v1/pages/:page_id/v1/pages/:page_id/v1/pages/:page_id/properties/:property_idsearch
/v1/searchusers
/v1/users/v1/users/:user_id/v1/users/meSeed your own data
The data the Notion mock starts with on every run, cut to a few records. ancha twins seed notion prints every field.
Full seed YAML
twins:
- notion
seed:
notion:
workspace:
name: Acme
users:
- ref: ellen
name: Ellen Price
email: ellen@acme.example
pages:
- ref: product
title: Product
icon: 🧭
created: -2000h
created_by: ellen
content:
- type: paragraph
text: Specs, roadmap and what customers ask for.
databases:
- ref: feedback
title: Customer feedback
icon: 💬
parent: product
created: -1000h
created_by: ellen
description: One row per request; link duplicates to the first one.
properties:
- name: Feedback
type: title
rows:
- ref: fb_reports
properties:
Feedback: Weekly scheduled reports for ops reviews
created: -33h
created_by: ellen
Check what your agent did
Checks YAML
checks:
- id: page_created
trace:
called: POST /v1/pagesMore docs and files tools
All 43 toolsNotion API mock FAQ
What will a Notion search for a page title return?
Ancha’s POST / matches query against visible page and data-source titles, ignoring case. Set filter.property to object and filter.value to page to return pages, sorted by newest last_edited_time by default.
Can an agent insert Notion blocks in the middle of a page?
Use PATCH / with children and the preceding sibling’s ID in after. The mock inserts the new blocks after that sibling; omitting after appends them at the end.
How are compound filters evaluated in a Notion database query?
Query the mock’s / with a filter containing and or or conditions. An and requires every condition to match the row, while an or requires any condition to match.
Install the CLI and run your agent against the Notion mock.
Ancha is not affiliated with Notion.