This CLI targets Notion API version 2026-03-11 and focuses on the parts of
the official API that are practical for a local structured CLI.
GET /v1/users/menotioncli auth whoaminotioncli auth doctornotioncli user me
GET /v1/usersnotioncli user list
GET /v1/users/{user_id}notioncli user get <user-id>
POST /v1/searchnotioncli search "<query>" --type all|page|data-source
GET /v1/pages/{page_id}notioncli page get <page-id-or-url>
GET /v1/pages/{page_id}/properties/{property_id}notioncli page property <page-id-or-url> <property-id>
GET /v1/pages/{page_id}/markdownnotioncli page get <page-id-or-url> --include-markdown
POST /v1/pagesnotioncli page create --parent-page <page-id> --title <title>notioncli page create --parent-data-source <data-source-id> --title <title>notioncli page create --parent <page-or-data-source> --title <title>
PATCH /v1/pages/{page_id}notioncli page update <page-id-or-url> --body-json ...notioncli page trash <page-id-or-url>notioncli page restore <page-id-or-url>
PATCH /v1/pages/{page_id}/markdownnotioncli page append <page-id-or-url> --stdin|--from-filenotioncli page replace <page-id-or-url> --stdin|--from-file
GET /v1/blocks/{block_id}notioncli block get <block-id-or-url>
GET /v1/blocks/{block_id}/childrennotioncli block children <block-id-or-url>
PATCH /v1/blocks/{block_id}/childrennotioncli block append <block-id-or-url> --body-json ...
PATCH /v1/blocks/{block_id}notioncli block update <block-id-or-url> --body-json ...
DELETE /v1/blocks/{block_id}notioncli block delete <block-id-or-url>
GET /v1/databases/{database_id}notioncli database get <database-id-or-url>
POST /v1/databasesnotioncli database create --body-json ...
PATCH /v1/databases/{database_id}notioncli database update <database-id-or-url> --body-json ...
GET /v1/data_sources/{data_source_id}notioncli data-source get <data-source-id-or-url>
POST /v1/data_sourcesnotioncli data-source create --body-json ...
PATCH /v1/data_sources/{data_source_id}notioncli data-source update <data-source-id-or-url> --body-json ...
POST /v1/data_sources/{data_source_id}/querynotioncli data-source query <data-source-id-or-url>
GET /v1/commentsnotioncli comment list <page-or-block-id>
GET /v1/comments/{comment_id}notioncli comment get <comment-id>
POST /v1/commentsnotioncli comment create --body-json ...
GET /v1/file_uploadsnotioncli file-upload list
GET /v1/file_uploads/{file_upload_id}notioncli file-upload get <file-upload-id>
POST /v1/file_uploads- internal step of
notioncli file-upload create --file <path>
- internal step of
POST /v1/file_uploads/{file_upload_id}/send- internal step of
notioncli file-upload create --file <path>
- internal step of
The CLI currently implements direct single-part uploads for local files. It does not yet expose:
- multi-part uploads for files larger than 20MB
- external URL imports
- explicit
completeflow for multi-part uploads
For several mutable endpoints, the CLI takes raw JSON request bodies instead of trying to wrap every Notion schema variant in dedicated flags. This is intentional for:
page updateblock appendblock updatecomment createdatabase createdatabase updatedata-source createdata-source update
The CLI uses the current database container APIs and data_source APIs from
2025-09-03+. It does not implement deprecated database listing/querying
endpoints from older API versions.
Webhooks require a secure public endpoint. A local standalone CLI cannot receive Notion webhooks directly without adding a public relay or tunnel.
Notion currently does not support managing views through the public REST API.
The public API operates inside existing workspaces. It does not expose a normal workspace creation flow for this CLI to automate.
- multi-part and external-URL file uploads
- richer page-property helpers for common property types
- stronger block/body validators on top of the raw JSON entry points
- coverage tests for the newly added commands with mocked HTTP responses
- CI-friendly live test automation on top of
scripts/live_smoke.shandscripts/live_matrix.sh
- https://developers.notion.com/reference
- https://developers.notion.com/reference/changes-by-version
- https://developers.notion.com/reference/update-a-data-source
- https://developers.notion.com/reference/webhooks
- https://developers.notion.com/reference/send-a-file-upload
- https://developers.notion.com/reference/create-a-file-upload
- https://developers.notion.com/reference/list-file-uploads
- https://developers.notion.com/reference/retrieve-a-file-upload