Asset Hosting · Developer API
Put files on the CDN from your own code.
Upload, list, inspect and delete files with a Bearer key. Every upload reply carries the final CDN URL — there is no second step and nothing to poll.
Authentication and conventions
Mint a key under Asset Hosting → API keys (it is shown once) and send it on every request:
Authorization: Bearer dba_your_key
- • Base URL
https://www.drivebird.com/api/assets/v1. JSON in, JSON out. - • Success:
{"data": …}plusmetaon lists. Failure:{"data": null, "errors": ["…"], "code": "MACHINE-CODE"}— branch oncode. - • A file that is not yours, was deleted or never existed answers 410 Gone — DriveBird never answers 404.
- • Sizes are bytes; dates are
YYYY-MM-DD HH:MMin IST.
Limits
- • Up to 200 MB per file.
- • Allowed extensions: pdf, doc, docx, odt, xls, xlsx, ods, ppt, pptx, txt, json, mp3, wav, m4a, aac, mp4, mkv, mov, wmv, avi, webm, 3gp, png, jpg, jpeg, gif, ico, webp, tiff, psd, bmp, svg, ai, ttf, eot, otf, woff, woff2.
- • Your wallet must hold at least ₹50 for an upload to be accepted.
- • 120 requests per minute per address.
Endpoints
/api/assets/v1/me
— Your account — status, usage, wallet, pricing
curl
curl https://www.drivebird.com/api/assets/v1/me -H "Authorization: Bearer dba_your_key"
PHP (Laravel Http)
$me = Http::withToken($key)->get('https://www.drivebird.com/api/assets/v1/me')->json('data');
Response
{"data": {"client": {"id": 5, "name": "Example Site", "status": "ACTIVE", "default_bucket": "www.example.com"}, "usage": {"files_count": 3112, "bytes_used": 214748364, "daily_rent_paise": 3, "monthly_estimate_paise": 100}, "wallet": {"balance_paise": 54956, "min_balance_to_upload_paise": 5000}, "arrears": {"paise": 0, "since": null, "deadline": null}, "pricing": {"per_gb_month_paise": 500, "max_file_bytes": 209715200, "allowed_extensions": ["pdf", "jpg", "…"], "grace_days": 30}}}
/api/assets/v1/files
— Upload a file (multipart) — the reply carries the final CDN URL
Fields: file (required unless source_url), bucket (optional — defaults to your account's default bucket; [a-z0-9][a-z0-9.-]{0,49}), name (optional display name), hash (optional md5 of the bytes — a mismatch discards the upload). Answers 201.
curl
curl https://www.drivebird.com/api/assets/v1/files -H "Authorization: Bearer dba_your_key" \
-F "file=@hero.jpg" -F "bucket=www.example.com" -F "hash=9e107d9d372bb6826bd81d3542a419d6"
PHP (Laravel Http)
$file = Http::withToken($key)
->attach('file', file_get_contents($path), basename($path))
->post('https://www.drivebird.com/api/assets/v1/files', ['bucket' => 'www.example.com'])
->json('data'); // $file['url'] is live immediately
Response
{"data": {"id": 9155, "url": "https://cdn.drivebird.com/storage/5/www.example.com/20260908-120000-027-hero.jpg", "bucket": "www.example.com", "name": "hero.jpg", "extension": "jpg", "mime": "image/jpeg", "size_bytes": 184201, "hash": "9e107d9d372bb6826bd81d3542a419d6", "status": "ACTIVE", "created_at": "2026-09-08 12:00"}}
/api/assets/v1/files
— Upload from a URL (JSON) — we download it for you
The URL must answer HTTP 200 with the file body and end in an allowed extension. This is the successor of the old saveToLocal call.
curl
curl https://www.drivebird.com/api/assets/v1/files -H "Authorization: Bearer dba_your_key" -H "Content-Type: application/json" \
-d '{"source_url": "https://www.example.com/uploads/hero.jpg", "bucket": "www.example.com"}'
PHP (Laravel Http)
$file = Http::withToken($key)->post('https://www.drivebird.com/api/assets/v1/files', [
'source_url' => 'https://www.example.com/uploads/hero.jpg',
'bucket' => 'www.example.com',
])->json('data');
Response
{"data": {"id": 9155, "url": "https://cdn.drivebird.com/storage/5/www.example.com/20260908-120000-027-hero.jpg", "bucket": "www.example.com", "name": "hero.jpg", "extension": "jpg", "mime": "image/jpeg", "size_bytes": 184201, "hash": "9e107d9d372bb6826bd81d3542a419d6", "status": "ACTIVE", "created_at": "2026-09-08 12:00"}}
/api/assets/v1/files?bucket=&page=&per_page=
— List your live files, newest first
per_page is clamped to 1–100 (default 25); page starts at 1. Deleted files are not listed.
curl
curl "https://www.drivebird.com/api/assets/v1/files?bucket=www.example.com&per_page=50" -H "Authorization: Bearer dba_your_key"
PHP (Laravel Http)
$page = Http::withToken($key)->get('https://www.drivebird.com/api/assets/v1/files', ['bucket' => 'www.example.com', 'per_page' => 50])->json();
Response
{"data": [ …file… ], "meta": {"page": 1, "per_page": 50, "total": 3112, "last_page": 63}}
/api/assets/v1/files/{id}
— One file
curl
curl https://www.drivebird.com/api/assets/v1/files/9155 -H "Authorization: Bearer dba_your_key"
PHP (Laravel Http)
$file = Http::withToken($key)->get('https://www.drivebird.com/api/assets/v1/files/9155')->json('data');
Response
{"data": {"id": 9155, "url": "https://cdn.drivebird.com/storage/5/www.example.com/20260908-120000-027-hero.jpg", "bucket": "www.example.com", "name": "hero.jpg", "extension": "jpg", "mime": "image/jpeg", "size_bytes": 184201, "hash": "9e107d9d372bb6826bd81d3542a419d6", "status": "ACTIVE", "created_at": "2026-09-08 12:00"}}
/api/assets/v1/files/{id}
— Delete a file — it stops being served and billed at once
Answers 202. Idempotent — deleting twice is still 202. The object leaves the CDN within minutes; the successor of the old deleteFromCDN call.
curl
curl -X DELETE https://www.drivebird.com/api/assets/v1/files/9155 -H "Authorization: Bearer dba_your_key"
PHP (Laravel Http)
Http::withToken($key)->delete('https://www.drivebird.com/api/assets/v1/files/9155'); // 202
Response
{"data": {"id": 9155, "status": "DELETED"}}
/api/assets/v1/usage?days=30
— Daily billing snapshots (1–90 days)
curl
curl "https://www.drivebird.com/api/assets/v1/usage?days=30" -H "Authorization: Bearer dba_your_key"
PHP (Laravel Http)
$days = Http::withToken($key)->get('https://www.drivebird.com/api/assets/v1/usage', ['days' => 30])->json('data');
Response
{"data": [{"usage_date": "2026-09-08", "bytes_used": 214748364, "files_count": 3112, "rent_paise": 3, "outcome": "CHARGED"}], "meta": {"days": 30, "count": 1}}
Error codes
| Status | code | When |
|---|---|---|
| 401 | UNAUTHENTICATED | The Authorization: Bearer header is missing, malformed, or the key was revoked. |
| 403 | CLIENT-CLOSED | The client account is closed; its files were deleted. Contact DriveBird Network to reopen. |
| 402 | UPLOADS-PAUSED | Storage rent is unpaid (arrears). Downloads and deletes keep working; uploads resume once the wallet covers the arrears. |
| 402 | LOW-BALANCE | The DriveBird wallet holds less than the upload floor. Top up at /account/wallet. |
| 422 | VALIDATION | A parameter is missing or malformed (see errors[]). |
| 422 | HASH-MISMATCH | The optional md5 `hash` you sent does not match the bytes received; nothing was stored. |
| 422 | SOURCE-UNREACHABLE | The `source_url` did not answer HTTP 200 with a file body. |
| 422 | BUCKET-INVALID | The bucket name is not [a-z0-9][a-z0-9.-]{0,49}. |
| 413 | FILE-TOO-LARGE | The file is empty or larger than the per-file ceiling. |
| 415 | EXTENSION-NOT-ALLOWED | The file extension is not on the allow-list. |
| 502 | STORAGE-FAILED | The object store refused the bytes; nothing was saved — retry. |
| 410 | GONE | No such file for this client (deleted, purged, or never yours). DriveBird never answers 404. |
| 429 | RATE-LIMITED | More than 120 requests in a minute from one address. |
Billing
- • ₹5 per GB per month, measured once a day on your live files and charged for that day from your DriveBird wallet. A day under one paisa is free. No upload fee; downloads are never charged.
- • A day the wallet cannot cover becomes arrears: uploads answer 402
UPLOADS-PAUSEDwhile reads and deletes keep working. A top-up settles the arrears and re-activates uploads automatically. - • After 30 days of unpaid arrears the account is closed and its files removed; you are emailed well before that.
GET /mereports the arrears and the deadline.
Migrating from the old assets.drivebird.com API
The retired POST /api {model, method, arg} contract with an email + token maps one-to-one:
- •
File.saveToLocal {bucket, hash, url}→POST /files {source_url, bucket, hash}— the reply'sdata.urlis already the final CDN URL. - •
File.getCDNUrl {cdn_id}→ not needed any more;GET /files/{id}if you want to re-read a file. - •
File.deleteFromCDN {cdn_id}→DELETE /files/{id}. Your oldcdn_idvalues ARE the new file ids. - • The old email + token pair is replaced by a Bearer key you mint yourself; the old tokens no longer work.
More from DriveBird
Free tools and products on the same account.