Admin Guide
Redeem code management
Generate and manage quota redeem codes in bulk
Redeem codes are used for promotional giveaways or for users to top up quota themselves. Users redeem codes in the redeem code section of `/console/wallet`. Admins generate and manage codes in bulk through admin APIs such as `POST /api/redeem_code`; the web admin page is not available yet.
| ID | Name | Status | Quota | Created at | Expires at | Redeemer ID | Actions | |
|---|---|---|---|---|---|---|---|---|
| ☐ | 101 | Promo giveaway - March | Unused | 5000 | 2026-06-01 | 2026-12-31 | — | View · Copy · Edit · Delete |
| ☐ | 88 | Beta compensation | Used | 1000 | 2026-05-10 | — | 2 | View · Copy · Edit · Delete |
Showing 1–10 of 214 · 10 per page
Redeem code list example: bulk actions, search, and pagination
Generate redeem codes in bulk
Open the generate dialog
- On the redeem code list page, click “Add redeem code”
- In the dialog, enter the batch name, quantity, quota, and other parameters
- You can also edit an existing record: click “Edit” on the row or call
GET /api/redeem_code/{id}
Set generation parameters
| Parameter | Description |
|---|---|
name · Name | Batch name or prefix to identify codes in the list |
count · Quantity | Number of redeem codes to generate in one batch |
quota · Quota | Quota value each redeem code grants |
expired_time · Expires at | Optional; the status changes to Expired once it passes |
status · Status | New codes are enabled by default; you can disable them up front |
Generate codes
- Click “Generate” to submit
POST /api/redeem_code - The system generates a unique 32-character
keyfor each record and writes it to theredemptiontable - The list is returned page by page from
GET /api/redeem_codesby default; after a user redeems a code,used_user_idandredeemed_timeare updated - For user-side redemption, see
/console/walletand the Quota and top-up guide
Export codes
- After generation, copy a single key from the results area or use “Copy selected codes to clipboard”
- Use “Copy” on a row to quickly copy one full redeem code
- Export the key list as a text file for promotional distribution or email campaigns
- Redeem code keys carry quota value; distribute them through secure channels and never commit them to a public code repository
List fields and actions
| Column | Field | Description |
|---|---|---|
| ID | id | Redeem code record ID |
| Name | name | Batch or purpose name for easy identification |
| Status | status | Unused / Used / Disabled / Expired |
| Quota | quota | Amount of quota credited after a successful redemption |
| Created at | created_time | Generation timestamp |
| Expires at | expired_time | Codes cannot be redeemed after expiry; leave empty for no expiry |
| Redeemer ID | used_user_id | ID of the user who redeemed the code, once used |
- Add redeem code (
POST /api/redeem_code): Opens the generate dialog to create redeem codes in bulk - Copy selected to clipboard: Select multiple rows to copy their full keys (32 characters)
- Clear invalid codes (
DELETE /api/redemption/invalid): Deletes used, expired, or disabled records - Search (
GET /api/redeem_codes?keyword=): Filter by ID or name keyword
- View (
GET /api/redemption/{id}): Shows redeem code details and the full key - Copy: Copies a single redeem code key to the clipboard
- Edit (
PUT /api/redeem_code/{id}): Changes the name, quota, expiry time, or status - Delete (
DELETE /api/redemption/{id}): Deletes a single record (irreversible)
To show this in the admin sidebar, go to Profile settings → Sidebar modules and enable sidebar_modules.admin.redemption.