---
title: Notehub API Requests for DFU
description: The Notehub API provides methods for initiating and monitoring over-the-air firmware updates using Blues Notecard.
source_url: https://dev.blues.io/notehub/host-firmware-updates/notehub-api-requests-for-dfu/
canonical_url: https://dev.blues.io/notehub/host-firmware-updates/notehub-api-requests-for-dfu/
markdown_url: https://dev.blues.io/notehub/host-firmware-updates/notehub-api-requests-for-dfu.md
---

# Notehub API Requests for DFU

Along with using the Notehub UI to manage firmware releases, the [Notehub API](https://dev.blues.io/api-reference/notehub-api.md) provides methods for initiating and monitoring both Notecard and host MCU firmware updates.

## Get Available Firmware API

The [Get Available Firmware API](https://dev.blues.io/api-reference/notehub-api/project-api.md#get-available-firmware) allows you to retrieve information about available host and Notecard firmware binaries.

For example, to retrieve host firmware binaries, you would issue this request:

```bash
curl -X GET 
     -L 'https://api.notefile.net/v1/projects/<projectUID>/fleets/firmware?firmwareType=host' 
     -H 'Authorization: Bearer <access_token>'
```

The response includes an array with information from the available firmware binaries:

```json
[
  {
    "filename": "notecard-wl-7.2.2.16518$20240410043100.bin",
    "version": "notecard-wl-7.2.2",
    "MD5": "8c1f7737a134f108dab02ec6d6b4bf25",
    "organization": "Blues Wireless",
    "type": "notecard",
    "created": "1712780230",
    "target": "wl"
  },
  ...
]
```

## Create DFU Action API

Once you know which firmware binaries are available, you can use the [Perform DFU Action API](https://dev.blues.io/api-reference/notehub-api/project-api.md#perform-dfu-action) to update (or cancel) host MCU and/or Notecard firmware updates.

The following example will initiate a Notecard firmware update for relevant devices in the selected project:

```bash
curl -X POST 
     -L 'https://api.notefile.net/v1/projects/<projectUID>/dfu/notecard/update' 
     -H 'Authorization: Bearer <access_token>' 
     -d '{"filename":"notecard-u5-8.1.3.17044$20241220135610.bin"}'
```

## Get Device DFU Status API

Once a host or Notecard firmware update is initiated, you may use the [Get Device DFU Status API](https://dev.blues.io/api-reference/notehub-api/project-api.md#get-device-dfu-status) or [Get Devices DFU Status API](https://dev.blues.io/api-reference/notehub-api/project-api.md#get-devices-dfu-status) to get updated information on the current status of the DFU request for a single device or multiple devices, respectively.

For example, the following request will return Notecard firmware update status information for an individual device:

```bash
curl -X GET 
     -L '/v1/projects/<projectUID>/devices/<deviceUID>/dfu/notecard/status' 
     -H 'Authorization: Bearer <access_token>'
```

The response:

```json
{
    "device_uid": "dev:000000000000000",
    "dfu_in_progress": true,
    "current": {
        "version": "1.5.3.12345",
        "organization": "Blues Wireless",
        "product": "Notecard",
        "built": "Mar 23 2021 08:31:26"
    },
    "status": {}
}
```

## Get Device DFU History API

To retrieve a comprehensive history of host and/or Notecard DFU actions, you may use the [Get Device DFU History API](https://dev.blues.io/api-reference/notehub-api/project-api.md#get-device-dfu-history) or [Get Devices DFU History API](https://dev.blues.io/api-reference/notehub-api/project-api.md#get-devices-dfu-history) for a single device or multiple devices, respectively.

For example, the following request will return a history of Notecard firmware updates for an individual device:

```bash
curl -X GET 
     -L '/v1/projects/<projectUID>/devices/<deviceUID>/dfu/notecard/history' 
     -H 'Authorization: Bearer <access_token>'
```

The response:

```json
{
  "device_uid": "dev:000000000000000",
  "current": {
    "version": "1.5.3.12345",
    "organization": "Blues Wireless",
    "product": "Notecard",
    "built": "Feb 19 2021 13:45:28"
  },
}
```

[IAP Firmware Update](https://dev.blues.io/notehub/host-firmware-updates/iap-firmware-update.md "IAP Firmware Update") [Notecard API Requests for DFU](https://dev.blues.io/notehub/host-firmware-updates/notecard-api-requests-for-dfu.md "Notecard API Requests for DFU")
