The Inkweld API follows OpenAPI 3.0 specifications. You can access the complete API specification and try endpoints interactively.
Signing in returns a JWT. Send it as a bearer token on every request. Password sign-in is off by default (servers are passkey-first); an administrator can enable it with PASSWORD_LOGIN_ENABLED=true.
POST /api/v1/auth/login
Content-Type: application/json
{
"username": "your-username",
"password": "your-password"
}
Response:
{
"user": { "id": "uuid", "username": "your-username", ... },
"token": "eyJ..."
}
Then: Authorization: Bearer eyJ...GET /api/v1/projects - List your projectsPOST /api/v1/projects - Create a project from a title and slugGET /api/v1/projects/:username/:slug - Get project detailsPUT /api/v1/projects/:username/:slug - Update projectDELETE /api/v1/projects/:username/:slug - Delete projectGET /api/v1/projects/:username/:slug/elements - The project tree (folders, documents, worldbuilding elements)GET /api/v1/projects/:username/:slug/docs - List documentsGET /api/v1/projects/:username/:slug/docs/:docId - Get a documentDocuments and worldbuilding content are edited through the real-time connection below or the MCP server, not through REST writes.
Real-time collaboration uses WebSocket connections:
wss://your-server/api/v1/ws/yjs?documentId=<username>:<slug>:<elementId>
The client authenticates with its token after connecting.
Yjs CRDT updates exchanged in binary format.The API implements rate limiting to prevent abuse. Default limits:
Rate limit configuration can be adjusted via environment variables.
The API returns standard HTTP status codes:
200 - Success201 - Resource created400 - Bad request (validation error)401 - Unauthorized (not logged in)403 - Forbidden (insufficient permissions)404 - Resource not found429 - Too many requests (rate limited)500 - Internal server errorGenerate type-safe API clients from the OpenAPI specification:
# TypeScript/Angular client (included in repo)
cd backend
bun run generate:angular-client
# Other languages via openapi-generator
npx @openapitools/openapi-generator-cli generate \
-i backend/openapi.json \
-g python \
-o ./python-client