Skip to content
LumiaDB LumiaDB

Developer API

API update (April 9, 2026)

  • HEAD support for availability checks and reading response headers.
  • OPTIONS and CORS support for browser-based apps.
  • JSON error responses for API clients. Browsers still get the HTML error page.
  • ENOSW files at GET /enosw/<filename>.

Existing download URLs haven't changed: GET /<model>/<filename> for FFU files, GET /<model>/<model>.zip for emergency packages, and GET /SBL3/<filename> for SBL3 files.

The LumiaDB firmware collection is hosted on the Internet Archive, spread across several Archive items. The API gives you one stable endpoint that looks through all of them for you.

You can build tools on it, such as an app that downloads and flashes firmware automatically, without tracking where each file is stored or whether direct links change. It uses the same logic as the download buttons on this site.

API Endpoint

All API requests should be made to the following base URL:

https://api.lumiadb.com

The download endpoint is path-based: you pass the exact file path, and LumiaDB resolves it across the archive mirrors. ENOSW files use the /enosw/ prefix. GET returns the file, HEAD checks it without downloading, and OPTIONS answers browser preflight requests. To search devices or list available files, use database.json, described below.

Response Codes

Status Description
200 OK The file was found. A GET request returns the file body.
204 No Content Returned for OPTIONS preflight requests from browser applications.
206 Partial Content Returned when the upstream mirror honors a Range request, so downloads can resume or fetch part of a file.
304 Not Modified Returned when conditional headers such as If-None-Match or If-Modified-Since match the upstream file.
404 Not Found The file or model wasn't found on any mirror. Browsers get the HTML error page; API clients get a JSON error.
405 Method Not Allowed Only GET, HEAD, and OPTIONS are supported.
412 / 416 Passed through from the mirror when an If-Match/If-Unmodified-Since precondition fails (412) or the Range is outside the file (416). Other mirrors are not tried, because they would answer the same way.
500 Error An unexpected failure inside the worker. The body is a JSON error with category internal_error. This should be rare.
503 Service Unavailable The path may be valid, but Internet Archive was unavailable, Cloudflare couldn't reach the mirrors, or both. The worker gives up after about 20 seconds of failover, so a slow outage answers with 503 instead of hanging.

Request Methods

  • GET: Downloads the file. Existing integrations work unchanged.
  • HEAD: Runs the same mirror lookup without downloading the body. Use it to check availability, read headers, or validate a cache.
  • OPTIONS: Answers browser CORS preflight, so web apps can call the API directly from the browser.

Common request headers such as Range, If-None-Match, If-Modified-Since, and other conditional headers are passed through to the upstream mirror.

Error Format

Errors are reported differently depending on the client:

  • Browser requests that prefer text/html get the LumiaDB error page.
  • Other clients get a JSON body for 404 and 405 responses, which is easier to log.
  • A 404 body also has a reason (typo, folder, listed or unknown) and up to three suggestions: real file paths with a close name, such as the right extension or the model folder with its hyphen.
  • Temporary upstream failures return 503 with a source field such as internet_archive, cloudflare, or cloudflare-and-internet-archive.
{
  "error": "Service Unavailable",
  "category": "upstream_unavailable",
  "source": "internet_archive",
  "message": "Internet Archive's servers returned errors for this download, usually during maintenance or heavy load. Try again in a few minutes.",
  "path": "/RM-1085/example.ffu",
  "failures": [
    {
      "name": "db1",
      "collection": "lumiadb",
      "status": "Server unavailable"
    }
  ]
}

Response Headers

Responses can carry these diagnostic headers, which help with logging and support requests:

  • X-LumiaDB-Mirror: The mirror that ultimately served the file.
  • X-LumiaDB-Collection: The Internet Archive collection used for the successful response.
  • X-LumiaDB-Attempts: How many mirrors were tried before the request succeeded.
  • X-LumiaDB-Index: hit if LumiaDB's file index knew which collection holds the file, so the request went straight there; miss if every mirror had to be tried in turn.
  • Retry-After: Included on 503 responses to suggest when to retry.
  • X-LumiaDB-Error-Category: Set on error responses to values such as not_found, upstream_unavailable, or internal_error.
  • X-LumiaDB-Error-Source: Set on upstream outage responses to indicate whether the issue came from internet_archive, cloudflare, or both.

Usage & Endpoints

These URL formats are stable. ENOSW files use the /enosw/ path.

1. FFU Files

To get a download link for a specific firmware (FFU) file, use the following structure:

/<model>/<filename>
  • <model>: The device model, e.g., RM-1085.
  • <filename>: The exact firmware filename.

Example:

https://api.lumiadb.com/RM-1085/RM1085_1078.0053.10586.13169.12742.034EE8_retail_prod_signed.ffu

2. Emergency Files

Emergency files for a specific model are bundled into a single .zip archive. The filename is the model name itself, with a .zip extension.

/<model>/<model>.zip

Example:

https://api.lumiadb.com/RM-1085/RM-1085.zip

3. Engineering SBL3 Files

Engineering SBL3 files live under /SBL3/. The filename names the compatible model(s).

/SBL3/<sbl3-filename>

Available Files:

  • Engineering-SBL3-Lumia-1020.bin
  • Engineering-SBL3-Lumia-520-620-625-720-1320.bin
  • Engineering-SBL3-Lumia-810.bin
  • Engineering-SBL3-Lumia-820.bin
  • Engineering-SBL3-Lumia-822.bin
  • Engineering-SBL3-Lumia-920-928.bin
  • Engineering-SBL3-Lumia-925.bin

