Key Management
Leaf7 uses a two-stage key system:- Buyer Keys — Unredeemed keys you generate and distribute to customers
- Script Keys (Active Keys) — Keys that have been redeemed and are bound to a user’s Discord ID and HWID
When a user redeems a buyer key (via the Discord bot or by executing with the key), a Script Key is created automatically. The buyer key is marked as redeemed, and the user’s Discord ID and HWID are linked.
If there’s no HWID assigned to a key, it will automatically get assigned when the user first executes the script with
script_key = "key here" on top of their loader.Generate buyer keys
POST /api/vendor/keys/buyer
Generate one or more unredeemed buyer keys for distribution.
Headers
Request Body
- 200 OK
- 403 Forbidden
- 404 Not Found
Get buyer keys
GET /api/vendor/keys/buyer
Fetch all buyer keys, optionally filtered by project.
Query Parameters
- 200 OK
Delete a buyer key
DELETE /api/vendor/keys/buyer/{key_id}
Remove an unredeemed buyer key. Redeemed keys cannot be deleted — ban the associated active key instead.
Path Parameters
- 200 OK
- 400 Bad Request
- 404 Not Found
Get active keys
GET /api/vendor/keys/active
Fetch all redeemed (active) script keys. These are real user sessions with linked Discord IDs and HWIDs.
Query Parameters
- 200 OK
expires_at of null means the key is a lifetime key.Ban a key
POST /api/vendor/keys/active/{key_id}/ban
Ban a user from executing your script. Their HWID is blocked immediately.
Path Parameters
- 200 OK
- 404 Not Found
Unban a key
POST /api/vendor/keys/active/{key_id}/unban
Restore access for a previously banned key.
Path Parameters
- 200 OK
Reset HWID
POST /api/vendor/keys/active/{key_id}/reset_hwid
Clear the HWID lock on a key, allowing the user to execute from a new device. The HWID will be re-assigned on next execution.
Path Parameters
- 200 OK
- 404 Not Found
This endpoint bypasses the cooldown timer. The
hwid_reset_cooldown setting on the project only applies to self-service resets via the Discord bot.Update HWID
PATCH /api/vendor/keys/active/{key_id}/hwid
Manually set or clear the HWID on a key.
Path Parameters
Request Body
- 200 OK