Skip to content

Activate device on reseller plan

GET
/devices/id/activateOnResellerPlan

Activates a device on a reseller plan.

This is a special endpoint for resellers to activate a device on a reseller plan.

If you want to activate a device on a modern plan, see the V2 API.

Parameters

Path Parameters

id*

The ID of the device to activate.

Typenumber
Required
Example56892
formatinteger

Query Parameters

resellerPlanId*

The ID of the reseller plan, which must relate to your reseller account.

Typenumber
Required
Example10
formatinteger
expiry

The expiry date for the activation in milliseconds since epoch. The device will be deactivated at this time.

Typestring
Example1767698219828
formatdate-time

Responses

Request was successful
application/json
JSON
{
"success": "string"
}

Samples

cURL
curl -X GET \
'https://api.lightbug.cloud/api/devices/id/activateOnResellerPlan?resellerPlanId=10&expiry=1767698219828' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://api.lightbug.cloud/api/devices/id/activateOnResellerPlan?resellerPlanId=10&expiry=1767698219828', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://api.lightbug.cloud/api/devices/id/activateOnResellerPlan';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];
$query = http_build_query([
    'resellerPlanId' => '10',
    'expiry' => '1767698219828',
]);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . $query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://api.lightbug.cloud/api/devices/id/activateOnResellerPlan'
params = {
    'resellerPlanId': '10',
    'expiry': [
        1767698219828
    ]
}
headers = {
    'Content-Type': 'application/json'
}

response = requests.get(url, params=params, headers=headers)
print(response.json())