Home Services Blog About us Terms of use API

API

A standard SMM Panel API for services, ordering, status checks, refills, cancellations and balance.

HTTP MethodPOST
API URLhttps://smm021.com/api/v2
Response formatJSON
01

Service list

services

Parameters

ParametersDescription
keyYour API key
actionservices

Example response

[
    {
        "service": 1,
        "name": "Followers",
        "type": "Default",
        "category": "First Category",
        "rate": "0.9",
        "rate_unit": 1000,
        "min": "50",
        "max": "10000",
        "refill": true,
        "cancel": true
    },
    {
        "service": 2,
        "name": "Comments",
        "type": "Default",
        "category": "Second Category",
        "rate": "8",
        "rate_unit": 1,
        "min": "10",
        "max": "1500",
        "refill": false,
        "cancel": true
    }
]
02

Add order

add
Default

Parameters

ParametersDescription
keyYour API key
actionadd
serviceService ID
linkLink to page
quantityNeeded quantity
runsRuns to deliver optional
intervalInterval in minutes optional
Runs and interval are accepted only when the selected service supports them.

Example response

{
    "order": 23501
}
03

Order status

status

Parameters

ParametersDescription
keyYour API key
actionstatus
orderOrder ID

Example response

{
    "charge": "0.27819",
    "start_count": "3572",
    "status": "Partial",
    "remains": "157",
    "currency": "USD"
}
04

Multiple orders status

status

Parameters

ParametersDescription
keyYour API key
actionstatus
ordersOrder IDs separated by comma, up to 100 IDs

Example response

{
    "1": {
        "charge": "0.27819",
        "start_count": "3572",
        "status": "Partial",
        "remains": "157",
        "currency": "USD"
    },
    "10": {
        "error": "Incorrect order ID"
    },
    "100": {
        "charge": "1.44219",
        "start_count": "234",
        "status": "In progress",
        "remains": "10",
        "currency": "USD"
    }
}
05

Create refill

refill

Parameters

ParametersDescription
keyYour API key
actionrefill
orderOrder ID

Example response

{
    "refill": 1
}
06

Create multiple refill

refill

Parameters

ParametersDescription
keyYour API key
actionrefill
ordersOrder IDs separated by comma, up to 100 IDs

Example response

[
    {
        "order": 1,
        "refill": 1
    },
    {
        "order": 2,
        "refill": 2
    },
    {
        "order": 3,
        "refill": {
            "error": "Incorrect order ID"
        }
    }
]
07

Get refill status

refill_status

Parameters

ParametersDescription
keyYour API key
actionrefill_status
refillRefill ID

Example response

{
    "status": "Completed"
}
08

Get multiple refill status

refill_status

Parameters

ParametersDescription
keyYour API key
actionrefill_status
refillsRefill IDs separated by comma, up to 100 IDs

Example response

[
    {
        "refill": 1,
        "status": "Completed"
    },
    {
        "refill": 2,
        "status": "Rejected"
    },
    {
        "refill": 3,
        "status": {
            "error": "Refill not found"
        }
    }
]
09

Create cancel

cancel

Parameters

ParametersDescription
keyYour API key
actioncancel
ordersOrder IDs separated by comma, up to 100 IDs

Example response

[
    {
        "order": 9,
        "cancel": {
            "error": "Incorrect order ID"
        }
    },
    {
        "order": 2,
        "cancel": 1
    }
]
10

User balance

balance

Parameters

ParametersDescription
keyYour API key
actionbalance

Example response

{
    "balance": "100.84292",
    "currency": "USD"
}
PHP

PHP integration example

Client

A ready-to-use PHP client for the methods documented above. SSL verification stays enabled.

PHP

<?php

class Api
{
    /** API URL */
    public string $api_url = 'https://smm021.com/api/v2';

    /** Your API key */
    public string $api_key = '';

    /** Add order */
    public function order(array $data): mixed
    {
        return $this->request(array_merge([
            'key' => $this->api_key,
            'action' => 'add',
        ], $data));
    }

    /** Get single order status */
    public function status(int $orderId): mixed
    {
        return $this->request([
            'key' => $this->api_key,
            'action' => 'status',
            'order' => $orderId,
        ]);
    }

    /** Get multiple order statuses */
    public function multiStatus(array $orderIds): mixed
    {
        return $this->request([
            'key' => $this->api_key,
            'action' => 'status',
            'orders' => implode(',', $orderIds),
        ]);
    }

    /** Get services */
    public function services(): mixed
    {
        return $this->request([
            'key' => $this->api_key,
            'action' => 'services',
        ]);
    }

    /** Create refill */
    public function refill(int $orderId): mixed
    {
        return $this->request([
            'key' => $this->api_key,
            'action' => 'refill',
            'order' => $orderId,
        ]);
    }

    /** Create multiple refills */
    public function multiRefill(array $orderIds): mixed
    {
        return $this->request([
            'key' => $this->api_key,
            'action' => 'refill',
            'orders' => implode(',', $orderIds),
        ]);
    }

    /** Get refill status */
    public function refillStatus(int $refillId): mixed
    {
        return $this->request([
            'key' => $this->api_key,
            'action' => 'refill_status',
            'refill' => $refillId,
        ]);
    }

    /** Get multiple refill statuses */
    public function multiRefillStatus(array $refillIds): mixed
    {
        return $this->request([
            'key' => $this->api_key,
            'action' => 'refill_status',
            'refills' => implode(',', $refillIds),
        ]);
    }

    /** Cancel orders */
    public function cancel(array $orderIds): mixed
    {
        return $this->request([
            'key' => $this->api_key,
            'action' => 'cancel',
            'orders' => implode(',', $orderIds),
        ]);
    }

    /** Get account balance */
    public function balance(): mixed
    {
        return $this->request([
            'key' => $this->api_key,
            'action' => 'balance',
        ]);
    }

    private function request(array $post): mixed
    {
        $ch = curl_init($this->api_url);
        curl_setopt_array($ch, [
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_POST => true,
            CURLOPT_POSTFIELDS => http_build_query($post),
            CURLOPT_CONNECTTIMEOUT => 5,
            CURLOPT_TIMEOUT => 20,
            CURLOPT_SSL_VERIFYPEER => true,
            CURLOPT_SSL_VERIFYHOST => 2,
            CURLOPT_FOLLOWLOCATION => true,
            CURLOPT_HTTPHEADER => [
                'Accept: application/json',
                'Content-Type: application/x-www-form-urlencoded',
            ],
        ]);

        $result = curl_exec($ch);

        if ($result === false) {
            $error = curl_error($ch);
            curl_close($ch);
            throw new RuntimeException($error ?: 'API connection failed.');
        }

        curl_close($ch);

        return json_decode((string)$result);
    }
}

// Examples
$api = new Api();
$api->api_key = 'YOUR_API_KEY';

$services = $api->services();
$balance = $api->balance();

$order = $api->order([
    'service' => 1,
    'link' => 'https://example.com/test',
    'quantity' => 100,
]);

$status = $api->status($order->order);
$statuses = $api->multiStatus([1, 2, 3]);

$refill = $api->refill(1);
$refills = $api->multiRefill([1, 2]);