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.

Connect your agent
The test
  • page_created

    Calls POST /v1/pages

Starting records

  • pages

    ref
    product
    title
    Product
  • users

    ref
    ellen
    name
    Ellen Price
    email
    ellen@acme.example

Connect your agent to the Notion mock

When ancha runs your agent, it sets:

  • NOTION_API_URL
  • NOTION_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

GET/v1/blocks/:block_id
PATCH/v1/blocks/:block_id
DELETE/v1/blocks/:block_id
GET/v1/blocks/:block_id/children
PATCH/v1/blocks/:block_id/children

comments

GET/v1/comments
POST/v1/comments
GET/v1/comments/:comment_id

data_sources

GET/v1/data_sources/:data_source_id
POST/v1/data_sources/:data_source_id/query

databases

GET/v1/databases/:database_id

pages

POST/v1/pages
GET/v1/pages/:page_id
PATCH/v1/pages/:page_id
GET/v1/pages/:page_id/properties/:property_id

search

POST/v1/search

users

GET/v1/users
GET/v1/users/:user_id
GET/v1/users/me

Seed 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/pages

More docs and files tools

All 43 tools

Notion API mock FAQ

What will a Notion search for a page title return?

Ancha’s POST /v1/search 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 /v1/blocks/:block_id/children 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 /v1/data_sources/:data_source_id/query 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.

Book a demo

Ancha is not affiliated with Notion.