{"name":"RiskLens Backend API","description":"API for document risk analysis","version":"1.0.0","endpoints":{"auth":[{"method":"POST","path":"/api/auth/register","description":"Register a new user"},{"method":"POST","path":"/api/auth/login","description":"Login with email and password"},{"method":"POST","path":"/api/auth/logout","description":"Logout user"},{"method":"GET","path":"/api/auth/user","description":"Get current user info"}],"documents":[{"method":"POST","path":"/api/documents/:id/analyze","description":"Trigger analysis for a document stored in Supabase"},{"method":"GET","path":"/api/documents/:id/status","description":"Check document processing status"},{"method":"GET","path":"/api/documents/:id/results","description":"Get document analysis results"},{"method":"GET","path":"/api/documents/:id","description":"Get document metadata by ID"},{"method":"GET","path":"/api/documents/:id/download","description":"Download a document"},{"method":"GET","path":"/api/documents/:id/content","description":"Get document content for editing"},{"method":"GET","path":"/api/documents","description":"List all user documents"},{"method":"DELETE","path":"/api/documents/:id","description":"Delete a document"},{"method":"POST","path":"/api/documents/:id/suggestions/apply","description":"Apply AI suggestion to document"}],"documentVersions":[{"method":"POST","path":"/api/documents/:id/versions","description":"Create a new document version"},{"method":"GET","path":"/api/documents/:id/versions","description":"List document versions"},{"method":"GET","path":"/api/documents/:id/versions/:versionId","description":"Get specific version"},{"method":"POST","path":"/api/documents/:id/revert/:versionId","description":"Revert to a specific version"},{"method":"POST","path":"/api/documents/:id/changes","description":"Record a document change"},{"method":"GET","path":"/api/documents/:id/changes","description":"Get document change history"},{"method":"POST","path":"/api/documents/:id/lock/:paragraphId","description":"Lock a paragraph for editing"},{"method":"DELETE","path":"/api/documents/:id/lock/:paragraphId","description":"Release a paragraph lock"},{"method":"GET","path":"/api/documents/:id/locks","description":"Get all active locks on a document"},{"method":"POST","path":"/api/documents/:id/autosave","description":"Save document changes periodically"},{"method":"GET","path":"/api/documents/:id/autosave","description":"Get latest autosave for a document"}],"contractEditor":[{"method":"GET","path":"/api/contract-editor/documents/:documentId/versions","description":"Get document versions with pagination"},{"method":"GET","path":"/api/contract-editor/documents/:documentId/versions/:versionNumber","description":"Get specific document version"},{"method":"POST","path":"/api/contract-editor/documents/:documentId/versions","description":"Create a new document version"},{"method":"GET","path":"/api/contract-editor/documents/:documentId/changes","description":"Get document changes history"},{"method":"POST","path":"/api/contract-editor/documents/:documentId/changes","description":"Record a document change"},{"method":"POST","path":"/api/contract-editor/documents/:documentId/locks","description":"Lock a paragraph for editing"},{"method":"DELETE","path":"/api/contract-editor/documents/:documentId/locks/:paragraphId","description":"Release a paragraph lock"},{"method":"GET","path":"/api/contract-editor/documents/:documentId/locks","description":"Get active paragraph locks"},{"method":"POST","path":"/api/contract-editor/documents/:documentId/autosave","description":"Save document autosave"},{"method":"GET","path":"/api/contract-editor/documents/:documentId/autosave","description":"Get latest autosave"}],"extension":[{"method":"GET","path":"/api/extension/health","description":"Extension API health check"},{"method":"POST","path":"/api/extension/analyze","description":"Analyze contract text from browser extension"},{"method":"GET","path":"/api/extension/analyses/:analysisId","description":"Get specific analysis by ID"},{"method":"GET","path":"/api/extension/history","description":"Get user analysis history"},{"method":"POST","path":"/api/extension/track","description":"Track user action on analysis result"},{"method":"GET","path":"/api/extension/tracking/stats","description":"Get user tracking statistics"},{"method":"GET","path":"/api/extension/settings","description":"Get extension user settings"},{"method":"PUT","path":"/api/extension/settings","description":"Update extension user settings"},{"method":"POST","path":"/api/extension/settings/reset","description":"Reset extension settings to defaults"}]}}