Project Phil Documentation
Sign in

Check License Key Authorisation

Added in v1.0

POSThttps://api.example.com/api/check

Requires authentication: x-api-key: YOUR_LICENSE_KEY

The API returns a JSON response indicating whether the license is valid.

Note: This route does not use your API key. The x-api-key header holds the license key being checked.

Headers

  • x-api-keystringrequired
    The license key being checked.
  • Content-Typestringrequired
    Must be application/json.

Body parameters

  • idintegerrequired
    The product ID the license key must belong to.
  • infostringoptional
    Text saved to the license log on a successful check.

Responses

  • 200OK
  • 400No License key
  • 403IP Not Authorised

Request

curl -X POST 'https://api.example.com/api/check' \
  -H 'x-api-key: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": 123,
  "info": "My application v1.0.0"
}'
const res = await fetch('https://api.example.com/api/check', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_LICENSE_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ id: 123, info: 'My application v1.0.0' })
});
const result = await res.json();
import requests

res = requests.post(
    'https://api.example.com/api/check',
    headers={'x-api-key': 'YOUR_LICENSE_KEY'},
    json={'id': 123, 'info': 'My application v1.0.0'}
)
result = res.json()
$ch = curl_init('https://api.example.com/api/check');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'x-api-key: YOUR_LICENSE_KEY',
    'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    'id' => 123,
    'info' => 'My application v1.0.0'
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = json_decode(curl_exec($ch), true);

200 OK

{
  "status": "AUTHORISED",
  "pass": true,
  "details": "Authorisation completed - example.com"
}

400 No License key

{
  "status": "NOT FOUND",
  "pass": false,
  "details": "No key was provided"
}

403 IP Not Authorised

{
  "status": "NOT AUTHORISED",
  "pass": false,
  "details": "The supplied IP is not authorised - example.com"
}
Written by !RAB Last updated 1 Dec 2026

Discussion 0

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