Introduction
Welcome to the ZeroDrive API reference.
API Reference Introduction
Complete reference documentation for the ZeroDrive REST API.
Base URL
All endpoints are relative to this base URL.
API Overview
The ZeroDrive API is organized into the following categories:
Files
| Endpoint | Method | Description |
|---|---|---|
/files | GET | List all files |
/files/upload | POST | Upload files directly |
/files/{fileId} | GET | Get file details |
/files/{fileId} | PATCH | Update file (rename, star) |
/files/{fileId} | DELETE | Delete file |
/files/{fileId}/download | GET | Get download URL |
/files/{fileId}/move | PUT | Move file to folder |
/files/{fileId}/share | POST | Share file with users |
/files/{fileId}/signed-url | GET | Generate signed URL |
/files/{fileId}/fetch | GET | Fetch file content |
Folders
| Endpoint | Method | Description |
|---|---|---|
/folders | GET | List all folders |
/folders/create | POST | Create folder |
/folders/{folderId} | GET | Get folder details |
/folders/{folderId} | PATCH | Update folder |
/folders/{folderId} | DELETE | Delete folder |
/folders/{folderId}/move | PUT | Move folder |
/folders/{folderId}/share | POST | Share folder |
Workspaces
| Endpoint | Method | Description |
|---|---|---|
/workspaces | GET | List workspaces |
/workspaces | POST | Create workspace |
/workspaces/{workspaceId} | GET | Get workspace |
/workspaces/{workspaceId} | PATCH | Update workspace |
/workspaces/{workspaceId} | DELETE | Delete workspace |
/workspaces/{workspaceId}/members | GET | List members |
/workspaces/{workspaceId}/members | POST | Add member |
/workspaces/{workspaceId}/members/{memberId} | DELETE | Remove member |
/workspaces/{workspaceId}/files | GET | List workspace files |
/workspaces/{workspaceId}/files/upload | POST | Upload file to workspace |
/workspaces/{workspaceId}/folders | GET | List workspace folders |
/workspaces/{workspaceId}/folders | POST | Create folder in workspace |
/workspaces/{workspaceId}/folders/{folderId} | GET | Get workspace folder |
/workspaces/{workspaceId}/folders/{folderId} | PATCH | Update workspace folder |
/workspaces/{workspaceId}/folders/{folderId} | DELETE | Delete workspace folder |
Trash
| Endpoint | Method | Description |
|---|---|---|
/trash | GET | List trashed items |
/trash/restore | POST | Restore items |
/trash/empty | DELETE | Empty trash |
Request Format
Headers
All authenticated requests require:
For JSON body requests:
For file uploads:
Query Parameters
Common query parameters for list endpoints:
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Max items per page |
offset | integer | 0 | Items to skip |
sortBy | string | updatedAt | Sort field |
sortOrder | string | desc | asc or desc |
Request Body
JSON request bodies should be properly formatted:
Response Format
Success Response
Error Response
Pagination
List endpoints return paginated results:
HTTP Status Codes
| Code | Name | Description |
|---|---|---|
200 | OK | Request succeeded |
201 | Created | Resource created |
204 | No Content | Success with no body |
400 | Bad Request | Invalid request data |
401 | Unauthorized | Missing/invalid auth |
403 | Forbidden | Insufficient permissions |
404 | Not Found | Resource doesn't exist |
409 | Conflict | Resource conflict |
413 | Payload Too Large | File/storage limit exceeded |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Server error |
Error Codes
Common error codes returned in error responses:
| Code | Description |
|---|---|
UNAUTHORIZED | Authentication required |
FORBIDDEN | Permission denied |
NOT_FOUND | Resource not found |
VALIDATION_ERROR | Invalid input data |
STORAGE_EXCEEDED | Storage quota exceeded |
FILE_TOO_LARGE | File size limit exceeded |
RATE_LIMITED | Too many requests |
DUPLICATE | Resource already exists |
TOKEN_EXPIRED | Auth token expired |
Rate Limits
| Operation | Limit | Window |
|---|---|---|
| Read (GET) | 100 | 1 minute |
| Write (POST/PUT/PATCH/DELETE) | 30 | 1 minute |
When rate limited, you'll receive:
Headers included:
CORS
The API supports CORS for browser-based applications. Allowed origins must be configured in your account settings.
Webhooks
Webhooks can be configured to receive real-time notifications for:
- File uploads
- File shares
- Workspace events
Configure webhooks in Settings > Developer > Webhooks.
SDKs & Tools
Official Tools
- cURL: All examples work with cURL
- Postman: Import our Postman collection
Community SDKs
Community-maintained SDKs may be available. Check GitHub for options.
Changelog
v1 (Current)
- Initial API release
- File and folder management
- Workspace collaboration
- Trash management
- API key authentication
Next: Authentication