API documentation
Send form parameters as a POST request. Responses are returned as JSON.
POST
https://smmpeak.in/api/v2Add order
| Parameters | Description |
|---|---|
| key | Your API key |
| action | add |
| service | Service ID |
| url | Link to page |
| quantity | Needed quantity |
| comments (optional) | Comments list (encoded) |
| runs (optional) | Runs to deliver |
| interval (optional) | Interval in minutes |
Example success response
{
"order": 23501
}
Example error response
{
"error": "incorrect service type"
}
List services
| Parameters | Description |
|---|---|
| key | Your API key |
| action | services |
Example response
[
{
"service": 1,
"name": "Followers",
"type": "Default",
"category": "First Category",
"rate": "0.90",
"min": "50",
"max": "10000"
},
{
"service": 2,
"name": "Comments",
"type": "Custom Comments",
"category": "Second Category",
"rate": "8",
"min": "10",
"max": "1500"
}
]
Order status
| Parameters | Description |
|---|---|
| key | Your API key |
| action | status |
| order | Order ID |
Example response
{
"charge": "0.27819",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "USD"
}
Multiple order status
| Parameters | Description |
|---|---|
| key | Your API key |
| action | status |
| orders | Order IDs separated by comma(100 orders at once) |
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"
}
}
Balance
| Parameters | Description |
|---|---|
| key | Your API key |
| action | balance |
Example response
{
"balance": 10000,
"currency": "USD"
}
Refill
| Parameters | Description |
|---|---|
| key | Your API key |
| action | refill |
| order | Order ID |
Example response
{
"status": "Success",
"message": "Your order successfully added for refill. Thank you for patience."
}
Cancel
| Parameters | Description |
|---|---|
| key | Your API key |
| action | cancel |
| order | Order ID |
Example response
{
"status": "Success",
"message": "Your order was successfully marked for cancellation. Thank you for patience."
}
PHP example
List available services using the API key from your account.
<?php
$key = getenv('SMMPEAK_API_KEY');
if (!$key) {
throw new RuntimeException('Set SMMPEAK_API_KEY before running this example.');
}
$request = curl_init('https://smmpeak.in/api/v2');
curl_setopt_array($request, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query(['key' => $key, 'action' => 'services']),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 20,
]);
$response = curl_exec($request);
if ($response === false || curl_getinfo($request, CURLINFO_HTTP_CODE) >= 400) {
throw new RuntimeException('The API request failed.');
}
print_r(json_decode($response, true, 512, JSON_THROW_ON_ERROR));