curl -X POST "https://api.chariow.com/v1/licenses/ABC-123-XYZ-789/activate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"device_identifier": "00:1B:44:11:3A:B7"
}'
const response = await fetch(
'https://api.chariow.com/v1/licenses/ABC-123-XYZ-789/activate',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
device_identifier: '00:1B:44:11:3A:B7'
})
}
);
const data = await response.json();
$ch = curl_init('https://api.chariow.com/v1/licenses/ABC-123-XYZ-789/activate');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'device_identifier' => '00:1B:44:11:3A:B7'
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
{
"message": "License activated successfully",
"data": {
"id": "license_abc123",
"status": "active",
"customer": {
"id": "cus_xyz789",
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": {
"number": "+1 202-555-0123",
"country": {
"name": "United States",
"code": "US",
"alpha_3_code": "USA",
"dial_code": "+1",
"currency": "USD",
"flag": "https://cdn.axazara.com/flags/svg/US.svg"
}
},
"avatar_url": null
},
"product": {
"id": "prd_abc456",
"name": "Premium Software License",
"type": "license",
"pictures": {
"thumbnail": null,
"cover": null
},
"category": {
"value": "technology",
"label": "Technology"
},
"pricing": {
"type": "one_time",
"price": {
"value": 49,
"formatted": "$49.00",
"short": "49",
"currency": "USD"
},
"effective": {
"value": 49,
"formatted": "$49.00",
"short": "49",
"currency": "USD"
}
},
"bundle": null,
"metadata": null
},
"license": {
"key": "ABC-123-XYZ-789",
"masked_key": "ABC-***-***-789"
},
"is_active": true,
"is_expired": false,
"can_activate": true,
"activations": {
"count": 1,
"max": 10,
"remaining": 9
},
"certificate_url": "https://download.chariow.com/licenses/license_abc123?expires=1736937000&signature=4f1c...",
"metadata": null,
"activated_at": "2025-01-15T10:30:00.000000Z",
"expires_at": "2026-01-15T10:30:00.000000Z",
"expired_at": null,
"revoked_at": null,
"created_at": "2025-01-15T09:00:00.000000Z",
"updated_at": "2025-01-15T10:30:00.000000Z"
}
}
{
"message": "License has been revoked",
"errors": []
}
{
"message": "This license does not require activation and is already active.",
"errors": []
}
{
"message": "License has expired",
"errors": []
}
{
"message": "Activation limit reached",
"errors": []
}
{
"message": "No query results for model [App\\Models\\IssuedLicense].",
"errors": []
}
Licenses
Activate License
Activate a license on a device
curl -X POST "https://api.chariow.com/v1/licenses/ABC-123-XYZ-789/activate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"device_identifier": "00:1B:44:11:3A:B7"
}'
const response = await fetch(
'https://api.chariow.com/v1/licenses/ABC-123-XYZ-789/activate',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
device_identifier: '00:1B:44:11:3A:B7'
})
}
);
const data = await response.json();
$ch = curl_init('https://api.chariow.com/v1/licenses/ABC-123-XYZ-789/activate');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'device_identifier' => '00:1B:44:11:3A:B7'
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
{
"message": "License activated successfully",
"data": {
"id": "license_abc123",
"status": "active",
"customer": {
"id": "cus_xyz789",
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": {
"number": "+1 202-555-0123",
"country": {
"name": "United States",
"code": "US",
"alpha_3_code": "USA",
"dial_code": "+1",
"currency": "USD",
"flag": "https://cdn.axazara.com/flags/svg/US.svg"
}
},
"avatar_url": null
},
"product": {
"id": "prd_abc456",
"name": "Premium Software License",
"type": "license",
"pictures": {
"thumbnail": null,
"cover": null
},
"category": {
"value": "technology",
"label": "Technology"
},
"pricing": {
"type": "one_time",
"price": {
"value": 49,
"formatted": "$49.00",
"short": "49",
"currency": "USD"
},
"effective": {
"value": 49,
"formatted": "$49.00",
"short": "49",
"currency": "USD"
}
},
"bundle": null,
"metadata": null
},
"license": {
"key": "ABC-123-XYZ-789",
"masked_key": "ABC-***-***-789"
},
"is_active": true,
"is_expired": false,
"can_activate": true,
"activations": {
"count": 1,
"max": 10,
"remaining": 9
},
"certificate_url": "https://download.chariow.com/licenses/license_abc123?expires=1736937000&signature=4f1c...",
"metadata": null,
"activated_at": "2025-01-15T10:30:00.000000Z",
"expires_at": "2026-01-15T10:30:00.000000Z",
"expired_at": null,
"revoked_at": null,
"created_at": "2025-01-15T09:00:00.000000Z",
"updated_at": "2025-01-15T10:30:00.000000Z"
}
}
{
"message": "License has been revoked",
"errors": []
}
{
"message": "This license does not require activation and is already active.",
"errors": []
}
{
"message": "License has expired",
"errors": []
}
{
"message": "Activation limit reached",
"errors": []
}
{
"message": "No query results for model [App\\Models\\IssuedLicense].",
"errors": []
}
Activates a license for a device by recording activation details and incrementing the activation count. The system automatically captures the requesting IP address and user agent. On the first activation, the license status changes from
pending_activation to active, and the expiration date is calculated based on the product’s validity period settings.
Each activation is tracked individually, allowing you to view the complete activation history. The license cannot be activated if it has been revoked, has expired, or if the maximum activation limit has been reached.
Required scope:
licenses.write. A key without it receives a 403 error. See Authentication.Path Parameters
string
required
The licence key to activate (e.g.,
ABC-123-XYZ-789)Request Body
string
Optional unique identifier for the device (e.g., MAC address, hardware UUID, machine ID). Max 255 characters.
The IP address and user agent are automatically captured from the request and do not need to be provided.
Response
string
License activated successfullyobject
Show properties
Show properties
string
Licence public ID (e.g.,
license_abc123)string
Licence status:
pending_activation, active, expired, or revokedobject
Customer who owns the licence:
id, name, first_name, last_name, email, phone (number and country) and avatar_urlobject
Product that issued the licence:
id, name, type, pictures, category, pricing (type, price, effective), bundle and metadataobject
boolean
Whether the licence is currently active and usable
boolean
Whether the licence has expired
boolean
Whether the licence can be activated on another device (not revoked, not expired, slots left)
object
string
Signed URL to download the licence certificate. It expires 30 minutes after the response: fetch the licence again for a fresh link.
object | null
Custom metadata attached to the licence
string | null
ISO 8601 timestamp of the first activation (
null if not yet activated)string | null
ISO 8601 expiration timestamp (
null for a lifetime licence)string | null
ISO 8601 timestamp when the licence expired
string | null
ISO 8601 timestamp when the licence was revoked
string
ISO 8601 creation timestamp
string
ISO 8601 last update timestamp
Error Responses
object
Returned when:
- The licence has been revoked
- The licence is already active on a product whose licences need no activation
- The licence has expired
- The activation limit has been reached
object
Returned when the licence key doesn’t exist or doesn’t belong to your store
object
Returned when
device_identifier is not a string or exceeds 255 characterscurl -X POST "https://api.chariow.com/v1/licenses/ABC-123-XYZ-789/activate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"device_identifier": "00:1B:44:11:3A:B7"
}'
const response = await fetch(
'https://api.chariow.com/v1/licenses/ABC-123-XYZ-789/activate',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
device_identifier: '00:1B:44:11:3A:B7'
})
}
);
const data = await response.json();
$ch = curl_init('https://api.chariow.com/v1/licenses/ABC-123-XYZ-789/activate');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'device_identifier' => '00:1B:44:11:3A:B7'
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
{
"message": "License activated successfully",
"data": {
"id": "license_abc123",
"status": "active",
"customer": {
"id": "cus_xyz789",
"name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": {
"number": "+1 202-555-0123",
"country": {
"name": "United States",
"code": "US",
"alpha_3_code": "USA",
"dial_code": "+1",
"currency": "USD",
"flag": "https://cdn.axazara.com/flags/svg/US.svg"
}
},
"avatar_url": null
},
"product": {
"id": "prd_abc456",
"name": "Premium Software License",
"type": "license",
"pictures": {
"thumbnail": null,
"cover": null
},
"category": {
"value": "technology",
"label": "Technology"
},
"pricing": {
"type": "one_time",
"price": {
"value": 49,
"formatted": "$49.00",
"short": "49",
"currency": "USD"
},
"effective": {
"value": 49,
"formatted": "$49.00",
"short": "49",
"currency": "USD"
}
},
"bundle": null,
"metadata": null
},
"license": {
"key": "ABC-123-XYZ-789",
"masked_key": "ABC-***-***-789"
},
"is_active": true,
"is_expired": false,
"can_activate": true,
"activations": {
"count": 1,
"max": 10,
"remaining": 9
},
"certificate_url": "https://download.chariow.com/licenses/license_abc123?expires=1736937000&signature=4f1c...",
"metadata": null,
"activated_at": "2025-01-15T10:30:00.000000Z",
"expires_at": "2026-01-15T10:30:00.000000Z",
"expired_at": null,
"revoked_at": null,
"created_at": "2025-01-15T09:00:00.000000Z",
"updated_at": "2025-01-15T10:30:00.000000Z"
}
}
{
"message": "License has been revoked",
"errors": []
}
{
"message": "This license does not require activation and is already active.",
"errors": []
}
{
"message": "License has expired",
"errors": []
}
{
"message": "Activation limit reached",
"errors": []
}
{
"message": "No query results for model [App\\Models\\IssuedLicense].",
"errors": []
}
Implementation Notes
First Activation
When a licence is activated for the first time:- Status changes from
pending_activationtoactive activated_atis set to the current timestampexpires_atis calculated based on the product’s validity period (if configured)
Subsequent Activations
activations.countis incremented- A new activation record is created in the activation history
- The licence status remains
active, andactivated_atandexpires_atkeep their first values
Licences That Need No Activation
When the product’s licence settings haverequires_activation set to false, licences are issued already active. Calling this endpoint on such a licence returns 400; validate it with Get License instead. See Licences that need no activation.
Device Tracking
Each activation is recorded with:- the
device_identifieryou send (optional) - the IP address of the request, with its country
- the parsed user agent of the request
- the activation timestamp
Example: Desktop Application
class LicenseActivator {
constructor(apiKey) {
this.apiKey = apiKey;
this.baseUrl = 'https://api.chariow.com/v1';
}
async activate(licenseKey) {
// Get unique device identifier
const deviceId = this.getDeviceIdentifier();
try {
const response = await fetch(
`${this.baseUrl}/licenses/${licenseKey}/activate`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${this.apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
device_identifier: deviceId
})
}
);
if (!response.ok) {
const error = await response.json();
throw new Error(error.message);
}
const result = await response.json();
console.log('License activated successfully');
console.log(`Activations remaining: ${result.data.activations.remaining}`);
return result.data;
} catch (error) {
console.error('Activation failed:', error.message);
throw error;
}
}
getDeviceIdentifier() {
// Implementation depends on your platform
// Examples: MAC address, hardware UUID, machine ID
return 'unique-device-id-here';
}
}
// Usage
const activator = new LicenseActivator('sk_live_your_api_key');
await activator.activate('ABC-123-XYZ-789');
Was this page helpful?