# Waddle Notes API

> Read and write Waddle Notes from your own programs, within the switches you set for agents.

Waddle Notes are plain markdown files on your Mac. These routes let a program search, read and write them through Waddle. Most agents should use [MCP tools](https://docs.waddle.sh/mcp.md) instead, which use these routes.

## Routes

| Route | What it does |
|---|---|
| `GET /notes/can` | What's allowed: `{ "ok": true, "can": { "read", "create", "append", "rewrite", "trash" } }`. |
| `GET /notes?q=&limit=` | Search, or the newest with no `q`. |
| `GET /notes/show?ref=` | One note, by its path or title. |
| `POST /notes/create` | `{"title", "text", "folder"?}`: a new note. It goes in `inbox` unless you name a folder. It never writes over one. |
| `POST /notes/append` | `{"note", "text"}`: adds the text at the end. |
| `POST /notes/rewrite` | `{"note", "text"}`: replaces the whole note. Empty text is refused. |
| `POST /notes/trash` | `{"note"}`: into the macOS Trash, so Finder can put it back. |

```sh
curl localhost:4404/notes/create -H 'content-type: application/json' \
  -d '{"title":"standup","text":"shipped the docs","folder":"work"}'
```

## Who may do what

The writes follow the switches in Preferences → Agents → Your notes, whoever calls them. Reading follows "Read and search" when the caller says it's an agent (`?agent=1`).

| Switch | Out of the box |
|---|---|
| Read and search | On |
| Make new notes | On |
| Add to a note | On |
| Rewrite a note | Off |
| Move a note to the Trash | Off |

A write that's off answers 403 with `"error": "not-allowed"`.

## Limits

- A write names its note exactly: its path (like `limen/limen launch.md`) or its exact title. If several notes share a title, nothing is written, and the reply lists their paths.
- At most 200 KB of text in one call.
