API Documentation
Complete REST API reference for co-Editor. Authenticate, manage documents, use AI editing, and more.
Base URL
https://api.co-editor.comAuthentication required. Most endpoints require a valid JWT token sent as an httpOnly cookie. Obtain it via the Google OAuth flow.
Authentication
Google OAuth 2.0 flow and session management.
Documents
CRUD operations for documents with optimistic locking.
Folders
Manage folder hierarchy for document organization.
AI
AI-powered text editing and audio transcription.
Chats
AI chat history management.
Image Upload
Upload and serve images via S3/R2 or local storage.
Subscription
Plan management, usage tracking, and payments.
WebSocket (AI Chat)
Real-time AI chat via Socket.IO.
Client → Server
- chat:create
- chat:join
- chat:message
- chat:update-context
Server → Client
- chat:created
- chat:joined
- chat:message:confirmed
- chat:start
- chat:chunk
- chat:end
- chat:tool-call
- chat:tool-result
- chat:error
- chat:title-updated
- chat:cleared