Skip to main content

Key Management

Leaf7 uses a two-stage key system:
  1. Buyer Keys — Unredeemed keys you generate and distribute to customers
  2. 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

Set key_days to 0 with key_hours and key_minutes also at 0 to create lifetime keys that never expire.

Get buyer keys

GET /api/vendor/keys/buyer Fetch all buyer keys, optionally filtered by project.

Query Parameters


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


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

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


Unban a key

POST /api/vendor/keys/active/{key_id}/unban Restore access for a previously banned key.

Path Parameters


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

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