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.

Where do I find my API key? Your API key is available in your reseller panel under API Settings. Each reseller account has a unique key tied to their api_access_code.

Base URL

All requests are made to the following base URL format:

http://{server-dns}:{stream-port}/{api-access-code}/reseller/index.php

Replace {server-dns}, {stream-port}, and {api-access-code} with your server details.

Quick Start

Get up and running in minutes 1. Obtain your API key from the reseller panel.
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.
Quick Test
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.

ParameterTypeRequiredDescription
api_keystringRequiredYour unique API key for authentication
actionstringRequiredThe API action to perform
startintOptionalPagination offset for list endpoints (default: 0)
limitintOptionalNumber of records to return (default: 50)
show_columnsstringOptionalComma-separated list of column names to include in the response
hide_columnsstringOptionalComma-separated list of column names to exclude from the response

General

Retrieve reseller account information and available packages.

GET user_info Get Reseller Account Info

Returns your reseller account details including credits, status, and account settings.

Request
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=user_info"
Response
{
  "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"]
  }
}
GET packages Get Available Packages

Returns the list of packages available to your reseller account with pricing and duration details.

Request
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=packages"
Response
{
  "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.

POST create_line Create Line

Creates a new M3U line. Username and password are auto-generated if not provided.

ParameterTypeRequiredDescription
packageintRequiredPackage ID from the packages endpoint
trialintRequired0 = regular, 1 = trial
usernamestringOptionalCustom username (auto-generated if empty)
passwordstringOptionalCustom password (auto-generated if empty)
is_isplockintOptional0 = disabled, 1 = enable ISP lock
allowed_ips[]arrayOptionalArray of allowed IP addresses
reseller_notesstringOptionalInternal notes for the reseller
bouquets_selected[]arrayOptionalArray of bouquet IDs to assign
Request
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"
Response
{
  "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"
  }
}
POST edit_line Edit / Extend Line

Edit an existing line's properties or extend it with a new package. Provide the package parameter to extend the line's expiry.

ParameterTypeRequiredDescription
idintRequiredLine ID to edit
packageintOptionalPackage ID to extend with
usernamestringOptionalNew username
passwordstringOptionalNew password
is_isplockintOptional0 = disabled, 1 = enable ISP lock
allowed_ips[]arrayOptionalArray of allowed IP addresses
reseller_notesstringOptionalInternal notes
bouquets_selected[]arrayOptionalArray of bouquet IDs
Request
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"
GET get_line Get Single Line

Retrieve details of a single M3U line by its ID.

ParameterTypeRequiredDescription
idintRequiredLine ID
Request
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_line&id=4521"
Response
{
  "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"
  }
}
GET get_lines List All Lines

Retrieve a paginated list of all M3U lines. Supports search and status filtering.

ParameterTypeRequiredDescription
startintOptionalPagination offset (default: 0)
limitintOptionalRecords per page (default: 50)
search[value]stringOptionalSearch by username or other fields
filterintOptional1=Active, 2=Disabled, 3=Banned, 4=Expired, 5=Trial
Request
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_lines&start=0&limit=25&filter=1"
POST delete_line Delete Line

Permanently delete a line. This action cannot be undone.

ParameterTypeRequiredDescription
idintRequiredLine ID to delete
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=delete_line" \
  -d "id=4521"
POST disable_line Disable Line

Temporarily disable a line. The line can be re-enabled later.

ParameterTypeRequiredDescription
idintRequiredLine ID to disable
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=disable_line" \
  -d "id=4521"
POST enable_line Enable Line

Re-enable a previously disabled line.

ParameterTypeRequiredDescription
idintRequiredLine ID to enable
Request
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.

POST create_mag Create MAG Device

Register a new MAG device with its MAC address and assign a package.

ParameterTypeRequiredDescription
macstringRequiredMAC address (format: 00:1A:79:XX:XX:XX)
packageintRequiredPackage ID
trialintRequired0 = regular, 1 = trial
is_isplockintOptional0 = disabled, 1 = enable ISP lock
reseller_notesstringOptionalInternal notes
bouquets_selected[]arrayOptionalArray of bouquet IDs
Request
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"
POST edit_mag Edit / Extend MAG

Edit a MAG device's properties or extend its subscription.

ParameterTypeRequiredDescription
idintRequiredMAG device ID
macstringOptionalNew MAC address
packageintOptionalPackage ID for extension
is_isplockintOptional0 = disabled, 1 = enabled
reseller_notesstringOptionalInternal notes
bouquets_selected[]arrayOptionalArray of bouquet IDs
Request
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"
GET get_mag Get Single MAG

Retrieve details of a single MAG device.

ParameterTypeRequiredDescription
idintRequiredMAG device ID
Request
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_mag&id=301"
GET get_mags List MAG Devices

Retrieve a paginated list of all MAG devices. Supports search and status filtering.

