Xtream-Masters Reseller API
Programmatically manage lines, MAG devices, Enigma2 devices, activecodes, sub-resellers, and more through a simple REST-style API.
Authentication
All API requests require your api_key parameter. Include it as a query parameter on every request.
api_access_code.
Base URL
All requests are made to the following base URL format:
Replace {server-dns}, {stream-port}, and {api-access-code} with your server details.
Quick Start
2. Note your server DNS, streaming port, and API access code.
3. Make your first request to
user_info to verify connectivity.4. For WHMCS integration, install the WHMCS Addon.
curl "http://your-server:port/access-code/reseller/index.php?api_key=YOUR_KEY&action=user_info"
Global Parameters
These parameters are available on all or most endpoints.
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Required | Your unique API key for authentication |
| action | string | Required | The API action to perform |
| start | int | Optional | Pagination offset for list endpoints (default: 0) |
| limit | int | Optional | Number of records to return (default: 50) |
| show_columns | string | Optional | Comma-separated list of column names to include in the response |
| hide_columns | string | Optional | Comma-separated list of column names to exclude from the response |
General
Retrieve reseller account information and available packages.
Returns your reseller account details including credits, status, and account settings.
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=user_info"
{
"status": "STATUS_SUCCESS",
"data": {
"id": 152,
"username": "myreseller",
"email": "reseller@example.com",
"credits": 485.00,
"status": 1,
"reseller_dns": "my.dns.com",
"created_at": "2024-01-15 10:30:00",
"member_group_id": 3,
"allowed_pages": ["lines", "mag", "enigma", "activecodes"]
}
}
Returns the list of packages available to your reseller account with pricing and duration details.
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=packages"
{
"status": "STATUS_SUCCESS",
"data": [
{
"id": 1,
"package_name": "1 Month",
"credits": 5.00,
"duration_months": 1,
"is_trial": 0,
"is_official": 1,
"groups": [1, 3, 5]
},
{
"id": 2,
"package_name": "24h Trial",
"credits": 0.00,
"duration_months": 0,
"is_trial": 1,
"is_official": 1,
"groups": [1, 3]
}
]
}
Line Management (M3U)
Create, manage, and control M3U lines for your customers.
Creates a new M3U line. Username and password are auto-generated if not provided.
| Parameter | Type | Required | Description |
|---|---|---|---|
| package | int | Required | Package ID from the packages endpoint |
| trial | int | Required | 0 = regular, 1 = trial |
| username | string | Optional | Custom username (auto-generated if empty) |
| password | string | Optional | Custom password (auto-generated if empty) |
| is_isplock | int | Optional | 0 = disabled, 1 = enable ISP lock |
| allowed_ips[] | array | Optional | Array of allowed IP addresses |
| reseller_notes | string | Optional | Internal notes for the reseller |
| bouquets_selected[] | array | Optional | Array of bouquet IDs to assign |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=create_line" \ -d "package=1" \ -d "trial=0" \ -d "username=customer1" \ -d "password=securepass" \ -d "reseller_notes=Premium customer"
{
"status": "STATUS_SUCCESS",
"data": {
"id": 4521,
"username": "customer1",
"password": "securepass",
"package_id": 1,
"exp_date": 1740000000,
"is_trial": 0,
"status": 1,
"reseller_notes": "Premium customer",
"created_at": "2025-01-15 14:30:00"
}
}
Edit an existing line's properties or extend it with a new package. Provide the package parameter to extend the line's expiry.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Line ID to edit |
| package | int | Optional | Package ID to extend with |
| username | string | Optional | New username |
| password | string | Optional | New password |
| is_isplock | int | Optional | 0 = disabled, 1 = enable ISP lock |
| allowed_ips[] | array | Optional | Array of allowed IP addresses |
| reseller_notes | string | Optional | Internal notes |
| bouquets_selected[] | array | Optional | Array of bouquet IDs |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=edit_line" \ -d "id=4521" \ -d "package=2" \ -d "reseller_notes=Extended for another month"
Retrieve details of a single M3U line by its ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Line ID |
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_line&id=4521"
{
"status": "STATUS_SUCCESS",
"data": {
"id": 4521,
"username": "customer1",
"password": "securepass",
"package_id": 1,
"exp_date": 1740000000,
"is_trial": 0,
"is_isplock": 0,
"status": 1,
"allowed_ips": [],
"reseller_notes": "Premium customer",
"bouquets": [1, 4, 7],
"created_at": "2025-01-15 14:30:00"
}
}
Retrieve a paginated list of all M3U lines. Supports search and status filtering.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start | int | Optional | Pagination offset (default: 0) |
| limit | int | Optional | Records per page (default: 50) |
| search[value] | string | Optional | Search by username or other fields |
| filter | int | Optional | 1=Active, 2=Disabled, 3=Banned, 4=Expired, 5=Trial |
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_lines&start=0&limit=25&filter=1"
Permanently delete a line. This action cannot be undone.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Line ID to delete |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=delete_line" \ -d "id=4521"
Temporarily disable a line. The line can be re-enabled later.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Line ID to disable |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=disable_line" \ -d "id=4521"
Re-enable a previously disabled line.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Line ID to enable |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=enable_line" \ -d "id=4521"
MAG Device Management
Create and manage MAG device subscriptions.
Register a new MAG device with its MAC address and assign a package.
| Parameter | Type | Required | Description |
|---|---|---|---|
| mac | string | Required | MAC address (format: 00:1A:79:XX:XX:XX) |
| package | int | Required | Package ID |
| trial | int | Required | 0 = regular, 1 = trial |
| is_isplock | int | Optional | 0 = disabled, 1 = enable ISP lock |
| reseller_notes | string | Optional | Internal notes |
| bouquets_selected[] | array | Optional | Array of bouquet IDs |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=create_mag" \ -d "mac=00:1A:79:AB:CD:EF" \ -d "package=1" \ -d "trial=0"
Edit a MAG device's properties or extend its subscription.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | MAG device ID |
| mac | string | Optional | New MAC address |
| package | int | Optional | Package ID for extension |
| is_isplock | int | Optional | 0 = disabled, 1 = enabled |
| reseller_notes | string | Optional | Internal notes |
| bouquets_selected[] | array | Optional | Array of bouquet IDs |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=edit_mag" \ -d "id=301" \ -d "package=2"
Retrieve details of a single MAG device.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | MAG device ID |
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_mag&id=301"
Retrieve a paginated list of all MAG devices. Supports search and status filtering.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start | int | Optional | Pagination offset (default: 0) |
| limit | int | Optional | Records per page (default: 50) |
| search[value] | string | Optional | Search term |
| filter | int | Optional | 1=Active, 2=Disabled, 3=Banned, 4=Expired, 5=Trial |
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_mags&start=0&limit=25"
Permanently delete a MAG device entry.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | MAG device ID |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=delete_mag" \ -d "id=301"
Temporarily disable a MAG device.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | MAG device ID |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=disable_mag" \ -d "id=301"
Re-enable a previously disabled MAG device.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | MAG device ID |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=enable_mag" \ -d "id=301"
Convert a MAG device subscription to an M3U line. Returns the newly created line with username and password.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | MAG device ID to convert |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=convert_mag" \ -d "id=301"
Enigma2 Device Management
Create and manage Enigma2 device subscriptions.
Register a new Enigma2 device with its MAC address and assign a package.
| Parameter | Type | Required | Description |
|---|---|---|---|
| mac | string | Required | Device MAC address |
| package | int | Required | Package ID |
| trial | int | Required | 0 = regular, 1 = trial |
| is_isplock | int | Optional | 0 = disabled, 1 = enable ISP lock |
| reseller_notes | string | Optional | Internal notes |
| bouquets_selected[] | array | Optional | Array of bouquet IDs |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=create_enigma" \ -d "mac=AA:BB:CC:DD:EE:FF" \ -d "package=1" \ -d "trial=0"
Edit an Enigma2 device's properties or extend its subscription.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Enigma2 device ID |
| mac | string | Optional | New MAC address |
| package | int | Optional | Package ID for extension |
| is_isplock | int | Optional | 0 = disabled, 1 = enabled |
| reseller_notes | string | Optional | Internal notes |
| bouquets_selected[] | array | Optional | Array of bouquet IDs |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=edit_enigma" \ -d "id=501" \ -d "package=2"
Retrieve details of a single Enigma2 device.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Enigma2 device ID |
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_enigma&id=501"
Retrieve a paginated list of all Enigma2 devices.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start | int | Optional | Pagination offset (default: 0) |
| limit | int | Optional | Records per page (default: 50) |
| search[value] | string | Optional | Search term |
| filter | int | Optional | 1=Active, 2=Disabled, 3=Banned, 4=Expired, 5=Trial |
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_enigmas&start=0&limit=25"
Permanently delete an Enigma2 device entry.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Enigma2 device ID |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=delete_enigma" \ -d "id=501"
Temporarily disable an Enigma2 device.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Enigma2 device ID |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=disable_enigma" \ -d "id=501"
Re-enable a previously disabled Enigma2 device.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Enigma2 device ID |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=enable_enigma" \ -d "id=501"
Convert an Enigma2 device subscription to an M3U line. Returns the newly created line with username and password.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Enigma2 device ID to convert |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=convert_enigma" \ -d "id=501"
Activecode Management
Create and manage activation codes for device registration.
Create a new activation code. If no custom code is provided, one will be auto-generated based on group settings.
| Parameter | Type | Required | Description |
|---|---|---|---|
| package | int | Required | Package ID |
| trial | int | Required | 0 = regular, 1 = trial |
| code | string | Optional | Custom activation code (auto-generated if empty) |
| is_isplock | int | Optional | 0 = disabled, 1 = enable ISP lock |
| reseller_notes | string | Optional | Internal notes |
| bouquets_selected[] | array | Optional | Array of bouquet IDs |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=create_activecode" \ -d "package=1" \ -d "trial=0" \ -d "code=PROMO-2025-ABCD"
{
"status": "STATUS_SUCCESS",
"data": {
"id": 892,
"code": "PROMO-2025-ABCD",
"package_id": 1,
"is_trial": 0,
"status": 1,
"reseller_notes": "",
"created_at": "2025-01-15 14:30:00"
}
}
Edit an activecode's properties or extend it with a new package.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Activecode ID |
| package | int | Optional | Package ID for extension |
| code | string | Optional | Change the activation code |
| reseller_notes | string | Optional | Internal notes |
| bouquets_selected[] | array | Optional | Array of bouquet IDs |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=edit_activecode" \ -d "id=892" \ -d "package=2"
Retrieve details of a single activation code.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Activecode ID |
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_activecode&id=892"
Retrieve a paginated list of all activation codes.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start | int | Optional | Pagination offset (default: 0) |
| limit | int | Optional | Records per page (default: 50) |
| search[value] | string | Optional | Search term |
| filter | int | Optional | 1=Active, 2=Disabled, 3=Banned, 4=Expired, 5=Trial |
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_activecodes&start=0&limit=25"
Permanently delete an activation code.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Activecode ID |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=delete_activecode" \ -d "id=892"
Temporarily disable an activation code.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Activecode ID |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=disable_activecode" \ -d "id=892"
Re-enable a previously disabled activation code.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Activecode ID |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=enable_activecode" \ -d "id=892"
Generate a new random activation code, replacing the existing one. Returns both the old and new codes.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Activecode ID to reset |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=reset_activecode" \ -d "id=892"
{
"status": "STATUS_SUCCESS",
"data": {
"old_code": "PROMO-2025-ABCD",
"new_code": "XM-8F3K-Q9W2-LP7N"
}
}
Sub-Reseller Management
Create and manage sub-reseller accounts and their credits.
Create a new sub-reseller account under your reseller.
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | Optional | Username (auto-generated if empty) |
| password | string | Optional | Password (auto-generated if empty) |
| string | Optional | Email address | |
| member_group_id | int | Optional | Member group ID to assign |
| reseller_dns | string | Optional | Custom DNS for the sub-reseller |
| notes | string | Optional | Internal notes |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=create_user" \ -d "username=subreseller1" \ -d "password=strongpass123" \ -d "email=sub@example.com" \ -d "member_group_id=3"
Edit a sub-reseller account's properties.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Sub-reseller ID |
| username | string | Optional | New username |
| password | string | Optional | New password |
| string | Optional | New email | |
| member_group_id | int | Optional | New member group ID |
| reseller_dns | string | Optional | Custom DNS |
| notes | string | Optional | Internal notes |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=edit_user" \ -d "id=88" \ -d "email=newemail@example.com"
Retrieve details of a single sub-reseller account.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Sub-reseller ID |
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_user&id=88"
Retrieve a paginated list of all sub-reseller accounts.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start | int | Optional | Pagination offset (default: 0) |
| limit | int | Optional | Records per page (default: 50) |
| search[value] | string | Optional | Search term |
| filter | int | Optional | 1=Active, 2=Disabled, 3=Banned, 4=Expired, 5=Trial |
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_users&start=0&limit=25"
Permanently delete a sub-reseller account.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Sub-reseller ID |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=delete_user" \ -d "id=88"
Temporarily disable a sub-reseller account.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Sub-reseller ID |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=disable_user" \ -d "id=88"
Re-enable a previously disabled sub-reseller account.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Sub-reseller ID |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=enable_user" \ -d "id=88"
Add or subtract credits from a sub-reseller account. Use positive values to add credits and negative values to subtract.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | int | Required | Sub-reseller ID |
| credits | int | Required | Credits to transfer (positive = add, negative = subtract) |
| note | string | Optional | Note for the transaction log |
curl -X POST "http://dns:port/access/reseller/index.php" \ -d "api_key=YOUR_KEY" \ -d "action=adjust_credits" \ -d "id=88" \ -d "credits=50" \ -d "note=Monthly top-up"
{
"status": "STATUS_SUCCESS",
"data": {
"id": 88,
"credits_before": 100.00,
"credits_after": 150.00,
"adjusted": 50,
"note": "Monthly top-up"
}
}
Logs & Monitoring
Monitor activity, connections, and credit transactions.
Retrieve user activity logs with pagination support.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start | int | Optional | Pagination offset (default: 0) |
| limit | int | Optional | Records per page (default: 50) |
| search[value] | string | Optional | Search term |
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=activity_logs&start=0&limit=50"
View currently active/live connections across your lines and devices.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start | int | Optional | Pagination offset (default: 0) |
| limit | int | Optional | Records per page (default: 50) |
| search[value] | string | Optional | Search term |
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=live_connections&start=0&limit=50"
Retrieve credit transactions and action logs.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start | int | Optional | Pagination offset (default: 0) |
| limit | int | Optional | Records per page (default: 50) |
| search[value] | string | Optional | Search term |
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=user_logs&start=0&limit=50"
Response Format
All API responses follow a consistent JSON structure.
{
"status": "STATUS_SUCCESS" | "STATUS_FAILURE",
"data": { // Object or Array depending on the endpoint }
}
status field before processing the data field. On failure, the data field may contain an error message or be empty.
Status Codes
All possible status values returned by the API.
STATUS_SUCCESSSTATUS_FAILURESTATUS_INSUFFICIENT_CREDITSSTATUS_INVALID_PACKAGESTATUS_INVALID_MACSTATUS_EXISTS_MACSTATUS_EXISTS_USERNAMESTATUS_INVALID_USERNAMESTATUS_INVALID_PASSWORDSTATUS_NO_TRIALSSTATUS_INVALID_TYPESTATUS_NO_PERMISSIONSSTATUS_INVALID_DATA