FolioSign in

API documentation

Last updated November 27, 2026

Folio has a small HTTP API so you can read and change your own notes from scripts, automations and apps. It offers exactly the tools the MCP server does, authenticated with a personal API key.

Get a key

Open Folio, go to Settings → API keys and choose Create key. Give it a name, choose what it may do and when it expires (or never). The key is shown once, so copy it somewhere safe. You can delete it at any time and it stops working immediately.

A key acts as you, on your notes in your Google Drive, so treat it like a password. Anyone who has it can do whatever you allowed it to do.

Authenticate

Send the key as a bearer token on every request:

Authorization: Bearer fk_your_key_here

Requests without a valid key get 401. A key that lacks the permission a tool needs gets 403.

Call a tool

POST https://folio-eta-bay-59.vercel.app/v1/tools/{name} with a JSON body holding the tool’s arguments (an empty body means no arguments).

curl https://folio-eta-bay-59.vercel.app/v1/tools/create_note \
  -H "Authorization: Bearer $FOLIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "Groceries", "content": "- [ ] Milk\n- [ ] Bread"}'

A successful call returns 200:

{
  "ok": true,
  "text": "Created “Groceries” …",   // a readable summary
  "data": { "id": "…", "title": "Groceries" }, // structured result
  "images": [ { "data": "<base64>", "mimeType": "image/png" } ] // only get_image
}

If the tool can’t do what you asked (a bad argument, a note that doesn’t exist, a note that changed since you read it) you get 400 with a message that says what to fix.

{ "error": { "code": "tool_error", "message": "No note with that id. …" } }

List the tools

GET https://folio-eta-bay-59.vercel.app/v1/tools returns the tools your key can use, each with its JSON Schema:

curl https://folio-eta-bay-59.vercel.app/v1/tools -H "Authorization: Bearer $FOLIO_API_KEY"

Use it as an MCP server

The MCP endpoint at https://folio-eta-bay-59.vercel.app/mcp also accepts an API key as its bearer token, for clients that can’t sign in with OAuth.

Permissions

  • notes:read Read your notes. Search, open and read notes and images.
  • notes:write Create and edit. Create and edit notes, pin them, add images, and move them to the trash.
  • notes:delete Delete permanently. Permanently delete notes and empty the trash. This can’t be undone.

Writing and deleting both include reading. Permanent deletion is never selected by default.

Errors and limits

  • 401 missing, invalid, expired or deleted key.
  • 403 the key lacks the permission the tool needs.
  • 404 no such tool.
  • 400 bad JSON or arguments, or the tool refused. The message explains why.
  • 429 too many requests (about 300 a minute per key). Wait for Retry-After seconds.
  • 5xx a problem on our side or with Google Drive. Retry shortly.

All errors are JSON: { "error": { "code", "message" } }.

Tools

list_notes

List the person’s notes, in the same order the app shows them: pinned first, then most recently edited. Returns titles, ids, snippets and dates — not full text (use get_note for that). Use filter “trash” to see deleted notes that can still be restored. Needs notes:read.

  • filter "all" | "pinned" | "trash" — Which notes. Default “all” (everything not in the trash).
  • limit integer — How many to return. Default 50.
  • cursor string — Pass next_cursor from a previous call to get the next page.

search_notes

Find notes by what they contain. Matches titles and the full text of every note (the same search the app’s ⌘K palette uses). Title matches rank first. Returns metadata and a snippet; call get_note to read a result. Needs notes:read.

  • query string, required — Words to look for.
  • include_trash boolean — Also search notes in the trash. Default false.
  • limit integer — Max results. Default 20.

get_note

Read one note: its title and the complete Markdown body, exactly as stored. Works for notes in the trash too. Long notes can be read in pieces with offset and max_chars. Needs notes:read.

  • id string, required — The note’s id, from list_notes, search_notes or create_note.
  • offset integer — Character to start from. Default 0.
  • max_chars integer — Most characters to return. Default 100000.

create_note

