> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.nukio.mx/llms.txt.
> For full documentation content, see https://developers.nukio.mx/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.nukio.mx/_mcp/server.

# updatedevice

POST https://app.nukio.mx/api/v1/device/updatedevice/authorization
Content-Type: application/json

Reference: https://developers.nukio.mx/nukio-api/device/updatedevice

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /api/v1/device/updatedevice/authorization:
    post:
      operationId: updatedevice
      summary: updatedevice
      tags:
        - subpackage_device
      parameters:
        - name: authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Device_updatedevice_Response_200'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                sms:
                  type: string
                deviceID:
                  type: string
                uniqueid:
                  type: string
                devicedriver:
                  type: string
                devicedescription:
                  type: string
              required:
                - sms
                - deviceID
                - uniqueid
                - devicedriver
                - devicedescription
servers:
  - url: https://app.nukio.mx
components:
  schemas:
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaStateCargoaccess:
      type: object
      properties:
        state:
          type: string
        onText:
          type: string
        offText:
          type: string
        displayName:
          type: string
        pendingState:
          description: Any type
        isNegativeTriggered:
          type: boolean
      required:
        - state
        - onText
        - offText
        - displayName
        - isNegativeTriggered
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaStateCargoaccess
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaStateEnginecutoff:
      type: object
      properties:
        state:
          type: string
        onText:
          type: string
        offText:
          type: string
        displayName:
          type: string
        pendingState:
          description: Any type
        isNegativeTriggered:
          type: boolean
      required:
        - state
        - onText
        - offText
        - displayName
        - isNegativeTriggered
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaStateEnginecutoff
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaState:
      type: object
      properties:
        cargoaccess:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaStateCargoaccess
        enginecutoff:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaStateEnginecutoff
      required:
        - cargoaccess
        - enginecutoff
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaState
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsFuel:
      type: object
      properties:
        state:
          type: string
        onText:
          type: string
        offText:
          type: string
        displayName:
          type: string
        pendingState:
          description: Any type
        isNegativeTriggered:
          type: boolean
      required:
        - state
        - onText
        - offText
        - displayName
        - isNegativeTriggered
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsFuel
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsPanic:
      type: object
      properties:
        state:
          type: string
        onText:
          type: string
        offText:
          type: string
        displayName:
          type: string
        pendingState:
          description: Any type
        isNegativeTriggered:
          type: boolean
      required:
        - state
        - onText
        - offText
        - displayName
        - isNegativeTriggered
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsPanic
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsIgnition:
      type: object
      properties:
        state:
          type: string
        onText:
          type: string
        offText:
          type: string
        displayName:
          type: string
        pendingState:
          description: Any type
        isNegativeTriggered:
          type: boolean
      required:
        - state
        - onText
        - offText
        - displayName
        - isNegativeTriggered
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsIgnition
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsCargoaccess:
      type: object
      properties:
        state:
          type: string
        onText:
          type: string
        offText:
          type: string
        displayName:
          type: string
        pendingState:
          description: Any type
        isNegativeTriggered:
          type: boolean
      required:
        - state
        - onText
        - offText
        - displayName
        - isNegativeTriggered
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsCargoaccess
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsEnginecutoff:
      type: object
      properties:
        state:
          type: string
        onText:
          type: string
        offText:
          type: string
        displayName:
          type: string
        pendingState:
          description: Any type
        isNegativeTriggered:
          type: boolean
      required:
        - state
        - onText
        - offText
        - displayName
        - isNegativeTriggered
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsEnginecutoff
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensors:
      type: object
      properties:
        fuel:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsFuel
        panic:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsPanic
        ignition:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsIgnition
        cargoaccess:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsCargoaccess
        enginecutoff:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensorsEnginecutoff
      required:
        - fuel
        - panic
        - ignition
        - cargoaccess
        - enginecutoff
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensors
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeaturesCargoaccessStates:
      type: object
      properties:
        '0':
          type: string
        '1':
          type: string
      required:
        - '0'
        - '1'
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeaturesCargoaccessStates
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeaturesCargoaccess:
      type: object
      properties:
        states:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeaturesCargoaccessStates
        displayText:
          type: string
      required:
        - states
        - displayText
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeaturesCargoaccess
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeaturesEnginecutoffStates:
      type: object
      properties:
        '0':
          type: string
        '1':
          type: string
      required:
        - '0'
        - '1'
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeaturesEnginecutoffStates
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeaturesEnginecutoff:
      type: object
      properties:
        states:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeaturesEnginecutoffStates
        displayText:
          type: string
      required:
        - states
        - displayText
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeaturesEnginecutoff
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeatures:
      type: object
      properties:
        cargoaccess:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeaturesCargoaccess
        enginecutoff:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeaturesEnginecutoff
      required:
        - cargoaccess
        - enginecutoff
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeatures
    ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaAuthorities:
      type: object
      properties: {}
      title: >-
        ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaAuthorities
    Device_updatedevice_Response_200:
      type: object
      properties:
        state:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaState
        pinTag:
          type: string
        sensors:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaSensors
        success:
          type: string
        deviceID:
          type: string
        features:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaFeatures
        pinColor:
          type: string
        deviceType:
          type: string
        fuelLevels:
          type: array
          items:
            description: Any type
        authorities:
          $ref: >-
            #/components/schemas/ApiV1DeviceUpdatedeviceAuthorizationPostResponsesContentApplicationJsonSchemaAuthorities
        status_code:
          type: string
        deviceDriver:
          type: string
        deviceUnique:
          type: string
        deviceCreatedOn:
          type: integer
        equipmentTypeId:
          type: string
        fuelLevelAverage:
          description: Any type
        deviceDescription:
          type: string
        deviceDisplayName:
          type: string
        deviceNotifyEmail:
          type: string
        equipmentTypeDesc:
          type: string
        hasPendingCommands:
          type: string
        deviceLastHeartbeat:
          type: integer
        additionalPinDisplay:
          type: string
        hasUpdateDevicePrivileges:
          type: boolean
      required:
        - state
        - pinTag
        - sensors
        - success
        - deviceID
        - features
        - pinColor
        - deviceType
        - fuelLevels
        - authorities
        - status_code
        - deviceDriver
        - deviceUnique
        - deviceCreatedOn
        - equipmentTypeId
        - deviceDescription
        - deviceDisplayName
        - deviceNotifyEmail
        - equipmentTypeDesc
        - hasPendingCommands
        - deviceLastHeartbeat
        - additionalPinDisplay
        - hasUpdateDevicePrivileges
      title: Device_updatedevice_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: authorization

