Reseller API Documentation
Automate key generation and management using your API key. All endpoints require authentication via your API key.
Authentication
All API requests must include your API key in the Authorization header:
You can find your API key in the Reseller Panel under Settings.
Base URL
Endpoints
POST /api/reseller/api/generate-key
Generate a new activation key. Deducts 1 credit from your balance. Each key activates one NexusPlayer Pro yearly license.
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
| note | string | No | Optional label (customer name, order #...) |
| playlist | object | No | Optional playlist to link to the key (see below) |
| playlist.type | string | Yes* | XTREAM, M3U or MAG |
| playlist.name | string | No | Playlist display name (defaults to "Playlist") |
| playlist.serverUrl | string | Xtream | Xtream server URL |
| playlist.username | string | Xtream | Xtream username |
| playlist.password | string | Xtream | Xtream password |
| playlist.m3uUrl | string | M3U | M3U playlist URL |
| playlist.portalUrl | string | MAG | Portal URL (http or https) |
| playlist.macAddress | string | MAG | MAC address registered with the provider (XX:XX:XX:XX:XX:XX) |
Example (without playlist):
Example (with Xtream playlist):
Example (with MAG playlist):
Response (201):
Errors:
| Status | Error | Description |
|---|---|---|
| 400 | Insufficient credits | Your balance is 0. Buy more credits. |
| 400 | Invalid playlist data | Playlist given with a type but missing or invalid fields (no credit used) |
| 401 | Invalid API key | Check your Authorization header. |
GET /api/reseller/api/keys
List all your generated keys with their status. An activated key shows the TV's ID in device.deviceCode: in full for TVs you activated yourself, partly masked (A7K2-••••-4TPL) when your customer entered the key.
Query parameters:
| Param | Type | Default | Description |
|---|---|---|---|
| page | integer | 1 | Page number |
Example:
Response (200):
PUT /api/reseller/api/keys/:code/playlist
Link a playlist to an existing PENDING key. The playlist will be automatically pushed to the device when the key is activated.
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
| playlist.type | string | Yes | XTREAM, M3U or MAG |
| playlist.name | string | No | Playlist display name |
| playlist.serverUrl | string | Xtream | Xtream server URL |
| playlist.username | string | Xtream | Xtream username |
| playlist.password | string | Xtream | Xtream password |
| playlist.m3uUrl | string | M3U | M3U playlist URL |
| playlist.portalUrl | string | MAG | Portal URL (http or https) |
| playlist.macAddress | string | MAG | MAC address registered with the provider (XX:XX:XX:XX:XX:XX) |
Example:
Response (200):
Errors:
| Status | Error | Description |
|---|---|---|
| 400 | Can only link playlist to PENDING keys | Key is already activated or revoked |
| 400 | Invalid playlist data | Missing required fields for the playlist type |
| 404 | Key not found | Invalid key code or not owned by you |
DELETE /api/reseller/api/keys/:code/playlist
Remove the linked playlist from a PENDING key.
Example:
Response (200):
GET /api/reseller/api/balance
Check your current credit balance.
Example:
Response (200):
Activate a TV directly
Activate NexusPlayer Pro on your customer's TV without sending them a key: one credit becomes a one-year license right away. Check the device first (free, no credit used), then activate it.
GET /api/reseller/api/device/:deviceId
Returns the device's platform, model, name (the name its owner gave the device, when known) and current license, and whether it can be activated. The device ID is the 12-character code shown at the very bottom of the app's Settings on the TV (dashes optional).
Response (200):
license.state is free, trial, expired, active or lifetime. When eligible is false, reason is already_pro or not_tv. previousPlaylist ({ "type", "name" }) is the playlist you linked to an earlier activation of this TV, if any.
name is free text chosen by the device's owner (up to 100 characters, any script or emoji) and null when unknown: escape it before showing it in a web page.POST /api/reseller/api/activate-device
Uses 1 credit and activates a one-year NexusPlayer Pro license on the TV immediately. A key with status ACTIVATED is recorded: it appears in your key list, with the TV's ID in device.deviceCode.
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
| deviceCode | string | Yes | Device ID shown on the TV (12 characters, dashes optional) |
| note | string | No | Optional label (customer name, order #...) |
| playlist | object | No | Playlist sent to the TV, same format as for generate-key |
| reusePreviousPlaylist | boolean | No | Send again the playlist of your previous activation of this TV (see previousPlaylist). Never sent unless you ask for it. |
playlistAdded tells you whether it was added.Example:
Response (201):
Errors (JSON { "error", "reason" }, no credit used):
| Status | reason | Meaning |
|---|---|---|
| 400 | invalid_device | The device ID is not 12 characters |
| 400 | invalid_playlist | Playlist fields missing or invalid (see generate-key) |
| 400 | insufficient_credits | Your balance is 0 |
| 404 | not_found | No device with this ID |
| 409 | already_pro | The TV already has an active license (one year or lifetime) |
| 422 | not_tv | Not a TV: on phones and tablets, Pro is unlocked in the app |
| 429 | Too many requests (see Rate Limits) |
409 already_pro, and no second credit is used.Key Statuses
| Status | Description |
|---|---|
| PENDING | Key generated, not yet activated on a device |
| ACTIVATED | Key has been activated on a device (yearly license) |
| REVOKED | Key revoked by admin |
Rate Limits
API requests are limited to 200 requests per 15 minutes per IP address. Beyond that you receive 429 Too Many Requests: wait for the window to reset, or spread bulk operations over time.
Direct activation is also limited per account, to protect your credits if your API key leaks: 60 device checks and 30 activations per minute.
401 Unauthorized response.Key Format
Generated keys follow the format NXP-XXXX-XXXX where X is an alphanumeric character (A-Z excluding I and O, digits 2-9). Each key represents one yearly NexusPlayer Pro license (365 days).
End users activate keys through the NexusPlayer app on their device.