POST /v1/documents
Every project, trip, event, notebook, person and chat group has its Documents, like a folder of files. With this call an
agent adds there what the person adds in the app: a link, a text page (Markdown), a canvas page (JSON
Canvas) or a code page (with its language), or a folder. In MCP it’s create_document.
- Scope:
cerebro:write - Quota: 1 write
- Answers:
201 Created - In a project, trip or event someone shared with the person, you write with their role: an editor can, a viewer gets
403 forbidden.
Uploading a file (a PDF, an image…) is still done in the app: links, pages and folders go through here. To change or
delete what you created, use PATCH and DELETE /v1/items/{ref}.
Parameters
Section titled “Parameters”They all go in the body, as JSON.
| Name | Type | Required | Limits and rules |
|---|---|---|---|
in |
string (ref) | Yes | Whose Documents: project:…, trip:…, event:…, notebook:…, person:… or group:… |
type |
string | Yes | link, page (text), canvas, code or folder |
title |
string | Yes, except for link |
Up to 300 characters (anything longer is cut). For folder it’s its name, up to 200. A link without title is named after its address |
url |
string | With link |
Starts with http:// or https:// |
content |
string | No | page: the text in Markdown. code: the code. Up to 200,000 characters |
canvas |
object | No | Only with canvas: the canvas in JSON Canvas. Without it, the page starts empty |
language |
string | No | Only with code: one from the list, case-insensitive |
folder |
string | No | The folder it goes in: folder:… or a name. "Design/Screens" nests (up to 10 levels, each name up to 200 characters) and a missing one is created. With type folder, it’s the parent folder and goes by name |
A field that doesn’t belong to that type (url on a page, content on a link, canvas on a text page…) answers
400. A folder:… must be a folder of the same Documents. Folders are matched by name, case-insensitive: if one
already exists, it’s used.
The five types
Section titled “The five types”type |
What it creates | Its ref |
|---|---|---|
link |
A saved link, with url and, optionally, title |
document:… |
page |
A text page, with content in Markdown |
page:… |
canvas |
A canvas page, with canvas in JSON Canvas |
page:… |
code |
A code page, with content (the code) and language |
page:… |
folder |
A folder, with title as its name. If there’s already one with that name in the same place, it’s used (merged) |
folder:… |
Examples
Section titled “Examples”A text page inside a folder (if Design or Screens don’t exist, they’re created):
curl https://meemoo.tech/api/v1/documents \ -H "Authorization: Bearer $MEEMOO_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "in": "project:0b7e4a52-3c19-4d8f-a6e2-91f4c7d3b815", "type": "page", "title": "Design notes", "content": "## Screens\n\n- Home\n- Payments", "folder": "Design/Screens" }'const res = await fetch("https://meemoo.tech/api/v1/documents", { method: "POST", headers: { Authorization: `Bearer ${process.env.MEEMOO_TOKEN}`, "Content-Type": "application/json" }, body: JSON.stringify({ in: "project:0b7e4a52-3c19-4d8f-a6e2-91f4c7d3b815", type: "page", title: "Design notes", content: "## Screens\n\n- Home\n- Payments", folder: "Design/Screens", }),});const doc = await res.json(); // 201The other types, body only:
// A link (without title, it's named after its address: example.com/proposal){ "in": "person:6f1d2c3a-8b4e-4f7a-9c21-5d8e7a1b3c40", "type": "link", "url": "https://example.com/proposal", "title": "Acme proposal" }
// A canvas page: two connected cards{ "in": "project:0b7e4a52-3c19-4d8f-a6e2-91f4c7d3b815", "type": "canvas", "title": "Checkout flow", "canvas": { "nodes": [ { "id": "a", "type": "text", "text": "Cart", "x": 0, "y": 0, "width": 200, "height": 80 }, { "id": "b", "type": "text", "text": "Payment", "x": 320, "y": 0, "width": 200, "height": 80, "color": "4" } ], "edges": [{ "id": "e1", "fromNode": "a", "toNode": "b" }] } }
// A code page{ "in": "notebook:2d9b7e31-6a4c-4f0e-8b5d-3c1a9f7e2b64", "type": "code", "title": "Compute VAT", "language": "TypeScript", "content": "export const vat = (n: number) => n * 0.16;" }
// A folder inside another one (Design is created if missing){ "in": "project:0b7e4a52-3c19-4d8f-a6e2-91f4c7d3b815", "type": "folder", "title": "Screens", "folder": "Design" }Response
Section titled “Response”201 Created
{ "ref": "page:8a7b6c5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d", "type": "page", "title": "Design notes", "action": "created", "url": "https://meemoo.tech/proyectos/0b7e4a52-3c19-4d8f-a6e2-91f4c7d3b815?tab=recursos&doc=8a7b6c5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d", "folder": { "ref": "folder:9c1e4b7d-2a5f-4e8c-b3d6-7f0a1c9e5b42", "name": "Screens" }, "alsoCreated": ["folder:3a8d6f2e-1b4c-4d7a-9e5f-0c2b8a6d4e19", "folder:9c1e4b7d-2a5f-4e8c-b3d6-7f0a1c9e5b42"]}| Field | Type | What it is |
|---|---|---|
ref |
string | page:…, document:… or folder:…. Use it to change or delete it |
type |
string | The type you sent |
title |
string | Its name (for a link without title, its address) |
action |
string | created. For folder, merged if a folder with that name was already in that place |
url |
string | Where to open it in meemoo: its owner’s Documents (for a page, opened on it) |
folder |
object | Only if you sent folder (except with type folder): { ref, name } of the folder it went in |
alsoCreated |
string[] | The folders created to get there (folder:…), if any |
nodes, edges |
integer | Only for canvas with canvas: how many nodes and connectors it ended up with |
The new item can be searched and opened with GET /v1/items/{ref} right away.
JSON Canvas
Section titled “JSON Canvas”A canvas page’s content goes in
JSON Canvas, an open format:
{ "nodes": [...], "edges": [...] }.
Nodes. Each one needs id, x and y (numbers); without them, it’s skipped. width and height go from 16 to
20,000 (240 × 80 by default).
Node type |
What it becomes in meemoo |
|---|---|
text (or no type) |
A card with text |
link |
A link card with url (http:// or https://; otherwise a text card with the address) |
group |
A zone, with label as its title |
file |
A card with the file name (the file isn’t uploaded) |
Connectors (edges). Each one goes from fromNode to toNode, with the ids of nodes in the same canvas (not a
group); otherwise it’s skipped. fromSide and toSide (top, right, bottom, left) are optional: without
them, meemoo picks the side facing the other node. The end has an arrow unless toEnd: "none"; the start, only with
fromEnd: "arrow".
Colors. color on a node or connector: "1" to "6" (red, orange, yellow, green, cyan, purple) or a hex value
like "#3f8f4f".
The meemoo field. Every node and connector can carry meemoo with what the standard doesn’t have (shape, table,
font, connector route). It’s what get_item returns, so what you read is written back the same. You don’t need it to
create.
- Up to 5,000 nodes; more answers
400. - Every value is checked: what doesn’t fit (a color, a URL that isn’t
http/https, a number that isn’t a number) takes its default. - The
ids you send only tie nodes and connectors together: meemoo gives them new ids.
Read it and change it
Section titled “Read it and change it”canvas replaces the whole canvas. To change one: read it, change it and send it back.
GET /v1/items/page:…(orget_item) returns the canvas infields.canvas, as JSON Canvas.- Change the nodes and connectors you want.
- Send it whole with
PATCH /v1/items/page:…and{ "canvas": { … } }.
The canvas’s images come out as file nodes with their name, and connectors with a loose end in meemoo.looseEdges.
When you send it back, an image becomes a card with its name and those connectors aren’t written.
Code page languages
Section titled “Code page languages”JavaScript, TypeScript, JSX, TSX, Python, SQL, JSON, HTML, CSS, Markdown, Shell, YAML, XML,
Java, Kotlin, Swift, C, C++, C#, Go, Rust, PHP, Ruby, Dockerfile, TOML.
Errors
Section titled “Errors”| HTTP | code |
When |
|---|---|---|
| 400 | invalid_request |
in or type is missing, or type doesn’t exist; in is malformed or of a type without Documents; title is missing (except for a link); a link without url or with one that isn’t http/https; a field that doesn’t belong to that type; content over 200,000 characters; a language not in the list; a canvas without nodes or with more than 5,000; a folder:… that isn’t in those Documents; a path of more than 10 folders or a name over 200 characters |
| 401 | unauthorized |
No credential, or it expired or was revoked |
| 403 | insufficient_scope |
The credential doesn’t have cerebro:write |
| 403 | forbidden |
in is a project, trip or event shared with the person as view only |
| 404 | not_found |
in doesn’t exist or the person can’t see it; or it’s a notebook, person or chat group where they can’t write |
| 409 | conflict |
folder is a folder of a GitHub repo (read-only) |
| 429 | rate_limited, quota_exceeded |
More than 120 per minute, or today’s writes ran out |
GitHub repos
Section titled “GitHub repos”The person can bring a GitHub repo linked to a project into its Documents: it becomes a folder named like the repo with
the same structure. Markdown comes in as a text page (page) and code as a code page (code, with its language);
files with keys or passwords, dependencies, binaries and files over 512 KB never come in.
- It’s read-only: changing or deleting those pages and folders, or creating anything inside them, answers
409 conflict. They change on GitHub and meemoo updates them only when the main branch changes. - That project’s
GET /v1/contextbrings the repo summary (what it is, what it’s built with, how it’s organized). searchfinds a code page by its path or name (not by its content) and a markdown page by what it says.GET /v1/items/{ref}opens the whole file.
In MCP
Section titled “In MCP”It’s the create_document tool, with the same fields. It only shows up if the
credential has cerebro:write. To change and delete: update and delete with the ref.