> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://developers.nukio.mx/nukio-api/device/firmware-update/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.nukio.mx/_mcp/server. # firmwareUpdate GET https://app.nukio.mx/api/v1/command/firmware-update/authorization Content-Type: application/json Reference: https://developers.nukio.mx/nukio-api/device/firmware-update ## Authentication - `authorization` header (required) — API Key authentication via header ## Request ### Body (application/json) This endpoint expects an object. - `payload` (string, required) - `deviceID` (string, required) - `accountID` (string, required) ## Response ### 200 OK - `reason` (string, required) - `success` (string, required) - `status_code` (integer, required) ## Examples **Request** ```json { "payload": "binaryfirmware", "deviceID": "deviceID", "accountID": "accountID" } ``` **Response** ```json { "reason": "invalid deviceID", "success": "0", "status_code": 401 } ``` **SDK Code** ```python Device_firmwareUpdate_example import requests url = "https://app.nukio.mx/api/v1/command/firmware-update/authorization" payload = { "payload": "binaryfirmware", "deviceID": "deviceID", "accountID": "accountID" } headers = { "authorization": "", "Content-Type": "application/json" } response = requests.get(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Device_firmwareUpdate_example const url = 'https://app.nukio.mx/api/v1/command/firmware-update/authorization'; const options = { method: 'GET', headers: {authorization: '', 'Content-Type': 'application/json'}, body: '{"payload":"binaryfirmware","deviceID":"deviceID","accountID":"accountID"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Device_firmwareUpdate_example package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://app.nukio.mx/api/v1/command/firmware-update/authorization" payload := strings.NewReader("{\n \"payload\": \"binaryfirmware\",\n \"deviceID\": \"deviceID\",\n \"accountID\": \"accountID\"\n}") req, _ := http.NewRequest("GET", url, payload) req.Header.Add("authorization", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Device_firmwareUpdate_example require 'uri' require 'net/http' url = URI("https://app.nukio.mx/api/v1/command/firmware-update/authorization") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["authorization"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"payload\": \"binaryfirmware\",\n \"deviceID\": \"deviceID\",\n \"accountID\": \"accountID\"\n}" response = http.request(request) puts response.read_body ``` ```java Device_firmwareUpdate_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://app.nukio.mx/api/v1/command/firmware-update/authorization") .header("authorization", "") .header("Content-Type", "application/json") .body("{\n \"payload\": \"binaryfirmware\",\n \"deviceID\": \"deviceID\",\n \"accountID\": \"accountID\"\n}") .asString(); ``` ```php Device_firmwareUpdate_example request('GET', 'https://app.nukio.mx/api/v1/command/firmware-update/authorization', [ 'body' => '{ "payload": "binaryfirmware", "deviceID": "deviceID", "accountID": "accountID" }', 'headers' => [ 'Content-Type' => 'application/json', 'authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp Device_firmwareUpdate_example using RestSharp; var client = new RestClient("https://app.nukio.mx/api/v1/command/firmware-update/authorization"); var request = new RestRequest(Method.GET); request.AddHeader("authorization", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"payload\": \"binaryfirmware\",\n \"deviceID\": \"deviceID\",\n \"accountID\": \"accountID\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Device_firmwareUpdate_example import Foundation let headers = [ "authorization": "", "Content-Type": "application/json" ] let parameters = [ "payload": "binaryfirmware", "deviceID": "deviceID", "accountID": "accountID" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://app.nukio.mx/api/v1/command/firmware-update/authorization")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```