ParameterTypeRequiredDescription
startintOptionalPagination offset (default: 0)
limitintOptionalRecords per page (default: 50)
search[value]stringOptionalSearch term
filterintOptional1=Active, 2=Disabled, 3=Banned, 4=Expired, 5=Trial
Request
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_mags&start=0&limit=25"
POST delete_mag Delete MAG

Permanently delete a MAG device entry.

ParameterTypeRequiredDescription
idintRequiredMAG device ID
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=delete_mag" \
  -d "id=301"
POST disable_mag Disable MAG

Temporarily disable a MAG device.

ParameterTypeRequiredDescription
idintRequiredMAG device ID
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=disable_mag" \
  -d "id=301"
POST enable_mag Enable MAG

Re-enable a previously disabled MAG device.

ParameterTypeRequiredDescription
idintRequiredMAG device ID
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=enable_mag" \
  -d "id=301"
POST convert_mag Convert MAG to M3U

Convert a MAG device subscription to an M3U line. Returns the newly created line with username and password.

ParameterTypeRequiredDescription
idintRequiredMAG device ID to convert
Request
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.

POST create_enigma Create Enigma2 Device

Register a new Enigma2 device with its MAC address and assign a package.

ParameterTypeRequiredDescription
macstringRequiredDevice MAC address
packageintRequiredPackage ID
trialintRequired0 = regular, 1 = trial
is_isplockintOptional0 = disabled, 1 = enable ISP lock
reseller_notesstringOptionalInternal notes
bouquets_selected[]arrayOptionalArray of bouquet IDs
Request
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"
POST edit_enigma Edit / Extend Enigma2

Edit an Enigma2 device's properties or extend its subscription.

ParameterTypeRequiredDescription
idintRequiredEnigma2 device ID
macstringOptionalNew MAC address
packageintOptionalPackage ID for extension
is_isplockintOptional0 = disabled, 1 = enabled
reseller_notesstringOptionalInternal notes
bouquets_selected[]arrayOptionalArray of bouquet IDs
Request
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"
GET get_enigma Get Single Enigma2

Retrieve details of a single Enigma2 device.

ParameterTypeRequiredDescription
idintRequiredEnigma2 device ID
Request
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_enigma&id=501"
GET get_enigmas List Enigma2 Devices

Retrieve a paginated list of all Enigma2 devices.

ParameterTypeRequiredDescription
startintOptionalPagination offset (default: 0)
limitintOptionalRecords per page (default: 50)
search[value]stringOptionalSearch term
filterintOptional1=Active, 2=Disabled, 3=Banned, 4=Expired, 5=Trial
Request
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_enigmas&start=0&limit=25"
POST delete_enigma Delete Enigma2

Permanently delete an Enigma2 device entry.

ParameterTypeRequiredDescription
idintRequiredEnigma2 device ID
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=delete_enigma" \
  -d "id=501"
POST disable_enigma Disable Enigma2

Temporarily disable an Enigma2 device.

ParameterTypeRequiredDescription
idintRequiredEnigma2 device ID
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=disable_enigma" \
  -d "id=501"
POST enable_enigma Enable Enigma2

Re-enable a previously disabled Enigma2 device.

ParameterTypeRequiredDescription
idintRequiredEnigma2 device ID
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=enable_enigma" \
  -d "id=501"
POST convert_enigma Convert Enigma2 to M3U

Convert an Enigma2 device subscription to an M3U line. Returns the newly created line with username and password.

ParameterTypeRequiredDescription
idintRequiredEnigma2 device ID to convert
Request
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.

POST create_activecode Create Activecode

Create a new activation code. If no custom code is provided, one will be auto-generated based on group settings.

ParameterTypeRequiredDescription
packageintRequiredPackage ID
trialintRequired0 = regular, 1 = trial
codestringOptionalCustom activation code (auto-generated if empty)
is_isplockintOptional0 = disabled, 1 = enable ISP lock
reseller_notesstringOptionalInternal notes
bouquets_selected[]arrayOptionalArray of bouquet IDs
Request
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"
Response
{
  "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"
  }
}
POST edit_activecode Edit / Extend Activecode

Edit an activecode's properties or extend it with a new package.

ParameterTypeRequiredDescription
idintRequiredActivecode ID
packageintOptionalPackage ID for extension
codestringOptionalChange the activation code
reseller_notesstringOptionalInternal notes
bouquets_selected[]arrayOptionalArray of bouquet IDs
Request
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"
GET get_activecode Get Single Activecode

Retrieve details of a single activation code.

ParameterTypeRequiredDescription
idintRequiredActivecode ID
Request
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_activecode&id=892"
GET get_activecodes List All Activecodes

Retrieve a paginated list of all activation codes.

ParameterTypeRequiredDescription
startintOptionalPagination offset (default: 0)
limitintOptionalRecords per page (default: 50)
search[value]stringOptionalSearch term
filterintOptional1=Active, 2=Disabled, 3=Banned, 4=Expired, 5=Trial
Request
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_activecodes&start=0&limit=25"
POST delete_activecode Delete Activecode

Permanently delete an activation code.

