Appearance
Create License
Create a new license.
POST /v1/licensesRequest Body
json
{
"productId": "prd_xxx",
"planId": "pln_xxx",
"customerEmail": "customer@example.com",
"customerName": "John Doe",
"seats": 5,
"expiresAt": "2027-02-06T00:00:00.000Z"
}| Field | Required | Type | Description |
|---|---|---|---|
productId | Yes | string | Product ID |
planId | No | string | Plan ID |
customerEmail | Yes | string | Customer email (creates customer if not exists) |
customerName | No | string | Customer name |
customerId | No | string | Existing customer ID (alternative to email) |
seats | No | number | Max activations (default: 1) |
expiresAt | No | string | Expiration date (ISO 8601) |
Response
json
{
"data": {
"id": "lic_xxx",
"licenseKey": "MYPLUGIN-XXXX-XXXX-XXXX-XXXX",
"productId": "prd_xxx",
"customerId": "cus_xxx",
"status": "active",
"seats": 5,
"activatedCount": 0,
"expiresAt": "2027-02-06T00:00:00.000Z",
"createdAt": "2026-02-06T00:00:00.000Z"
}
}Example
bash
curl -X POST "https://api.packedge.dev/v1/licenses" \
-H "Authorization: Bearer pk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"productId": "prd_xxx",
"customerEmail": "customer@example.com",
"seats": 5,
"expiresAt": "2027-02-06T00:00:00.000Z"
}'