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
| Method | Path | Description |
|---|---|---|
| POST | /v1/auth/register | Create an account → session + default API key |
| POST | /v1/auth/login | Sign in → session token |
| POST | /v1/auth/logout | End the current session |
| GET | /v1/account | Profile: plan, subscription, usage, API keys |
| POST | /v1/account/keys | Create an API key (plan-limited) |
| DELETE | /v1/account/keys/:id | Revoke an API key |
| POST | /v1/account/subscription | Subscribe / change plan |
| DELETE | /v1/account/subscription | Cancel (?immediate=true to downgrade now) |
| GET/POST | /v1/documents | List / create documents |
| GET/PUT/DELETE | /v1/documents/:id | Fetch / update / delete a document |
| POST | /v1/convert | Convert between HTML / Markdown / JSON (metered) |
| WS | /v1/collab/:room | Real-time collaboration socket (y-websocket protocol) |
| GET | /v1/plans | Public plan catalog |
| GET | /health | Service + 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 →