ParameterTypeRequiredDescription
idintRequiredActivecode ID
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=delete_activecode" \
  -d "id=892"
POST disable_activecode Disable Activecode

Temporarily disable an activation code.

ParameterTypeRequiredDescription
idintRequiredActivecode ID
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=disable_activecode" \
  -d "id=892"
POST enable_activecode Enable Activecode

Re-enable a previously disabled activation code.

ParameterTypeRequiredDescription
idintRequiredActivecode ID
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=enable_activecode" \
  -d "id=892"
POST reset_activecode Reset Activecode

Generate a new random activation code, replacing the existing one. Returns both the old and new codes.

ParameterTypeRequiredDescription
idintRequiredActivecode ID to reset
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=reset_activecode" \
  -d "id=892"
Response
{
  "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.

POST create_user Create Sub-Reseller

Create a new sub-reseller account under your reseller.

ParameterTypeRequiredDescription
usernamestringOptionalUsername (auto-generated if empty)
passwordstringOptionalPassword (auto-generated if empty)
emailstringOptionalEmail address
member_group_idintOptionalMember group ID to assign
reseller_dnsstringOptionalCustom DNS for the sub-reseller
notesstringOptionalInternal notes
Request
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"
POST edit_user Edit Sub-Reseller

Edit a sub-reseller account's properties.

ParameterTypeRequiredDescription
idintRequiredSub-reseller ID
usernamestringOptionalNew username
passwordstringOptionalNew password
emailstringOptionalNew email
member_group_idintOptionalNew member group ID
reseller_dnsstringOptionalCustom DNS
notesstringOptionalInternal notes
Request
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"
GET get_user Get Single Sub-Reseller

Retrieve details of a single sub-reseller account.

ParameterTypeRequiredDescription
idintRequiredSub-reseller ID
Request
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_user&id=88"
GET get_users List Sub-Resellers

Retrieve a paginated list of all sub-reseller accounts.

ParameterTypeRequiredDescription
startintOptionalPagination offset (default: 0)
limitintOptionalRecords per page (default: 50)
search[value]stringOptionalSearch term
filterintOptional1=Active, 2=Disabled, 3=Banned, 4=Expired, 5=Trial
Request
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=get_users&start=0&limit=25"
POST delete_user Delete Sub-Reseller

Permanently delete a sub-reseller account.

ParameterTypeRequiredDescription
idintRequiredSub-reseller ID
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=delete_user" \
  -d "id=88"
POST disable_user Disable Sub-Reseller

Temporarily disable a sub-reseller account.

ParameterTypeRequiredDescription
idintRequiredSub-reseller ID
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=disable_user" \
  -d "id=88"
POST enable_user Enable Sub-Reseller

Re-enable a previously disabled sub-reseller account.

ParameterTypeRequiredDescription
idintRequiredSub-reseller ID
Request
curl -X POST "http://dns:port/access/reseller/index.php" \
  -d "api_key=YOUR_KEY" \
  -d "action=enable_user" \
  -d "id=88"
POST adjust_credits Transfer Credits

Add or subtract credits from a sub-reseller account. Use positive values to add credits and negative values to subtract.

ParameterTypeRequiredDescription
idintRequiredSub-reseller ID
creditsintRequiredCredits to transfer (positive = add, negative = subtract)
notestringOptionalNote for the transaction log
Request
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"
Response
{
  "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.

GET activity_logs Activity Logs

Retrieve user activity logs with pagination support.

ParameterTypeRequiredDescription
startintOptionalPagination offset (default: 0)
limitintOptionalRecords per page (default: 50)
search[value]stringOptionalSearch term
Request
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=activity_logs&start=0&limit=50"
GET live_connections Live Connections

View currently active/live connections across your lines and devices.

ParameterTypeRequiredDescription
startintOptionalPagination offset (default: 0)
limitintOptionalRecords per page (default: 50)
search[value]stringOptionalSearch term
Request
curl -X GET "http://dns:port/access/reseller/index.php?api_key=YOUR_KEY&action=live_connections&start=0&limit=50"
GET user_logs Credit / Action Logs

Retrieve credit transactions and action logs.

ParameterTypeRequiredDescription
startintOptionalPagination offset (default: 0)
limitintOptionalRecords per page (default: 50)
search[value]stringOptionalSearch term
Request
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.

Standard Response
{
  "status": "STATUS_SUCCESS" | "STATUS_FAILURE",
  "data": { // Object or Array depending on the endpoint }
}
Important Always check the 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_SUCCESS
STATUS_FAILURE
STATUS_INSUFFICIENT_CREDITS
STATUS_INVALID_PACKAGE
STATUS_INVALID_MAC
STATUS_EXISTS_MAC
STATUS_EXISTS_USERNAME
STATUS_INVALID_USERNAME
STATUS_INVALID_PASSWORD
STATUS_NO_TRIALS
STATUS_INVALID_TYPE
STATUS_NO_PERMISSIONS
STATUS_INVALID_DATA