Project Phil Documentation
Sign in

Update License Key

Added in v1.0

PUThttps://api.example.com/api/keys/{key}

Requires authentication: x-api-key: YOUR_API_KEY

Updates an existing license key details. Content defaults to existing data if not provided in the body. Returns updated key object.

Headers

  • x-api-keystringrequired
    Your API key.
  • Content-Typestringrequired
    Must be application/json.

Path parameters

  • keystringrequired
    The license key, as shown on the license page on the website.

Body parameters

  • ipstringoptional
    The authorised IP address for the license key to pass authentication.
  • lockedbooleanoptional
    When true, the key only passes authentication from its authorised IP address.
  • disabledbooleanoptional
    Forces the key to be disabled.
  • statusbooleanoptional
    Sets the key’s active state.

Responses

  • 200OK
  • 404Not Found

Request

curl -X PUT 'https://api.example.com/api/keys/{key}' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "ip": "192.168.0.1",
  "locked": true,
  "disabled": false,
  "status": true
}'
const res = await fetch('https://api.example.com/api/keys/{key}', {
  method: 'PUT',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    ip: '192.168.0.1',
    locked: true,
    disabled: false,
    status: true
  })
});
const key = await res.json();
import requests

res = requests.put(
    'https://api.example.com/api/keys/{key}',
    headers={'x-api-key': 'YOUR_API_KEY'},
    json={
        'ip': '192.168.0.1',
        'locked': True,
        'disabled': False,
        'status': True
    }
)
key = res.json()
$ch = curl_init('https://api.example.com/api/keys/{key}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'x-api-key: YOUR_API_KEY',
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    'ip' => '192.168.0.1',
    'locked' => true,
    'disabled' => false,
    'status' => true
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$key = json_decode(curl_exec($ch), true);

200 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
}

404 Not Found

{
  "msg": "The specified license key was not found."
}
Written by !RAB Last updated 1 Dec 2026

Discussion 0

No comments yet. Sign in with Discord to start the conversation.