Bind a new device
Binds a new device to the company account.
Binds a new device to the company account and returns the deviceid.
Headers
Name
Type
Description
Request Body
Name
Type
Description
{
"description":"Device binded succesfully"
"deviceid":"65A1B7E0C6BC3D32C268C1506E3F6F39E225DC6ED79573E177E7243E8E38115B"
}curl -X POST \
-H "Content-Type: application/json" \
-H "api_key: ror-ae4fc6c19681a20fad30" \
-d '{"model": "Model X1", "serial_number":"DEVICE-123"}' \
https://api.runonrufus.com/v0/devices
<?php
$url = "https://api.runonrufus.com/v0/devices";
$data = array('model' => 'Model X1', 'serial_number' => 'DEVICE-123');
$options = array(
'http' => array(
'method' => 'POST',
'content' => json_encode($data),
'header'=> "Content-Type: application/json\r\n" .
"api_key: ror-ae4fc6c19681a20fad30\r\n" .
"Accept: application/json\r\n"
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$response = json_decode($result);
var_dump($response);
?>Last updated