Create a new note. Give it a title and a Markdown body. The title is stored separately from the body, so don’t repeat it as a “# heading” in content (if title is omitted and content opens with “# Heading”, that line becomes the title). Supports GitHub-flavoured Markdown: tables, task lists (- [ ] item), fenced code, ==highlight==, and images ![alt](drive:ID) from upload_image. Returns the new note’s id. Needs notes:write.

  • title string — The note’s title.
  • content string — The Markdown body.
  • pinned boolean — Pin it to the top of the list.

update_note

Change a note’s title, replace its whole body, and/or pin or unpin it. Only the fields you pass change. Replacing content overwrites everything — for a small change prefer edit_note, and to add to the end use append_to_note. Pass expected_modified_at to avoid clobbering newer edits. Needs notes:write.

  • id string, required — The note’s id, from list_notes, search_notes or create_note.
  • title string — New title.
  • content string — New full Markdown body (replaces the old one).
  • pinned boolean — Pin (true) or unpin (false).
  • expected_modified_at string — Optional safety check: the modifiedAt you last saw. If the note has changed since, the call is refused so you never overwrite someone’s newer edit.

edit_note

Make precise changes inside a note without rewriting it: each edit replaces exact text with new text. Edits apply in order, all-or-nothing. “find” must match exactly once unless replace_all is true. Best for fixing a line, ticking a task (“- [ ] ship” → “- [x] ship”), or rewording a paragraph. Needs notes:write.

  • id string, required — The note’s id, from list_notes, search_notes or create_note.
  • edits object[], required — The replacements to make, in order.
  • expected_modified_at string — Optional safety check: the modifiedAt you last saw. If the note has changed since, the call is refused so you never overwrite someone’s newer edit.

append_to_note

Add Markdown to the end (or the start) of a note, separated by a blank line. The safest way to log, collect or add to something without touching what’s already there. Needs notes:write.

  • id string, required — The note’s id, from list_notes, search_notes or create_note.
  • content string, required — Markdown to add.
  • position "end" | "start" — Where to add it. Default “end”.

duplicate_note

Make a copy of a note, titled “… copy”, with the same content. Returns the copy’s id. Needs notes:write.

  • id string, required — The note’s id, from list_notes, search_notes or create_note.

pin_note

Pin a note to the top of the list, or unpin it. Needs notes:write.

  • id string, required — The note’s id, from list_notes, search_notes or create_note.
  • pinned boolean — true to pin (default), false to unpin.

trash_note

Move a note to the trash. This is recoverable: restore_note brings it back. (Permanent deletion is a separate, deliberate step: delete_note.) Needs notes:write.

  • id string, required — The note’s id, from list_notes, search_notes or create_note.

restore_note

Bring a note back from the trash. Needs notes:write.

  • id string, required — The note’s id, from list_notes, search_notes or create_note.

delete_note

PERMANENTLY delete a note that is already in the trash. This cannot be undone. If it isn’t in the trash yet, call trash_note first. Only do this when the person has clearly asked for the note to be gone for good. Needs notes:delete.

  • id string, required — The note’s id, from list_notes, search_notes or create_note.

empty_trash

PERMANENTLY delete every note in the trash. This cannot be undone. Use list_notes with filter “trash” first and confirm with the person. Needs notes:delete.

import_markdown

Create several notes at once from Markdown text, the way importing .md files works in the app: a leading “# Heading” becomes the title (else filename, else “Imported note”), and YAML front matter is kept. Up to 50 notes per call. Needs notes:write.

  • notes object[], required

upload_image

Store an image in the person’s Drive (Folio/Assets) and get back the Markdown to embed it in a note: ![alt](drive:ID). Send the bytes base64-encoded. Max 20 MB; png, jpeg, gif, webp, avif, svg, heic, bmp. Needs notes:write.

  • data_base64 string, required — The image bytes, base64-encoded (no data: prefix).
  • mime_type string, required — e.g. image/png
  • name string — File name, e.g. diagram.png.
  • alt string — Alt text for the Markdown.

get_image

Fetch an image embedded in a note. Use the id from a ![alt](drive:ID) reference. Needs notes:read.

  • id string, required — The id after “drive:” in the image’s Markdown.

get_workspace

A quick orientation: how many notes there are, whether Google Drive is connected, and what this connection is allowed to do. Call this first if you’re unsure what’s possible. Needs notes:read.