API
For developers
Venolio offers three ways for your own code to work with a server:
- the MCP server, for AI apps and agents, with the widest set of tools;
- the Notion-compatible API below, so scripts written for Notion’s API can read and write Venolio pages, records and blocks;
- webhooks: automations that start when a signed request arrives, and automations that send signed requests to your services.
The other /api routes of the server serve Venolio’s own apps. They sign in with a browser
session and do not accept personal tokens.
Personal tokens
Both the MCP server and the Notion-compatible API accept a personal token:
- Open Settings → Connections → AI apps (MCP).
- Click New token, name it, choose Read only or Read & write and an expiry.
- Copy the token: it is shown once.
Send it in every request:
Authorization: Bearer <your token>
A token acts as you, with your current permissions: it sees only what you can open. A read-only token can read and query; writing needs a read and write token. Revoking the token or deactivating your account stops it at once. Use one token per script, and keep it in an environment variable or a secret store, never in code.
Notion-compatible API
The base address is your server’s address followed by /api/notion/v1:
curl https://venolio.example.com/api/notion/v1/users/me \
-H "Authorization: Bearer $VENOLIO_TOKEN"
It follows the shape of Notion’s public API (pages, databases, data sources, blocks, rich text and property objects), so many Notion client libraries work by pointing them at this address. It is not the Notion service: there is no Notion OAuth, and only the subset below is supported.
Endpoints
| Method | Path after /api/notion/v1 |
What it does |
|---|---|---|
| GET | /users/me |
The person the token belongs to. |
| POST | /search |
Pages and databases you can read, with a query and paging. |
| POST | /pages |
Creates a page, or a record under a data source, optionally with content. |
| GET, PATCH | /pages/{id} |
Reads a page; changes its title, properties and emoji icon; archives or restores it. |
| GET | /databases/{id} |
A database with its one data source. |
| GET | /data_sources/{id} |
A data source and its typed properties. |
| POST | /data_sources/{id}/query |
Records you can read, with computed values, nested filters and property sorts. |
| POST | /databases/{id}/query |
The same query, by database. |
| GET, PATCH, DELETE | /blocks/{id} |
Reads, changes or removes a block. |
| GET, PATCH | /blocks/{id}/children |
Reads or appends a block’s direct children; a page ID is a valid parent. |
How Venolio maps to it
- Every database has exactly one data source, with the same ID.
- A record’s page ID is the ID of the record’s page. Relations list the related pages you can read; others are left out.
- The title property is called
Name, unless another property already uses that name. - Formula and rollup values are computed by Venolio for the requesting person and are read-only.
What you can write
- Properties: title, rich text, number, checkbox, select, status, multi-select, date and date range, people, relation, URL, e-mail and phone number.
- Rich text: plain text, formatting, links, text and background colours from Notion’s palette, mentions of people, pages and dates, and inline equations.
- Blocks: paragraphs, headings 1 to 4, toggle headings, quotes, bulleted and numbered items, to-dos, toggles, callouts, column lists and columns, dividers, code, equations, bookmarks, supported embeds, table of contents, external images, and file, PDF, audio and video blocks that point to a file already uploaded to Venolio. Media captions are kept as plain text.
Other Venolio blocks are returned as unsupported. They stay intact when you edit or append
around them, but updating or deleting them fails. Use the MCP server for tables, attachments,
linked databases, buttons and synced blocks.
Not supported: uploading files, creating or changing database schemas, comments, OAuth, all of Notion’s formula and filter semantics, and every method of Notion’s SDKs.
Changing records safely
Record pages carry teamspace_record_version. When you write properties, send it as
expected_version, with only the changed properties and their original values in base_values:
independent changes made meanwhile are merged, overlapping ones answer 409. A property write
without a version answers 428 unless you send allow_unversioned: true, so an unmodified Notion
client is not safe against concurrent edits.
Block writes check the page’s current revision; a concurrent change answers 409 and you read
the blocks again. Pages and blocks carry teamspace_revision, which a block write may send to
require that revision.
Paging and errors
- Lists have
object: "list",results,has_moreandnext_cursor. Passnext_cursorback asstart_cursor. Page sizes are 1 to 100. - A cursor belongs to one person, one query and one snapshot. If the data changed meanwhile, the
API answers
409: start again from the first page. - Errors have
object: "error",status,codeandmessage.
Limits
| Limit | Value |
|---|---|
| Request body | 1 MiB |
| Items per page | 1–100 |
| One block write | 1,000 blocks, 16 levels deep |
| Blocks indexed per page | 5,000 |
| Filters | 4 nested levels, 100 rules |
| Sorts | 10 property sorts |
| Rich text items or relation pages in one write | 100 |
Webhooks
Webhooks belong to automations.
Start an automation from your service
Give an automation the webhook trigger, save it, and create a signing key on the automation’s card.
Venolio shows the address (https://venolio.example.com/api/webhooks/automations/<id>) and a
64-character key, once.
Each request must:
- be a
POSTwith a JSON body of at most 16 KiB; - carry
X-Venolio-Timestamp(Unix seconds, within 5 minutes of the server’s clock),X-Venolio-Event-Id(1 to 200 characters, unique per event) andX-Venolio-Signature: sha256=<hex>, the HMAC-SHA256 oftimestamp.event_id.bodywith the key, in lowercase hex.
body='{"deal":"Acme Studio","amount":1200}'
ts=$(date +%s)
id=evt-0001
sig=$(printf '%s.%s.%s' "$ts" "$id" "$body" | openssl dgst -sha256 -hmac "$KEY" -hex | sed 's/^.* //')
curl -X POST https://venolio.example.com/api/webhooks/automations/<id> \
-H "Content-Type: application/json" \
-H "X-Venolio-Timestamp: $ts" -H "X-Venolio-Event-Id: $id" \
-H "X-Venolio-Signature: sha256=$sig" \
--data "$body"
A valid request answers {id, status: "pending"} and the automation runs with the payload. Any
problem with the headers or signature, an old timestamp, or an automation that is off answers the
same 401. Sending the same event ID with the same body again returns the first run; the same ID
with a different body answers 409. A new key replaces the old one at once.
Send to your service
An automation’s webhook action sends a POST to an https address you saved as a webhook
destination, with:
Content-Type: application/jsonand the body the action defines (at most 16 KiB);X-Venolio-Timestamp(Unix seconds) andX-Venolio-Signature: sha256=<hex>, the HMAC-SHA256 oftimestamp.bodywith the destination’s secret;Idempotency-Key, unique per run and action.
Check the signature and the timestamp before you act on a request. Any 2xx answer counts as
delivered. Other answers, errors and timeouts (15 seconds) fail the run and are not retried. The
address must be public https on port 443; private and local addresses are refused.
About this part of Venolio: Let Claude, ChatGPT and Codex work in your workspace
Checked against the app on . The same help is built into the Venolio apps and works offline. Something wrong or missing? Tell us.