Update License Key
Added in v1.0
PUT
https://api.example.com/api/keys/{key}
Updates an existing license key details. Content defaults to existing data if not provided in the body. Returns updated key object.
Path parameters
-
keystring requiredThe license key, as shown on the license page on the website.
Body parameters
-
ipstring optionalThe authorised IP address for the license key to pass authentication. -
lockedboolean optionalWhen true, the key only passes authentication from its authorised IP address. -
disabledboolean optionalForces the key to be disabled. -
statusboolean optionalSets the key's active state.
Responses
- 200OK
- 404Not Found
Request
curl -X PUT 'https://api.example.com/api/keys/{key}' \
-H 'Content-Type: application/json' \
-d '{
"ip": "192.168.0.1",
"locked": true,
"disabled": false,
"status": true
}'
const response = await fetch('https://api.example.com/api/keys/{key}', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"ip": "192.168.0.1",
"locked": true,
"disabled": false,
"status": true
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.put(
"https://api.example.com/api/keys/{key}",
headers={
"Content-Type": "application/json",
},
json={
"ip": "192.168.0.1",
"locked": True,
"disabled": False,
"status": True
},
)
print(response.json())
<?php
$ch = curl_init('https://api.example.com/api/keys/{key}');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => '{
"ip": "192.168.0.1",
"locked": true,
"disabled": false,
"status": true
}',
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);
Response
OK
{
"id": 1,
"uuid": "123",
"product": 456,
"key": "0190a5f3-7c1e-7b2a-9d4e-3f8a6c1b2d90",
"ip": "192.168.0.1",
"status": true,
"disabled": false,
"locked": true,
"lastSeen": 1790000000000
}
Not Found
{
"msg": "The specified license key was not found."
}