API Documentation
Agentic-first file storage for AI agents and developers
Base URL: https://www.easybits.cloud/api/v2
Quick Start
- Create an account at easybits.cloud
- Go to Developer Dashboard and create an API key
- Make your first request:
Authentication
All API requests require a Bearer token in the Authorization header.
SDK
The typed SDK wraps the entire REST API. Install and use it in any Node.js/Bun/Deno project.
All Methods
Files
| Method | Description |
|---|---|
| listFiles(params?) | List files (paginated) |
| getFile(fileId) | Get file + download URL |
| uploadFile(params) | Create file + get upload URL |
| updateFile(fileId, params) | Update name, access, metadata, status |
| deleteFile(fileId) | Soft-delete (7-day retention) |
| restoreFile(fileId) | Restore from trash |
| listDeletedFiles(params?) | List trash with days until purge |
| searchFiles(query) | AI-powered natural language search |
| duplicateFile(fileId, name?) | Copy file (new storage object) |
| listPermissions(fileId) | List sharing permissions |
Bulk Operations
| Method | Description |
|---|---|
| bulkUploadFiles(items) | Upload up to 20 files at once |
| bulkDeleteFiles(fileIds) | Delete up to 100 files at once |
Images
| Method | Description |
|---|---|
| optimizeImage(params) | Convert to WebP/AVIF |
| transformImage(params) | Resize, rotate, flip, convert, grayscale |
Sharing
| Method | Description |
|---|---|
| shareFile(params) | Share with another user by email |
| generateShareToken(fileId, expiresIn?) | Temporary download URL |
| listShareTokens(params?) | List tokens (paginated) |
Webhooks
| Method | Description |
|---|---|
| listWebhooks() | List configured webhooks |
| createWebhook(params) | Create webhook (returns secret once) |
| getWebhook(webhookId) | Get webhook details |
| updateWebhook(webhookId, params) | Update URL, events, or status |
| deleteWebhook(webhookId) | Delete permanently |
Websites
| Method | Description |
|---|---|
| listWebsites() | List static websites |
| createWebsite(name) | Create website, get id + URL |
| getWebsite(websiteId) | Get website details |
| updateWebsite(websiteId, params) | Update name/status |
| deleteWebsite(websiteId) | Delete website + files |
Deploy files by uploading with fileName: "sites/{websiteId}/path" — see Websites section for full example.
Account
| Method | Description |
|---|---|
| getUsageStats() | Storage, file counts, plan info |
| listProviders() | Storage providers |
| listKeys() | API keys |
Error Handling
Files
/filesList your files (paginated)
| assetId | string | Filter by asset ID |
| limit | number | Max results (default 50, max 100) |
| cursor | string | Pagination cursor |
| status | string | Set to 'DELETED' to list deleted files |
/files/:fileIdGet file details with a temporary download URL
/filesCreate a file record and get a presigned upload URL
| fileName | string | Required |
| contentType | string | MIME type (required) |
| size | number | File size in bytes (required, 1B–5GB) |
| access | string | 'public' or 'private' (default) |
| region | string | 'LATAM', 'US', or 'EU' |
Upload bytes via PUT to putUrl, then PATCH the file status to 'DONE'.
/files/:fileIdUpdate file name, access level, metadata, or status
| name | string | New file name |
| access | string | 'public' or 'private' |
| metadata | object | Key-value pairs (merged, max 10KB) |
| status | string | Only 'DONE' (from PENDING) |
/files/:fileIdSoft-delete a file (7-day retention)
/files/:fileId/restoreRestore a soft-deleted file
/files/search?q=...AI-powered natural language file search (requires AI key)
| q | string | Natural language query (required) |
/files/:fileId/duplicateCreate a copy of an existing file (new storage object)
| name | string | Name for the copy (optional, defaults to 'Copy of ...') |
/files/:fileId/permissionsList sharing permissions for a file
Bulk Operations
/files/bulk-uploadCreate multiple file records and get presigned upload URLs (max 20)
| items | array | Array of { fileName, contentType, size, access? } |
Each file must be uploaded via PUT to its putUrl, then status set to DONE.
/files/bulk-deleteSoft-delete multiple files at once (max 100)
| fileIds | string[] | Array of file IDs to delete |
Images
/files/:fileId/optimizeConvert image to WebP or AVIF (creates a new file)
| format | string | 'webp' (default) or 'avif' |
| quality | number | 1–100 (default: 80 webp, 50 avif) |
/files/:fileId/transformResize, crop, rotate, flip, or convert an image (creates a new file)
| width | number | Target width in px |
| height | number | Target height in px |
| fit | string | 'cover', 'contain', 'fill', 'inside', 'outside' |
| format | string | 'webp', 'avif', 'png', 'jpeg' |
| quality | number | 1–100 |
| rotate | number | Degrees |
| flip | boolean | Vertical flip |
| grayscale | boolean | Convert to grayscale |
Webhooks
Receive real-time POST notifications when events occur. Payloads are signed with HMAC SHA-256 via the X-Easybits-Signature header. Webhooks auto-pause after 5 consecutive delivery failures.
file.created, file.updated, file.deleted, file.restored, website.created, website.deleted/webhooksList your configured webhooks
/webhooksCreate a webhook. The secret is only returned on creation — save it.
| url | string | HTTPS URL to receive POST notifications (required) |
| events | string[] | Events to subscribe to (required) |
Max 10 webhooks per account. URL must use HTTPS.
/webhooks/:webhookIdGet webhook details (excluding secret)
/webhooks/:webhookIdUpdate webhook URL, events, or status
| url | string | New HTTPS URL |
| events | string[] | New events list |
| status | string | 'ACTIVE' or 'PAUSED'. Reactivating resets fail counter. |
/webhooks/:webhookIdPermanently delete a webhook
Verifying Signatures
Payload Format
Websites
- Create a website — you get an
idand a URL likehttps://my-site.easybits.cloud - Upload files with
fileNameset tosites/{websiteId}/path(e.g.sites/{id}/index.html) - PUT the bytes to each
putUrl, then set status to DONE - Your site is live — SPA fallback to
index.htmlis built-in
Deploy Example
Endpoints
/websitesList your static websites
/websitesCreate a new website
| name | string | Website name (required) |
/websites/:websiteIdGet website details
/websites/:websiteIdUpdate website name or status
| name | string | New name |
| status | string | e.g. 'DEPLOYED' |
/websites/:websiteIdDelete website and soft-delete all its files
Account & Usage
/usageGet account usage statistics: storage, file counts, plan info
/providersList your configured storage providers
/keysList your API keys (session auth only)
Errors & Rate Limits
| Status | Meaning |
|---|---|
| 400 | Bad request (invalid params) |
| 401 | Unauthorized (missing/invalid API key) |
| 403 | Forbidden (insufficient scope) |
| 404 | Resource not found |
| 429 | Rate limited (too many requests) |
| 500 | Server error |
All error responses include a JSON body: {"error": "message"}
Rate limits vary by plan. Free tier: 100 requests/minute. Pro: 1,000/minute. Business: 10,000/minute.