```

## SDK Code Examples

```python Device_updatedevice_example
import requests

url = "https://app.nukio.mx/api/v1/device/updatedevice/authorization"

payload = {
    "sms": "sms",
    "deviceID": "deviceID",
    "uniqueid": "uniqueID",
    "devicedriver": "devicedriver",
    "devicedescription": "devicedescription"
}
headers = {
    "authorization": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Device_updatedevice_example
const url = 'https://app.nukio.mx/api/v1/device/updatedevice/authorization';
const options = {
  method: 'POST',
  headers: {authorization: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"sms":"sms","deviceID":"deviceID","uniqueid":"uniqueID","devicedriver":"devicedriver","devicedescription":"devicedescription"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Device_updatedevice_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.nukio.mx/api/v1/device/updatedevice/authorization"

	payload := strings.NewReader("{\n  \"sms\": \"sms\",\n  \"deviceID\": \"deviceID\",\n  \"uniqueid\": \"uniqueID\",\n  \"devicedriver\": \"devicedriver\",\n  \"devicedescription\": \"devicedescription\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("authorization", "<apiKey>")
	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_updatedevice_example
require 'uri'
require 'net/http'

url = URI("https://app.nukio.mx/api/v1/device/updatedevice/authorization")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["authorization"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"sms\": \"sms\",\n  \"deviceID\": \"deviceID\",\n  \"uniqueid\": \"uniqueID\",\n  \"devicedriver\": \"devicedriver\",\n  \"devicedescription\": \"devicedescription\"\n}"

response = http.request(request)
puts response.read_body
```

```java Device_updatedevice_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://app.nukio.mx/api/v1/device/updatedevice/authorization")
  .header("authorization", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"sms\": \"sms\",\n  \"deviceID\": \"deviceID\",\n  \"uniqueid\": \"uniqueID\",\n  \"devicedriver\": \"devicedriver\",\n  \"devicedescription\": \"devicedescription\"\n}")
  .asString();
```

```php Device_updatedevice_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.nukio.mx/api/v1/device/updatedevice/authorization', [
  'body' => '{
  "sms": "sms",
  "deviceID": "deviceID",
  "uniqueid": "uniqueID",
  "devicedriver": "devicedriver",
  "devicedescription": "devicedescription"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'authorization' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Device_updatedevice_example
using RestSharp;

var client = new RestClient("https://app.nukio.mx/api/v1/device/updatedevice/authorization");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"sms\": \"sms\",\n  \"deviceID\": \"deviceID\",\n  \"uniqueid\": \"uniqueID\",\n  \"devicedriver\": \"devicedriver\",\n  \"devicedescription\": \"devicedescription\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Device_updatedevice_example
import Foundation

let headers = [
  "authorization": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "sms": "sms",
  "deviceID": "deviceID",
  "uniqueid": "uniqueID",
  "devicedriver": "devicedriver",
  "devicedescription": "devicedescription"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.nukio.mx/api/v1/device/updatedevice/authorization")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```