API Endpoint

POST /management/slugs

Create a new slug policy template for future license generation.

POST /management/slugs

Endpoint context

Use these endpoints from internal tooling or your frontend backend to manage slug policy templates, provisioning API keys, and webhook endpoint configuration. Management routes require the management bootstrap key configured via MANAGEMENT_API_KEYS or MANAGEMENT_API_KEY.

  • Requires management API key auth.
  • Slug names must be lowercase URL-safe (a-z, 0-9, hyphen).
  • Expiration policy must be one of forever, duration, or fixed_date.
bash
curl -sS http://localhost:8080/management/slugs \
  -H "Authorization: Bearer management_key_dev_123456" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "pro-monthly",
    "max_activations": 3,
    "expiration_type": "duration",
    "expiration_days": 30
  }'

Request body

json
{
  "name": "pro-monthly",
  "max_activations": 3,
  "expiration_type": "duration",
  "expiration_days": 30
}

Response body

json
{
  "id": 2,
  "name": "pro-monthly",
  "max_activations": 3,
  "expiration_type": "duration",
  "expiration_days": 30,
  "fixed_expires_at": null,
  "is_default": false,
  "created_at": "2026-04-21T12:00:00Z",
  "updated_at": "2026-04-21T12:00:00Z"
}

Response field types

id

number

Stable internal slug id.

name

string

Lowercase URL-safe slug key used by /generate.

max_activations

number

Per-license seat limit for newly generated licenses.

expiration_type

"forever" | "duration" | "fixed_date"

Expiration policy mode.

expiration_days

number | null

Required when expiration_type is duration.

fixed_expires_at

string | null

RFC3339 timestamp required when expiration_type is fixed_date.

is_default

boolean

True only for the default slug.

created_at

string

RFC3339 creation timestamp.

updated_at

string

RFC3339 update timestamp.

Error codes

400

Invalid JSON, invalid slug name, or invalid expiration policy fields.

401

Missing or invalid management API key.

409

Slug name already exists.

500

Unexpected server or storage error.

Back to API overview