01
Before you start
Paths are given in full, or relative to /apis/v1/notes where a table says so. Every request needs a Ration bearer token (see Authentication):
Authorization: Bearer <ration_access_token>
Content-Type: application/json02
Concurrency: required for edits
Notes use optimistic concurrency. A note response includes revision and an ETag response header. On every update or soft delete, send the revision you read, either as a JSON base_revision field or as this header:
If-Match: "note:<note-id>:r<revision>"If another client changed the note first, Ration returns 409 with the current title, content and revision. Reload or merge that version, then retry with its revision. Don’t overwrite a conflict blindly.
03
Note model and CRUD
A note response is { "note": { ... } }. Important fields include id, title, content, revision, folder_id, labels, links, invited, role, created_at, updated_at and, where applicable, soft-delete metadata.
| Method | Path | Request / response |
|---|---|---|
GET | /apis/v1/notes | { "notes": [...], "next": "…" }. Query parameters control listing and pagination. |
POST | /apis/v1/notes | Create a note. Returns 201 { "note": Note } plus ETag. |
GET | /apis/v1/notes/:id | Returns { "note": Note, "role": "…" } plus ETag. |
PATCH or PUT | /apis/v1/notes/:id | Update with base_revision or If-Match. Returns the updated note and ETag. |
DELETE | /apis/v1/notes/:id | Soft-delete with base_revision or If-Match. Returns the deleted note and ETag. |
04
Example update
{
"base_revision": 4,
"title": "Launch brief",
"content": "<h1>Launch brief</h1><p>Updated content.</p>",
"labels": ["launch"]
}DELETE moves the note to trash. It isn’t a permanent deletion.
05
Revision history
Paths in this table are relative to /apis/v1/notes.
| Method | Path | Response |
|---|---|---|
GET | /:id/revisions | { "revisions": [...] }, newest first. Bodies are left out. |
GET | /:id/revisions/:revision | { "revision": { ... } }, including that revision’s content. |
To restore an older revision, fetch it, then send an ordinary update with its content and the note’s current revision. This keeps concurrency protection in place.
06
Trash and permanent deletion
| Method | Path | Response |
|---|---|---|
POST | /:id/restore | Restores a soft-deleted note and returns { "note": Note } plus ETag. Optional device_id identifies the client. |
DELETE | /:id/purge | Permanently removes a trashed note: { "note": Note, "purged": true }. |
07
Export DOCX
GET /apis/v1/notes/:id/export.docx downloads an editable DOCX file. If conversion fails, it returns 503 { "error": "docx_converter_unavailable" } or 502 { "error": "docx_conversion_failed" }.
09
Create a linked task
POST /apis/v1/notes/:id/task creates a task in the Tasks API that points back to the note.
titleis required. If you leave it out, Ration uses the note title when there is one.- The body also accepts task fields such as
description,group,assigneesandreferences. - Success returns
201 { "task": { ... }, "note": Note }. The task gets a reference to the note, and Ration adds the back-link to the note atomically without using up a note revision.
{
"title": "Follow up on launch brief",
"date": "2026-08-15",
"priority": "high",
"assignees": [{ "id": "user-id", "email": "sam@example.com" }]
}10
Change feed
GET /apis/v1/notes/changes?cursor=…. Use the returned cursor to request changes after your last checkpoint. When a cursor expires, Ration returns 410 Gone with:
{
"error": "cursor_expired",
"reset_required": true,
"hint": "Perform index resync"
}11
Index resync
GET /apis/v1/notes/index?cursor=…. Use this after an expired cursor, or to rebuild the client-side note index. Both feeds return Ration’s note records and cursor metadata.
12
Note folders
Note folders use /apis/v1/note_folders.
| Method | Path | Operation |
|---|---|---|
GET, POST | /note_folders | List or create a folder. |
GET, PATCH, PUT, DELETE | /note_folders/:id | Read, update or delete a folder. |
GET | /note_folders/changes?cursor=… | Read folder changes. |
GET | /note_folders/index?cursor=… | Rebuild the folder index. |
13
Errors
| Status | Meaning |
|---|---|
401 | Missing or invalid bearer authentication. |
403 | forbidden or workspace_forbidden. |
404 | Note, revision or folder not found or not readable. |
409 | conflict (with the current note), or deleted when writing to a trashed note. |
410 | Change cursor expired. Perform an index resync. |
422 | Missing or invalid revision, invalid ID, no changes or invalid data. |
Last reviewed 27 November 2026.