# Uploads

Firmware file upload endpoints

## Upload firmware

> Upload a firmware binary file to the server.\
> \
> 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.\
> \
> \*\*Authentication:\*\* Use an OAuth2 Bearer token in the \`Authorization\` header.<br>

```json
{"openapi":"3.0.3","info":{"title":"Blynk Platform API","version":"1.0.0"},"tags":[{"name":"Uploads","description":"Firmware file upload endpoints"}],"servers":[{"url":"https://{server_address}","description":"Blynk Server","variables":{"server_address":{"default":"blynk.cloud","description":"Your Blynk server domain"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth2 Bearer token obtained from authentication endpoint"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}},"required":["message"]}},"required":["error"]}}},"paths":{"/api/upload":{"post":{"tags":["Uploads"],"summary":"Upload firmware","description":"Upload a firmware binary file to the server.\n\nThe file type is determined by the `type` form field:\n\n- `FIRMWARE` — OTA firmware binary (`.bin`, `.zip`, `.tar`, `.gz`, `.hs`, `.xz`, `.bz2`, `.tar.gz`, `.ota.bin.gz`, `.bin.gz`, `.bin.hs`, `.yml`, `.yaml`)\n\nThe maximum file size is 10 MB.\n\n**Authentication:** Use an OAuth2 Bearer token in the `Authorization` header.\n","operationId":"uploadFile","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"upfile":{"type":"string","format":"binary","description":"The firmware file to upload"},"type":{"type":"string","enum":["FIRMWARE"],"description":"Upload file type. Must be `FIRMWARE`."}},"required":["upfile"]}}}},"responses":{"200":{"description":"File uploaded successfully. Returns the server path to the uploaded file.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad request — invalid or missing file data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden — authentication failed, plan does not support uploads, or upload limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blynk.io/en/blynk.cloud/platform-https-api/uploads.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
