Databases & storage
Object storage (buckets)
Create S3-compatible buckets, manage files in the dashboard or via the Storage API with presigned URLs, and understand storage quotas and errors.
Each workspace gets S3-compatible buckets, isolated from other workspaces. You never handle raw S3 keys: the API issues short-lived presigned URLs, and file bytes go directly to storage.
In the dashboard
- Storage → New bucket. Name: 3–63 lowercase letters, numbers, dots and hyphens, starting and ending with a letter or number, no
.., not shaped like an IP. Unique per workspace. - Open a bucket to Upload files, download or delete. Uploading an existing name asks before replacing.
Deleting a bucket permanently deletes every file in it.
Storage API
Full reference with Node.js, Python and cURL examples: /docs.
- Team → API tokens → Create token (owners and admins) with only the permissions needed: Read storage (
storage:read), Write files (storage:write), Manage buckets (storage:buckets). - Call
https://api.marvx.io/v1withAuthorization: Bearer mvw_…. Noorg_idneeded. - Upload = request an upload URL for the exact size, then
PUTthe bytes to it with the returned headers.
curl -s -X POST "https://api.marvx.io/v1/storage/buckets/$BUCKET_ID/upload-url" \
-H "Authorization: Bearer $MARVX_TOKEN" -H "Content-Type: application/json" \
-d '{"key": "reports/q3.pdf", "content_length": 73400, "content_type": "application/pdf"}'| Endpoint | Purpose |
|---|---|
GET/POST /storage/buckets | List / create ({"name"}) |
DELETE /storage/buckets/{id} | Delete bucket and files |
POST /storage/buckets/{id}/upload-url | {"key","content_length","content_type"} |
GET /storage/buckets/{id}/files | List files, total size |
POST /storage/buckets/{id}/download-url | {"key"} |
DELETE /storage/buckets/{id}/files?key=… | Delete a file |
GET /orgs/{org_id}/storage/usage | Used and quota bytes |
- Presigned URLs expire after 15 minutes; request fresh ones.
- The
PUTmust send exactlycontent_lengthbytes with the sameContent-Type. Max 5 GB per upload. - Keys: relative paths up to 1024 bytes, no leading
/, no./..segments. - Responses are
{"data": …}; errors{"error": {"code", "message"}}. - Browser uploads to presigned URLs depend on the storage CORS settings; if they fail with CORS errors, upload from your backend or contact support.
Quotas
Free 1 GB, Starter 10 GB, Pro 50 GB, Enterprise 500 GB. Paid plans can add +10 GB storage ($2/month each) in Billing → Add-ons. An upload that would exceed the quota is refused with 402 quota_exceeded ("Storage is full"). Freed space shows up within about a minute.
Errors
| Code | Meaning |
|---|---|
| 401 | Token invalid, expired or revoked |
403 insufficient_scope | Missing scope (required_scope names it); workspace tokens only reach the Storage API |
| 404 | Unknown bucket, or another workspace's org_id |
402 quota_exceeded | Storage full |
422 validation_error | Bad bucket name or key |
429 rate_limited | Too many requests for this token; retry after 60 s |