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.

Create an account → mint a key API calls are free — you pay only for the space you host.

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

Limits

Endpoints

GET /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}}}
POST /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"}}
POST /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"}}
GET /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}}
GET /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"}}
DELETE /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"}}
GET /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

StatuscodeWhen
401UNAUTHENTICATEDThe Authorization: Bearer header is missing, malformed, or the key was revoked.
403CLIENT-CLOSEDThe client account is closed; its files were deleted. Contact DriveBird Network to reopen.
402UPLOADS-PAUSEDStorage rent is unpaid (arrears). Downloads and deletes keep working; uploads resume once the wallet covers the arrears.
402LOW-BALANCEThe DriveBird wallet holds less than the upload floor. Top up at /account/wallet.
422VALIDATIONA parameter is missing or malformed (see errors[]).
422HASH-MISMATCHThe optional md5 `hash` you sent does not match the bytes received; nothing was stored.
422SOURCE-UNREACHABLEThe `source_url` did not answer HTTP 200 with a file body.
422BUCKET-INVALIDThe bucket name is not [a-z0-9][a-z0-9.-]{0,49}.
413FILE-TOO-LARGEThe file is empty or larger than the per-file ceiling.
415EXTENSION-NOT-ALLOWEDThe file extension is not on the allow-list.
502STORAGE-FAILEDThe object store refused the bytes; nothing was saved — retry.
410GONENo such file for this client (deleted, purged, or never yours). DriveBird never answers 404.
429RATE-LIMITEDMore than 120 requests in a minute from one address.

Billing

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's data.url is 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 old cdn_id values 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.