V2 / API Reference
API Activation Reference
Validate and bind a license key to a deployment hostname using the dual-pane v2 activation endpoint.
# API Activation Reference (V2)
Validate and bind a license key to a deployment hostname using the dual-pane v2 activation endpoint.
import ApiEndpoint from '../../../components/ApiEndpoint.astro';
import Callout from '../../../components/Callout.astro';
Use the `v2` activation endpoint to register a deployment hostname against a commercial license key and inspect remaining seat capacity.
<ApiEndpoint
id="preview-v2-licenses-activate"
method="POST"
path="/v2/licenses/activate"
summary="Registers an instance hostname against a commercial license key and returns the updated seat ledger."
params={[
{
name: 'license_key',
type: 'string',
required: true,
description: 'Issued commercial key prefixed with ax_live_ or ax_test_.',
},
{
name: 'instance_host',
type: 'string',
required: true,
description: 'Canonical deployment hostname (for example docs.example.com).',
},
{
name: 'environment',
type: 'enum',
required: false,
description: 'Target environment: production or staging.',
},
{
name: 'metadata',
type: 'object',
required: false,
description: 'Optional key-value tags stored with the activation record.',
},
]}
curl={`curl -X POST \\
https://api.axisdocs.dev/v2/licenses/activate \\
-H "Authorization: Bearer $AXIS_API_TOKEN" \\
-H "Content-Type: application/json" \\
-d '{"license_key":"ax_live_98f2c1","instance_host":"docs.example.com","environment":"production"}'`}
typescript={`const response = await fetch('https://api.axisdocs.dev/v2/licenses/activate', {
method: 'POST',
headers: {
Authorization: \`Bearer \${process.env.AXIS_API_TOKEN}\`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
license_key: 'ax_live_98f2c1',
instance_host: 'docs.example.com',
environment: 'production',
}),
});
const data = await response.json();`}
python={`import os
import requests
res = requests.post(
"https://api.axisdocs.dev/v2/licenses/activate",
headers={"Authorization": f"Bearer {os.environ['AXIS_API_TOKEN']}"},
json={
"license_key": "ax_live_98f2c1",
"instance_host": "docs.example.com",
"environment": "production",
},
)
print(res.json())`}
response={`{
"status": "activated",
"version": "v2",
"activation_id": "act_01J9XK2P7M",
"instance_host": "docs.example.com",
"environment": "production",
"repository": "wtr1951/axisdocs-pro",
"seats_remaining": 4
}`}
/>
<Callout variant="note" title="Idempotent host binding">
Submitting an identical `license_key` and `instance_host` pair returns the existing `activation_id` without consuming an additional seat. Need the legacy v1 schema? Switch to <a href="/preview/v1/api-activation">Activate License (v1)</a>.
</Callout> Use the v2 activation endpoint to register a deployment hostname against a commercial license key and inspect remaining seat capacity.
POST
HTTP 200 OK /v2/licenses/activate
Registers an instance hostname against a commercial license key and returns the updated seat ledger.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
| license_key | string | Required | Issued commercial key prefixed with ax_live_ or ax_test_. |
| instance_host | string | Required | Canonical deployment hostname (for example docs.example.com). |
| environment | enum | Optional | Target environment: production or staging. |
| metadata | object | Optional | Optional key-value tags stored with the activation record. |
curl -X POST \
https://api.axisdocs.dev/v2/licenses/activate \
-H "Authorization: Bearer $AXIS_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"license_key":"ax_live_98f2c1","instance_host":"docs.example.com","environment":"production"}' curl -X POST \
https://api.axisdocs.dev/v2/licenses/activate \
-H "Authorization: Bearer $AXIS_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"license_key":"ax_live_98f2c1","instance_host":"docs.example.com","environment":"production"}' const response = await fetch('https://api.axisdocs.dev/v2/licenses/activate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.AXIS_API_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
license_key: 'ax_live_98f2c1',
instance_host: 'docs.example.com',
environment: 'production',
}),
});
const data = await response.json(); import os
import requests
res = requests.post(
"https://api.axisdocs.dev/v2/licenses/activate",
headers={"Authorization": f"Bearer {os.environ['AXIS_API_TOKEN']}"},
json={
"license_key": "ax_live_98f2c1",
"instance_host": "docs.example.com",
"environment": "production",
},
)
print(res.json()) Response Payload application/json
{
"status": "activated",
"version": "v2",
"activation_id": "act_01J9XK2P7M",
"instance_host": "docs.example.com",
"environment": "production",
"repository": "wtr1951/axisdocs-pro",
"seats_remaining": 4
}