Documentation
Customer API of your panel
Every Arty panel includes a reseller API in the common SMM panel API v2 format. Customers, other panels and ready-made tools use it to list services, place orders and follow them. This page lists each action, its parameters and its answer.
The basics
The API has one address on your own domain, and your customers see it, together with a ready-made description, on the API page of their account. For a panel on example.com it is https://example.com/api/v2. For the background, see the SMM panel API explained.
- Send a
POSTrequest. - Send the fields as form fields (
application/x-www-form-urlencoded). - Every request needs
key(the customer's API key) andaction(what to do), plus the fields of that action. - Every answer is JSON.
- The API follows the common format, so most panels and tools that support it can connect with only the address and the key. Subscription orders differ in a few details, listed below.
A sample request that places an order: curl -X POST https://example.com/api/v2 -d key=YOUR_API_KEY -d action=add -d service=1 -d link=https://example.com/profile -d quantity=1000.
The prices, balance and amounts are in the currency of your panel. Provider service numbers and provider order numbers are never part of an answer: customers only see your own numbers.
The API key
- Each customer has one key. It is the only thing that identifies them in the
keyparameter. - On the API page of their account, a customer can choose Generate new key. This needs their current password.
- The key is shown once, right after it is generated. A customer who lost the key generates a new one.
- A new key makes the old key invalid at once. Every tool that used the old key stops working until it gets the new one.
- A key is refused if it is missing, wrong or longer than 191 characters, or if the account is closed.
Tell your customers to keep the key private: anyone who has it can place orders with their balance.
Answers and errors
A mistake in the request is not an HTTP error. The answer has the status HTTP 200 and the body has one field: {"error":"Incorrect service ID"}. A client must look for the error field in every answer.
Invalid API key: the key is missing, wrong, or the account is closed.Incorrect request:actionis missing or unknown, a required parameter is missing, the quantity is not a whole number,runsorintervalwas sent on its own, or more than 100 numbers were sent in one request.Incorrect service ID: the service does not exist or is not for sale.Incorrect link: the link is longer than 191 characters.Quantity less than minimal NandQuantity more than maximal N: the quantity is outside the limits of the service (N is the limit).Not enough funds on balance: the balance cannot pay the order.Drip-feed is not available for this service:runsorintervalwas sent to a service that does not support drip-feed.Runs less than minimal 2,Runs more than maximal 1000,Interval less than minimal 1,Interval more than maximal 10080: drip-feed values outside the limits.Incorrect order ID: the order does not exist or does not belong to the key.Refill is not available for this order,Refill not foundandCancel is not available for this order: see the refill and cancel actions below.Incorrectfollowed by a field name, for exampleIncorrect comments: a field of a service type with extra order fields has the wrong format.Internal server error: a fault on the server, sent with HTTP 500. The result of the request is unclear, so the customer should check the balance and the orders before sending the same order again.Too many requests: sent with HTTP 429 and aRetry-Afterheader when the key sends requests too fast. Wait for the number of seconds in the header.
If you set a service to refuse a second open order with the same link, the add answer can also be {"error":"You have an active order with this link. Please wait until order being completed."}.
services: the list of services
Parameters: key, action=services.
The answer is a list with one entry for every service that is for sale. Each entry has:
service: the service number you use inadd.nameandcategory: the service name and its category.type:Defaultfor a standard service,Subscriptionsfor a subscription, or the name of a service type that takes extra order fields.rate: the price per 1000 for the key owner, in your panel currency. This is the price of the account, so two customers can see different rates.minandmax: the smallest and the largest quantity of one order.refillandcancel:truewhen the service accepts that request through the API.dripfeed:truewhen drip-feed orders (runsandinterval) are possible.
Sample answer, shortened to one entry: [{"service":1,"name":"Instagram Followers","type":"Default","category":"Instagram","rate":"0.90","min":"50","max":"10000","refill":true,"cancel":true,"dripfeed":true}].
add: place an order
Parameters for a standard service:
keyandaction=add: required.service: required, the number from the service list.link: required, the page or the username to work on, up to 191 characters.quantity: required, a whole number betweenminandmaxof the service.runsandinterval: optional, for a drip-feed order, and sent together.runsis the number of runs (2 to 1000).intervalis the minutes between two runs (1 to 10080).
The answer is the order number: {"order":23501}. The price is taken from the balance at once. For a drip-feed order the number is the number of the first run, the whole price is taken at once, and the later runs are placed interval minutes apart.
Services of type Subscriptions use other parameters instead of link and quantity:
username: required, the account to follow.minandmax: the smallest and the largest quantity per post, within the limits of the service.posts: the number of new posts to process. It is required, because unlimited subscriptions are not available.old_posts: optional, the number of existing posts to process.delay: minutes of delay, one of 0, 5, 10, 15, 20, 30, 40, 50, 60, 90, 120, 150, 180, 210, 240, 270, 300, 360, 420, 480, 540 or 600.expiry: optional end date asdd/mm/yyyy, after today.
The answer has the same shape, {"order":1000000001}, but this number is a subscription number, not an order number. Subscription numbers start from 1000000001. The fee is (posts + old_posts) times max times the price, divided by 1000, and it is taken when the subscription opens. The part for posts that were not processed is returned when the subscription completes, expires or is canceled.
Services with extra order fields (service types) take their own fields in place of or next to link and quantity. Drip-feed is not available for them. The answer is the same as for a standard order. A missing field gives Incorrect request, and a field in the wrong format gives Incorrect and the field name.
- Package:
link. The price is the listed rate, once;quantityis ignored. - SEO:
link,quantityandkeywords. - Custom Comments:
linkandcomments, one comment per line.quantityis ignored; it is the number of comments. - Mentions:
link,quantityandusernames, separated by commas or line breaks. - Mentions with Hashtags:
link,quantity,usernamesandhashtags. - Mentions Custom List:
usernames, one per line.linkandquantityare ignored. - Mentions Hashtag:
link,quantityandhashtag. - Mentions User Followers:
link,quantityandusername. - Mentions Media Likers:
link,quantityandmedia. - Poll:
link,quantityandanswer_number, a whole number from 1. - Comment Replies:
usernameandcomments, one reply per line.linkandquantityare ignored. - Web Traffic:
link,quantity,country,deviceandtype_of_traffic;google_keywordandreferring_urlare optional.
The type value in the service list tells which of these a service uses. The API page of the customer account always shows the exact list of fields of your panel.
status: follow orders
One order: key, action=status and order. The answer has charge, start_count, status, remains and currency. For example {"charge":"0.27819","start_count":"3572","status":"Partial","remains":"157","currency":"USD"}.
chargeis the net amount: the price of the order minus anything that was refunded.start_countis the count when the work started, andremainsis the quantity left.statusis one ofPending,Processing,In progress,Completed,Partial,CanceledorRefunded.Incorrect order IDis returned for an order that does not exist or belongs to someone else.
Several orders: send orders as numbers separated by commas, up to 100, instead of order. The answer is an object whose keys are the numbers you sent. A number that is not found gets an error instead: {"1":{"charge":"0.27819","start_count":"3572","status":"Partial","remains":"157","currency":"USD"},"10":{"error":"Incorrect order ID"}}. More than 100 numbers give Incorrect request for the whole request.
A subscription number gives another answer, with status (Active, Paused, Completed, Expired or Canceled), expiry (dd/mm/yyyy or empty), posts (the number of posts processed) and orders (the numbers of its post orders).
balance, refill, refill_status and cancel
balance: key and action=balance. The answer is {"balance":"100.84292","currency":"USD"}.
refill: key, action=refill and order, or orders with up to 100 numbers separated by commas. It opens a refill request for a Completed or Partial order whose service has refill set to true. The answer is the refill number, {"refill":1}. With orders the answer is a list, one entry for each order: [{"order":1,"refill":1},{"order":2,"refill":{"error":"Refill is not available for this order"}}].
- A refill is refused when the service does not allow refill, when the order belongs to a subscription or a drip-feed order, when the order is not Completed or Partial, when a refill for the order is already open, when the last refill of the order was completed less than 24 hours ago, when the key already has 50 open refill and cancel requests, or when refill requests through the API are turned off for the account.
refill_status: key, action=refill_status and refill, or refills with up to 100 numbers. The answer is {"status":"Completed"}, or a list such as [{"refill":1,"status":"Completed"},{"refill":2,"status":{"error":"Refill not found"}}]. The status is Pending, In progress, Completed, Rejected or Error. A customer can only see their own refills.
cancel: key, action=cancel and orders with up to 100 numbers. It opens a cancel request for each order whose service has cancel set to true and whose status is Pending, In progress or Processing. The answer is a list: [{"order":2,"cancel":1},{"order":9,"cancel":{"error":"Incorrect order ID"}}].
"cancel":1means the request was opened. It is not an instant cancellation and nothing is refunded yet.- When the provider cancels the order, its status becomes Canceled, or Partial if part was already delivered, and the undelivered part goes back to the customer's balance. The customer follows the result with
status. - A cancel request is refused with
Cancel is not available for this orderwhen the service does not allow cancel, when the order belongs to a subscription or a drip-feed order, when it has another status, when a cancel request is already open, or when the key already has 50 open requests.
Actions between Arty panels
The actions add_status, add_batch, batch_status, panel_info, push_register and push_unregister are for one Arty panel talking to another. They let a panel that uses yours as its provider send orders in packets, follow them without sending an order twice, and receive status changes within about 30 seconds. They are used automatically when your customer is an Arty panel. Normal customers and tools never need them.
Sending order packets needs a connection that Arty has verified, and it is refused with HTTP 403 otherwise. Reading the result of a packet that was already sent is still possible.
For the other side of the connection, where your panel is the customer of a provider, read Providers.