Documentation

API reference

Two authentication planes: a session token (from login) for the account console, and an API key for the data plane (cloud documents).

Authentication

Pass the credential as a bearer token:

# Account plane — session token
Authorization: Bearer <session>

# Data plane — API key
Authorization: Bearer <api_key>

Quick start

# 1. Register (or use the console). The response includes a default API key.
curl -X POST https://cloud.richtexteditor.com/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{ "email": "you@example.com", "password": "your-password" }'

# 2. Create a cloud document with that API key
curl -X POST https://cloud.richtexteditor.com/v1/documents \
  -H "Authorization: Bearer $RTE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "title": "Notes", "content": "<p>Hi</p>" }'

Endpoints

MethodPathDescription
POST/v1/auth/registerCreate an account → session + default API key
POST/v1/auth/loginSign in → session token
POST/v1/auth/logoutEnd the current session
GET/v1/accountProfile: plan, subscription, usage, API keys
POST/v1/account/keysCreate an API key (plan-limited)
DELETE/v1/account/keys/:idRevoke an API key
POST/v1/account/subscriptionSubscribe / change plan
DELETE/v1/account/subscriptionCancel (?immediate=true to downgrade now)
GET/POST/v1/documentsList / create documents
GET/PUT/DELETE/v1/documents/:idFetch / update / delete a document
POST/v1/convertConvert between HTML / Markdown / JSON (metered)
WS/v1/collab/:roomReal-time collaboration socket (y-websocket protocol)
GET/v1/plansPublic plan catalog
GET/healthService + database health

Conversion & collaboration

Both are live server-side endpoints. POST /v1/convert runs the same conversion engine the editor uses on the client, metered monthly against your plan. /v1/collab/:room is an authenticated WebSocket in front of a Yjs relay, speaking the standard y-websocket protocol with per-plan concurrent-room limits and per-account room isolation.

You do not have to use either one. The editor still converts and collaborates entirely on the client, which is faster, unmetered, and keeps the document in the browser. The hosted endpoints exist for what the client cannot do: server-side jobs and integrations with no browser, and collaboration without running your own relay.

Guides

Authentication & Accounts → — register, sessions, API keys, and subscriptions.

Documents API → — full request and response shapes for storing editor content.

Conversion API → — HTML / Markdown / JSON conversion, metering, and status codes.

Collaboration API → — connecting y-websocket, room naming, isolation, and plan limits.

Ready to build? Create a free account →