Reseller API

Open /api/v1/reseller/* for approved resellers with rsl_ keys. Default on. POST /codes debits balance.

Settingtoggle.api_reseller_mod

Reseller API

Admin label: API reseller mod. When off, all /api/v1/reseller/* routes return 403.

Where to find it

Admin → Settings → Mods → API → API reseller mod

Setting key: toggle.api_reseller_mod

Default: on (unset = enabled)

Who can use it

1. User flagged as an approved reseller account

2. Reseller API key (prefix rsl_…) with scope reseller:codes - created under Account → Reseller, not Manage Account → API

3. Enough balanceCents for the package wholesale cost when generating codes

Member API keys (hex, no rsl_) cannot call reseller routes.

Auth and routes

Authorization: Bearer <reseller-key>

Method Path Purpose
GET /api/v1/reseller/packages List packages
GET /api/v1/reseller/codes List generated codes
POST /api/v1/reseller/codes Generate a code (debits balance)
GET /api/v1/reseller/codes/{id-or-code} Lookup

Money path

POST /codes with {"packageKey":"premium_30d"} (example key) charges the reseller's account balance by that package's wholesale costCents. On success the response includes remaining balanceCents / balanceFormatted. Insufficient funds → error "Insufficient account balance."

Example:

curl -X POST "https://YOUR-DOMAIN/api/v1/reseller/codes" \
  -H "Authorization: Bearer rsl_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"packageKey":"premium_30d"}'

Public reference: the live site API docs page (/api).

Common problems

403 with a key that looks fine

Mod off, or you pasted a member API key instead of a reseller rsl_ key.

401 Missing or invalid reseller API key

Wrong key, revoked key, or account is not an approved reseller.

Related