Saltar al contenido
  1. Inicio
  2. Blog
  3. Artículo

How to Automate Your SMM Agency with NexaPanel REST API v2 (Complete Developer Guide)

October 22, 2026 · 2 min de lectura · Por NexaPanel

How to Automate Your SMM Agency with NexaPanel REST API v2 (Complete Developer Guide)

Manual order placement works when your agency processes 5 to 10 campaigns a day. Once your order volume scales into hundreds or thousands of daily requests, manual fulfillment becomes a bottleneck that erodes your team's productivity. With the NexaPanel REST API v2, you can automate 100% of your service catalog syncing, order dispatching, status polling, and refill protection.

Understanding the NexaPanel REST API v2 Architecture

NexaPanel exposes a unified, industry-standard HTTP POST endpoint at https://nexapanel.io/api/v2. It accepts either application/x-www-form-urlencoded or JSON payloads and responds with deterministic UTF-8 JSON in under 180ms median latency.

Core API Actions Supported

  • action=services — Fetches the complete NexaPanel wholesale catalog including service IDs, category names, rates per 1,000, minimum/maximum limits, and refill flags.
  • action=add — Dispatches a new order (supports standard, custom comments, mentions, and drip-feed parameters).
  • action=status — Returns real-time status (Pending, In progress, Completed, Partial, Canceled), start_count, and remains for single or comma-separated bulk order IDs.
  • action=refill — Initiates an automated refill task for orders within their 30D–365D guarantee window.
  • action=balance — Retrieves your current master wallet balance and currency code (USD) to trigger low-balance alerts.

Production PHP cURL Integration Snippet

Below is a clean, production-ready PHP wrapper you can drop into any Laravel, WordPress/WooCommerce, or custom reseller application to communicate with NexaPanel:

<?php
class nexapanelApiClient {
    private string $apiUrl = 'https://nexapanel.io/api/v2';
    private string $apiKey;

    public function __construct(string $apiKey) {
        $this->apiKey = $apiKey;
    }

    public function request(array $params): array {
        $payload = array_merge(['key' => $this->apiKey], $params);
        $ch = curl_init($this->apiUrl);
        curl_setopt_array($ch, [
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_POST           => true,
            CURLOPT_POSTFIELDS     => http_build_query($payload),
            CURLOPT_TIMEOUT        => 15,
        ]);
        $response = curl_exec($ch);
        curl_close($ch);
        return json_decode($response, true) ?? [];
    }
}

// Example: Dispatch 10,000 Instagram Reels Views
$NexaPanel = new nexapanelApiClient('YOUR_nexapanel_API_KEY');
$order = $NexaPanel->request([
    'action'   => 'add',
    'service'  => 1042,
    'link'     => 'https://www.instagram.com/reel/C8xYzExample/',
    'quantity' => 10000,
]);
// Returns: ["order" => 948210]

Best Practices for High-Volume Resellers

  1. Sync Prices Every 15 Minutes via Cron: Run a background cron job calling action=services every 15 minutes so your storefront automatically reflects new services, updated min/max limits, and dynamic wholesale price drops.
  2. Use Batch Status Polling: Instead of sending 100 separate HTTP requests for 100 active orders, pass orders=101,102,103... in a single action=status call to reduce server overhead by 99%.
  3. Monitor Master Wallet Thresholds: Poll action=balance hourly and configure a Telegram or Slack webhook alert whenever your NexaPanel balance drops below your daily burn rate.

Ready to connect your application? View our full NexaPanel API v2 Documentation or sign in to generate your API key.