Developer API
API
A standard SMM Panel API for services, ordering, status checks, refills, cancellations and balance.
HTTP MethodPOST
API URL
https://smm021.com/api/v2Response formatJSON
01
services
Service list
Parameters
ParametersDescription
keyYour API keyactionservicesExample 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
Add order
Default
Parameters
ParametersDescription
keyYour API keyactionaddserviceService IDlinkLink to pagequantityNeeded quantityrunsRuns to deliver optionalintervalInterval in minutes optionalRuns and interval are accepted only when the selected service supports them.
Example response
{
"order": 23501
}
03
status
Order status
Parameters
ParametersDescription
keyYour API keyactionstatusorderOrder IDExample response
{
"charge": "0.27819",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "USD"
}
04
status
Multiple orders status
Parameters
ParametersDescription
keyYour API keyactionstatusordersOrder IDs separated by comma, up to 100 IDsExample 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
refill
Create refill
Parameters
ParametersDescription
keyYour API keyactionrefillorderOrder IDExample response
{
"refill": 1
}
06
refill
Create multiple refill
Parameters
ParametersDescription
keyYour API keyactionrefillordersOrder IDs separated by comma, up to 100 IDsExample response
[
{
"order": 1,
"refill": 1
},
{
"order": 2,
"refill": 2
},
{
"order": 3,
"refill": {
"error": "Incorrect order ID"
}
}
]
07
refill_status
Get refill status
Parameters
ParametersDescription
keyYour API keyactionrefill_statusrefillRefill IDExample response
{
"status": "Completed"
}
08
refill_status
Get multiple refill status
Parameters
ParametersDescription
keyYour API keyactionrefill_statusrefillsRefill IDs separated by comma, up to 100 IDsExample response
[
{
"refill": 1,
"status": "Completed"
},
{
"refill": 2,
"status": "Rejected"
},
{
"refill": 3,
"status": {
"error": "Refill not found"
}
}
]
09
cancel
Create cancel
Parameters
ParametersDescription
keyYour API keyactioncancelordersOrder IDs separated by comma, up to 100 IDsExample response
[
{
"order": 9,
"cancel": {
"error": "Incorrect order ID"
}
},
{
"order": 2,
"cancel": 1
}
]
10
balance
User balance
Parameters
ParametersDescription
keyYour API keyactionbalanceExample response
{
"balance": "100.84292",
"currency": "USD"
}
PHP
Client
PHP integration example
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]);