Repository navigation
Local REST API
James Mr. Squirrely edited this page Nov 17, 2026
·
1 revision
The local API lets scripts and other apps read and edit the project that is open in WritingIDE. It listens on this computer only.
Tools > Extensions and API > Local API: switch it on, and copy the token. Every request needs it. The port is 5719 unless you change it.
| Request | Does |
|---|---|
GET /api/project |
Name, author, chapter count, words |
GET /api/chapters |
Chapters in reading order (id, title, book, status, synopsis, POV, story date, words) |
POST /api/chapters |
Add a chapter: { "title": "...", "text": "...", "bookId": null }
|
GET /api/chapters/{id} |
A chapter and its text |
PUT /api/chapters/{id}/text |
Replace its text (plain text or { "text": "..." }). Undoable in an open editor |
GET /api/chapters/{id}/comments |
Comments, bookmarks and plot markers |
POST /api/chapters/{id}/comments |
Add a comment: { "offset": 0, "length": 5, "text": "..." }
|
GET /api/entities |
Story elements |
POST /api/entities |
Add one: { "kind": "Character", "name": "...", "summary": "..." }
|
GET /api/diagnostics |
The Error List |
POST /api/save |
Save the project |
GET /api/openapi.json |
An OpenAPI 3 description (no token needed), for Postman, Swagger UI and code generators |
PowerShell:
$h = @{ Authorization = "Bearer <token>" }
Invoke-RestMethod http://localhost:5719/api/chapters -Headers $hcurl:
curl -H "Authorization: Bearer <token>" http://localhost:5719/api/project
Request bodies are limited to 16 MB. Unexpected errors return a generic message; the details go to the Output window. New token on the same tab invalidates the old one.
WritingIDE is free software under the GPL, version 3 or later; plugins can use any license. Source · Discussions and plugins
Start here
Writing
- The Editor
- Grammar and Continuity Rules
- Comments, Snapshots and Revision Mode
- Scenes and Plot Threads
Planning and progress
In and out
Plugins
Reference