Example:

https://api.lumiadb.com/SBL3/Engineering-SBL3-Lumia-1020.bin

4. ENOSW Files

ENOSW files are in their own archive collection and served under the /enosw/ prefix.

Full archive collection: https://archive.org/details/lumia-enosw.

/enosw/<filename>

Example:

https://api.lumiadb.com/enosw/RM1017_1068.0023.9651.12400.207.41_enosw-wim-signed_684493.secwim

5. Full Database Access (JSON)

The download API has no search endpoint. To find available firmware, parse the raw database file: a JSON dataset of devices, product codes, and filenames.

File URL: https://lumiadb.com/database.json

File Structure

The database is a JSON array. Each object is one device variant:

{
  "manufacturer": "Microsoft",
  "hardwareModel": "RM-1109",
  "phoneModel": "Lumia 640 Dual SIM DTV",
  "variant": "Brazil",
  "image": "/images/lumia640.png",
  "productCodes": [
    "059X150",
    "059X207"
  ],
  "specs": {
    "released": "March 2015",
    "SoC": "Snapdragon 400",
    "GPU": "Adreno 305",
    "RAM": "1GB",
    "storage": "8GB",
    "display": "5.0\" IPS LCD (720x1280)",
    "camera": "8MP rear + 1MP front",
    "battery": "2500 mAh",
    "dimensions": "141.3 x 72.2 x 8.8 mm"
  },
  "firmwares": [
    {
      "packageTitle": "RM-1109 VAR LTA BR CV",
      "firmware": "02166.00000.15103.05001",
      "os": "Windows Phone 8.1 Update 2 - 8.10.15148",
      "productCode": "059X150",
      "ffuFilename": "RM1109_02177.00000.15184.36002_RETAIL_prod_signed_1000_0247E9_000-BR.ffu"
    }
  ]
}

Key Fields

Field Name Description
hardwareModel The hardware model code (e.g., RM-1109). The first part of every download path.
phoneModel The commercial name of the device (e.g., Lumia 640 Dual SIM DTV).
firmwares Every available firmware for this variant.
firmwares[].ffuFilename The exact FFU filename, which goes in the download URL after the model.
firmwares[].productCode The product code (e.g., 059X150). Use it to match a specific variant.

Searching Devices & Listing Files

The download endpoint fetches a file when you already know its path. To search devices, look up a product code, or list every file for a model, load https://lumiadb.com/database.json and build a small lookup on top of it.

Recommended approach

  • Search devices by indexing fields such as hardwareModel, phoneModel, manufacturer, variant, and productCodes from database.json.
  • List files for one model by filtering hardwareModel and mapping each firmwares[].ffuFilename into https://api.lumiadb.com/<model>/<filename>.
const database = await fetch('https://lumiadb.com/database.json').then(response => response.json());

function searchDevices(query) {
  const normalizedQuery = query.trim().toLowerCase();

  return database.filter(device => {
    const fields = [
      device.hardwareModel,
      device.phoneModel,
      device.manufacturer,
      device.variant,
      ...(device.productCodes || [])
    ];

    return fields.some(value => String(value || '').toLowerCase().includes(normalizedQuery));
  });
}

function listDownloadsForModel(model) {
  return database
    .filter(device => device.hardwareModel === model)
    .flatMap(device => [
      ...(device.firmwares || []).map(firmware => ({
        type: 'ffu',
        productCode: firmware.productCode,
        url: `https://api.lumiadb.com/${device.hardwareModel}/${firmware.ffuFilename}`
      })),
      {
        type: 'emergency',
        url: `https://api.lumiadb.com/${device.hardwareModel}/${device.hardwareModel}.zip`
      }
    ]);
}

Missing Product Codes

Not every product code has a firmware file. When one is missing, have your app fall back to another firmware for the same hardwareModel, such as a "Global" variant, so the device can still be flashed.

Integration Example

This JavaScript snippet fetches the database, finds the FFU for a product code, and builds the download URL.

// 1. Define your target device and product code
const targetProductCode = '059X150';

// 2. Fetch the database
fetch('https://lumiadb.com/database.json')
  .then(response => response.json())
  .then(data => {
    
    // 3. Find the device entry that contains this product code
    const device = data.find(item => 
      item.firmwares && item.firmwares.some(fw => fw.productCode === targetProductCode)
    );

    if (device) {
      // 4. Extract the specific firmware details
      const firmware = device.firmwares.find(fw => fw.productCode === targetProductCode);
      
      // 5. Construct the download URL: https://api.lumiadb.com/{model}/{filename}
      const downloadUrl = `https://api.lumiadb.com/${device.hardwareModel}/${firmware.ffuFilename}`;
      
      console.log('Download URL found:', downloadUrl);
    } else {
      console.error('Product code not found. Attempting fallback...');
      // Implement fallback logic here (e.g., search by hardwareModel only)
    }
  })
  .catch(err => console.error('Error fetching database:', err));

Rate Limiting & Fair Use

There are no strict rate limits right now, but please use the API fairly. Cache results in your app where it makes sense and avoid bursts of requests. To check whether a file exists or read its headers, use HEAD instead of downloading the whole file. We reserve the right to block any IP address or application that abuses the service.

Disclaimer

This API is provided "as is" without warranty of any kind. LumiaDB is not responsible for how you use the files obtained through this service. Flashing firmware carries inherent risks, and you assume full responsibility for any potential damage to your device.