POST https://api.luaprotect.dev/v1/keys
Create a new script license key. The key string is returned in the response payload.
Body Parameters
scriptId(string, required) — ID of the script this key grants access to.expiresHours(integer, optional) — Expiry duration in hours. Omit for permanent key.note(string, optional) — Human-readable note (e.g. Discord username).maxUses(integer, optional) — Maximum times the key can be used.
Example Request
curl -X POST "https://api.luaprotect.dev/v1/keys" \
-H "Authorization: Bearer LUAP-YOUR_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"scriptId": "scr_88192a", "expiresHours": 720, "note": "VIP Buyer"}'
Example Response
{
"key": {
"id": "key_10293z",
"key": "KEY-LUAP-8812-7712",
"status": "active",
"note": "VIP Buyer",
"expiresAt": "2026-09-05T17:00:00Z"
}
}