Ordering social media growth services by hand through a website works fine while volumes are small. Once you place dozens of orders a day or run your own reseller panel, you need the API. The good news is that almost every SMM panel speaks the same language: the format grew around the Perfect Panel engine and became the market standard. Here is how it works, using the Heroverin SMM API.
How a Standard SMM Panel API Works
The API has a single endpoint and two required parameters. Our endpoint is https://heroverin.info/api/v2. The key parameter is your personal key, found in your account under the API section. The action parameter tells the server what to do: fetch the catalog, create an order, check a status. Requests are sent via POST and the response always comes back as JSON.
- services - the list of services with prices and limits;
- add - create an order;
- status - the status of one or several orders;
- cancel - cancel an order that is not finished yet;
- balance - the current account balance.
The key gives full access to your balance, so keep it on the server. Panel basics are covered in what an SMM panel is.
Catalog and Balance: services and balance
Every integration starts with services: this is where you get service IDs, the price per 1000, minimum and maximum quantity and the order type.
curl -X POST https://heroverin.info/api/v2 \
-d key=YOUR_KEY \
-d action=services
[
{
"service": 101,
"name": "Instagram Followers",
"type": "Default",
"rate": "1.2000",
"min": 100,
"max": 10000,
"refill": true,
"cancel": true
}
]
The numbers are illustrative. The type field tells you which parameters an order needs: Default means a plain link and quantity, custom comments take lines of text, and a subscription to new posts takes a minimum and maximum quantity plus a delay. Checking the balance is just as simple:
curl -X POST https://heroverin.info/api/v2 -d key=YOUR_KEY -d action=balance
{"balance": "25.4000", "currency": "USD"}
Creating an Order: the add Method
A regular order needs a service ID, a link and a quantity. The response contains the order number you will use to track its status.
curl -X POST https://heroverin.info/api/v2 \
-d key=YOUR_KEY \
-d action=add \
-d service=101 \
-d link=https://instagram.com/username \
-d quantity=1000
{"order": 23501}
If a service supports gradual delivery, add runs (how many portions) and interval (the pause between them in minutes). How to pick those values is explained in the article on drip-feed. Funds are taken from the balance when the order is created.
Statuses and Cancellation: status and cancel
Query a single order with the order parameter, or several at once with orders and a comma-separated list of IDs.
curl -X POST https://heroverin.info/api/v2 \
-d key=YOUR_KEY -d action=status -d orders=23501,23502
{
"23501": {"charge": "1.20", "start_count": "3572", "status": "In progress", "remains": "640", "currency": "USD"},
"23502": {"error": "Incorrect order ID"}
}
Our API returns these statuses: Pending, In progress, Completed, Partial and Canceled. With Partial the undelivered remainder goes back to your balance, with Canceled the full amount does. What each status means and when it changes is covered in the guide to order statuses.
The cancel method accepts order or orders and replies {"cancel": 1} when the cancellation is accepted. A finished order cannot be cancelled. Our API has no refill action: a guarantee refill is requested from your account, on the order itself. Many other panels on the standard do offer refill and refill_status, so when you connect someone else's API, check for them separately.
Errors and Polling Frequency
Errors arrive in the error field, usually with HTTP code 200, so check the body, not the code.
- Incorrect API key - the key is wrong or has been regenerated;
- Incorrect action - a typo in the action;
- Incorrect service ID - the service does not exist or is disabled;
- Not enough funds on balance - the balance is too low;
- a limits error - the quantity is outside the service's min-max range.
Do not poll every order with a separate request every minute. Batch active orders through orders, check them every few minutes and drop finished ones from the queue.
Refreshing the service catalog every few hours is enough.
Connecting One Panel to Another as a Provider
Because the format is shared, any panel on this standard can be connected to another one as a supplier. In your panel's admin area you add a provider, enter the API URL and key, import the services you want and set your own price. How to choose who to connect to is covered in how to choose a provider for your SMM panel.
If you do not have a panel yet, you can rent one from SMMPanelRent: on a subdomain or your own domain, under your brand and prices. A panel that runs on the Heroverin SMM catalog is free at any volume. To get started, sign up at heroverin.info, open the API section in your account and make your first services request.