Integrate SmartFISH services into your application with our powerful and easy-to-use API
https://smartsmm.codeera.dev/api/v2
Login to get your API key
<?php
class Api
{
public $api_url = 'https://smartsmm.codeera.dev/api/v2';
public $api_key = 'YOUR_API_KEY';
public function order($data)
{
$post = array_merge(['key' => $this->api_key, 'action' => 'add'], $data);
return json_decode((string)$this->connect($post));
}
public function status($order_id)
{
return json_decode($this->connect([
'key' => $this->api_key,
'action' => 'status',
'order' => $order_id
]));
}
public function multiStatus($order_ids)
{
return json_decode($this->connect([
'key' => $this->api_key,
'action' => 'status',
'orders' => implode(',', (array)$order_ids)
]));
}
public function services()
{
return json_decode($this->connect([
'key' => $this->api_key,
'action' => 'services',
]));
}
public function refill(int $orderId)
{
return json_decode($this->connect([
'key' => $this->api_key,
'action' => 'refill',
'order' => $orderId,
]));
}
public function multiRefill(array $orderIds)
{
return json_decode($this->connect([
'key' => $this->api_key,
'action' => 'refill',
'orders' => implode(',', $orderIds),
]), true);
}
public function refillStatus(int $refillId)
{
return json_decode($this->connect([
'key' => $this->api_key,
'action' => 'refill_status',
'refill' => $refillId,
]));
}
public function multiRefillStatus(array $refillIds)
{
return json_decode($this->connect([
'key' => $this->api_key,
'action' => 'refill_status',
'refills' => implode(',', $refillIds),
]), true);
}
public function cancel(array $orderIds)
{
return json_decode($this->connect([
'key' => $this->api_key,
'action' => 'cancel',
'orders' => implode(',', $orderIds),
]), true);
}
public function balance()
{
return json_decode($this->connect([
'key' => $this->api_key,
'action' => 'balance',
]));
}
private function connect($post)
{
$_post = [];
if (is_array($post)) {
foreach ($post as $name => $value) {
$_post[] = $name . '=' . urlencode($value);
}
}
$ch = curl_init($this->api_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, join('&', $_post));
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)');
$result = curl_exec($ch);
if (curl_errno($ch) != 0 && empty($result)) {
$result = false;
}
curl_close($ch);
return $result;
}
}
// Usage examples
$api = new Api();
$services = $api->services();
$balance = $api->balance();
$order = $api->order(['service' => 1, 'link' => 'http://example.com', 'quantity' => 100]);
$status = $api->status($order->order ?? null);
Your API key
services
// Example response
[
{
"service": 1,
"name": "Instagram Followers [High Quality]",
"category": "Instagram",
"rate": "2.50",
"min": 100,
"max": 10000,
"type": "default"
},
{
"service": 2,
"name": "Facebook Page Likes",
"category": "Facebook",
"rate": "3.00",
"min": 50,
"max": 5000,
"type": "default"
}
]
Your API key
add
Service ID
Target URL
Order quantity
Number of runs
Interval in minutes
// Example response
{
"status": "success",
"order": 12345
}
Your API key
status
Order ID
// Example response
{
"status": "Processing",
"charge": "25.00",
"start_count": 1250,
"remains": 500,
"currency": "USD"
}
Your API key
statuses
Order IDs (comma separated)
// Example response
[
{
"order": 12345,
"status": "Completed",
"charge": "25.00",
"start_count": 1250,
"remains": 0
},
{
"order": 12346,
"status": "Processing",
"charge": "15.50",
"start_count": 800,
"remains": 200
}
]
Your API key
balance
// Example response
{
"status": "success",
"balance": "1,234.56",
"currency": "USD"
}
Your API key
refill
Order ID
// Response
{
"refill": "1"
}
Your API key
refill_status
Refill ID
// Response
{
"status": "Completed"
}