Notes API

The Notes API lives under <code>/apis/v1/notes</code>. Notes are scoped to the tenant, and a caller can see notes they own or that have been shared with them.

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/json

02

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.

MethodPathRequest / response
GET/apis/v1/notes{ "notes": [...], "next": "…" }. Query parameters control listing and pagination.
POST/apis/v1/notesCreate a note. Returns 201 { "note": Note } plus ETag.
GET/apis/v1/notes/:idReturns { "note": Note, "role": "…" } plus ETag.
PATCH or PUT/apis/v1/notes/:idUpdate with base_revision or If-Match. Returns the updated note and ETag.
DELETE/apis/v1/notes/:idSoft-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.

MethodPathResponse
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

MethodPathResponse
POST/:id/restoreRestores a soft-deleted note and returns { "note": Note } plus ETag. Optional device_id identifies the client.
DELETE/:id/purgePermanently 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" }.

08

Sharing and collaboration

Paths in this table are relative to /apis/v1/notes.

MethodPathBodyDescription
POST/:id/shareOptional role, expires_at.Create a share link.
POST/:id/share/regenerateNoneReplace the existing share link.
DELETE/:id/shareNoneRevoke the share link.
PUT/:id/invited{ "invited": [...] }Set invited collaborators.

Each route returns { "note": Note }. role sets what the recipient may do. Ration checks sharing and ownership on the server.

09

Create a linked task

POST /apis/v1/notes/:id/task creates a task in the Tasks API that points back to the note.

  • title is 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, assignees and references.
  • 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.

MethodPathOperation
GET, POST/note_foldersList or create a folder.
GET, PATCH, PUT, DELETE/note_folders/:idRead, update or delete a folder.
GET/note_folders/changes?cursor=…Read folder changes.
GET/note_folders/index?cursor=…Rebuild the folder index.

13

Errors

StatusMeaning
401Missing or invalid bearer authentication.
403forbidden or workspace_forbidden.
404Note, revision or folder not found or not readable.
409conflict (with the current note), or deleted when writing to a trashed note.
410Change cursor expired. Perform an index resync.
422Missing or invalid revision, invalid ID, no changes or invalid data.
Next guideForms API →

Last reviewed 27 November 2026.

Still stuck?

Chat with our support team. Tell us what you were doing and what you saw, and a person will pick it up. You can also email support@ration.works.

Buying or moving to Ration?

For plans, migration or an on-premise deployment, talk to our sales team.