Regenerate License
Added in v1.0
PUT
https://api.example.com/api/keys/{key}/regen
Requires authentication:
x-api-key: YOUR_API_KEY
Generates a new license key for the license and moves its logs to the new key. The old key stops working immediately. No request body is needed. Returns the updated key object.
Path parameters
-
keystring requiredThe license key, as shown on the license page on the website.
Responses
- 200OK
- 404Not Found
Request
curl -X PUT 'https://api.example.com/api/keys/{key}/regen' \
-H 'x-api-key: YOUR_API_KEY'
const response = await fetch('https://api.example.com/api/keys/{key}/regen', {
method: 'PUT',
headers: {
'x-api-key': 'YOUR_API_KEY',
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.put(
"https://api.example.com/api/keys/{key}/regen",
headers={
"x-api-key": "YOUR_API_KEY",
},
)
print(response.json())
<?php
$ch = curl_init('https://api.example.com/api/keys/{key}/regen');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'x-api-key: YOUR_API_KEY',
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);
Response
OK
{
"id": 1,
"uuid": "123",
"product": 456,
"key": "01928c3e-4b7a-7d21-8f3e-2a9b6c4d1e07",
"ip": "203.0.113.10",
"status": true,
"disabled": false,
"locked": true,
"lastSeen": 1790000000000
}
Not Found
{
"msg": "The specified license key was not found."
}