AI & Developer Tools
REST API Reference
KeepCloud exposes its backend capabilities at https://api.keepcloud.in alongside the Streamable HTTP MCP gateway at /mcp. All protected routes authenticate via KeepCloud JWT cookies/Bearer tokens, while /mcp uses OAuth 2.1 PKCE or scoped kc_mcp_... keys.
Base URL & Authentication Endpoints
All REST endpoints sit under `https://api.keepcloud.in`. Public key inspection and JWT token refresh routes support web, desktop, and API sessions.
| Method & Path | Purpose |
|---|---|
| GET /api/auth/public-key | Fetches active RSA public verification key |
| POST /api/auth/refresh | Refreshes an active authenticated session token |
| GET /api/auth/me | Returns authenticated user profile, tier, and quota flags |
| POST /api/auth/google | Completes Google ID token login flow |
| POST /api/account/consent | Stores or updates DPDP indexing consent state |
| GET /sessions & DELETE /sessions/{session_id} | Lists active device sessions or revokes specific sessions |
Cloud Connections & Storage Telemetry
| Method & Path | Purpose |
|---|---|
| GET /api/cloud/accounts | Lists all linked Google Drive, OneDrive, Dropbox, Telegram & MEGA accounts |
| PATCH / DELETE /api/cloud/accounts/{account_id} | Updates account metadata or unlinks a connected cloud |
| GET /api/cloud/storage | Returns aggregated used/total quota metrics across linked clouds |
| GET /api/cloud/google/login & /picker-files | Initiates Google OAuth or syncs Picker-selected items |
| GET /api/cloud/onedrive/login & /api/cloud/dropbox/login | Starts Microsoft OneDrive or Dropbox OAuth flows |
| GET /api/cloud/telegram/qr & POST /verify-pairing | Pairs Telegram Cloud Storage via QR code or bot session |
| POST /api/cloud/mega/connect | Links an encrypted MEGA storage session |
Vault Files, Uploads, Sharing & Recycle Bin
| Method & Path | Purpose |
|---|---|
| GET /api/cloud/files | Unified directory listing across connected cloud providers |
| POST /api/cloud/upload & /api/cloud/files/upload | Uploads files up to MAX_UPLOAD_SIZE_MB (2048 MB default) |
| POST /api/cloud/create-folder | Creates a directory on the specified provider & account |
| POST /api/cloud/files/move | Non-destructively moves a file or folder inside a provider |
| POST /api/cloud/files/copy | Copies files across folders or across different cloud providers |
| GET /api/proxy/download & /api/proxy/thumbnail | Streams authenticated file downloads and image thumbnails |
| POST /api/share/create & /api/share/unlock | Issues expiring/password-protected opaque share URLs and unlocks gated shares |
| GET /api/cloud/recycle & POST /restore | Lists soft-deleted items and restores files from Recycle Bin |
Billing, 2FA/DPDP & Remote MCP Routes
| Method & Path | Purpose |
|---|---|
| GET /api/subscriptions/plans & /invoices | Fetches available plans, pricing tiers, and billing receipts |
| POST /api/user/2fa/setup & /enable & /disable | Manages TOTP two-factor authentication |
| GET /api/user/export-data & POST /api/user/dpdpa/nominate | DPDP Act 2023 full JSON export and data fiduciary nominee controls |
| GET / POST / DELETE /api/mcp/tokens | Creates, lists, and revokes scoped kc_mcp_... Bearer tokens |
| GET /.well-known/oauth-authorization-server | RFC 8414 OAuth 2.1 PKCE metadata for ChatGPT, Claude, Gemini & Indus |
| POST /mcp | Streamable HTTP MCP JSON-RPC 2.0 endpoint exposing all 9 KeepCloud tools |
Fetch Connected Accounts (cURL)
curl -X GET https://api.keepcloud.in/api/cloud/accounts \
-H "Authorization: Bearer YOUR_USER_JWT"Frequently Asked Questions
Which endpoints accept kc_mcp_... tokens instead of user session JWTs?
Scoped kc_mcp_... tokens are strictly restricted to the /mcp JSON-RPC endpoint and cannot call account billing, credential management, or deletion APIs.