---
title: "Upload firmware"
method: POST
path: "/api/upload"
tags: ["Uploads"]
---

# Upload firmware

`POST /api/upload`

Upload a firmware binary file to the server. This is the first step when
creating an OTA shipment: the response gives you the values required by
[`POST /api/v1/organization/shipment/create`](#operation/createShipment).

The file type is determined by the `type` form field:

- `FIRMWARE` — OTA firmware binary (`.bin`, `.zip`, `.tar`, `.gz`, `.hs`, `.xz`, `.bz2`, `.tar.gz`, `.ota.bin.gz`, `.bin.gz`, `.bin.hs`, `.yml`, `.yaml`)

The maximum file size is 10 MB.

On success the server stores the file and returns a JSON object with:

- `path` — the server path to the stored firmware. Pass it as `pathToFirmware`
  when creating the shipment.
- `firmwareInfo` — metadata parsed from the binary (version, board type,
  hashes, size, …). Pass it as `firmwareInfo` when creating the shipment.
  It may be `null` if the file could not be parsed.

**Authentication:** Use an OAuth2 Bearer token in the `Authorization` header.

## Response `200`

File uploaded successfully. Returns the server path to the stored firmware and the parsed firmware metadata.

- FirmwareUploadResponse — Response returned by `POST /api/upload` when uploading a firmware file (`type=FIRMWARE`). Feed `path` into `pathToFirmware` and `firmwareInfo` into `firmwareInfo` of the create shipment request.
  - `path` string — Server path to the stored firmware file. Pass this value as `pathToFirmware` when creating a shipment.
  - `firmwareInfo` FirmwareInfo
    - `version` string — Firmware version
    - `blynkVersion` string — Blynk firmware version
    - `fwType` string — Firmware type (product name)
    - `boardType` string — Board type
    - `buildDate` string — Firmware build date
    - `md5Hash` string — MD5 hash of the firmware file
    - `sha256Hash` string — SHA-256 hash of the firmware file
    - `type` 'NCP' | 'MCU' — Firmware type
    - `fileSize` integer — Firmware file size in bytes

## Other responses

- `400` — Bad request — invalid or missing file data
- `403` — Forbidden — authentication failed, plan does not support uploads, or upload limit reached
- `429` — Too many requests
- `500` — Internal server error

---

[API](https://skmtc.dev/blynk/apis/blynk-platform-api.md) · [All operations](https://skmtc.dev/blynk/apis/blynk-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/blynk/blynk-platform-api/revisions/d8640cc48a13/schema)
