Legacy API โ Classic format
A drop-in compatibility layer for systems built around the classic
apiKay + action query-string format.
Everything is served by a single endpoint โ no headers, no JSON bodies.
One endpoint. Same data. Zero code changes for classic clients.
GET https://su-persim.uz/api/v1/compat?apiKay=YOUR_KEY&action=getBalance
apiKay (the legacy spelling) and apiKey are accepted.
server and auto_logout are accepted but ignored โ logout is handled via the REST endpoint.
Authentication
Every request carries your API key as a query parameter. Keys are issued only through the Telegram bot and are stored hashed โ they can never be recovered.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
apiKay | String | Required | Your API key (legacy spelling โ both spellings work) |
apiKey | String | Alias | Modern spelling of the same key |
action | String | Required | One of: getBalance, getCountrys, getInfo, getNumber, getCode, wallet |
429.API Reference
Your current wallet balance, at a glance.
Returns your account balance.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
action | String | Required | getBalance |
GET https://su-persim.uz/api/v1/compat?apiKay=YOUR_KEY&action=getBalance
{ "success": true, "action": "getBalance", "balance": 12.5 }
Every country we serve, with live prices and stock.
Returns all active countries with prices and live stock counts. The country field is the ISO code used by getNumber.
GET https://su-persim.uz/api/v1/compat?apiKay=YOUR_KEY&action=getCountrys
{
"success": true,
"action": "getCountrys",
"countries": [
{
"country": "PS",
"name": "Palestine",
"flag": "๐ต๐ธ",
"price_ready": 2.0,
"price_session": 1.5,
"stock_ready": 0,
"stock_session": 4
}
]
}
Know who you are, and how much you've ordered.
Returns your account info: Telegram id, username, balance and total orders placed.
GET https://su-persim.uz/api/v1/compat?apiKay=YOUR_KEY&action=getInfo
{
"success": true,
"action": "getInfo",
"telegram_id": 123456789,
"username": "buyer",
"balance": 12.5,
"total_orders": 3,
"is_banned": false
}
Buy one account, in one call.
Purchases one session account for the given country (ISO code, case-insensitive).
Equivalent to POST /api/v1/buy with account_type: "session" โ
the balance is deducted atomically and your 2FA preference is applied if configured.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
action | String | Required | getNumber |
country | String | Required | ISO country code, e.g. PS |
server | Integer | Optional | Ignored โ kept for compatibility |
GET https://su-persim.uz/api/v1/compat?apiKay=YOUR_KEY&action=getNumber&country=PS
{
"success": true,
"action": "getNumber",
"order_id": 42,
"phone": "+9701234567",
"country": "PS",
"price": 1.5,
"password_2fa": "ultra",
"message": "Account purchased. Use getCode with your order id to fetch the login code."
}
getCode using the returned order_id as hash_code.The login code, whenever you're ready.
Returns the login (activation) code for an order you purchased.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
action | String | Required | getCode |
hash_code | Integer | Required | Your order id |
auto_logout | String | Optional | Ignored โ logout is done via the REST endpoint |
GET https://su-persim.uz/api/v1/compat?apiKay=YOUR_KEY&action=getCode&hash_code=42
{
"success": true,
"action": "getCode",
"order_id": 42,
"phone": "+9701234567",
"code": "12345",
"raw_message": "..."
}
Not on this service โ and probably never will be.
The withdrawal wallet does not exist on this service. Calling it returns HTTP 501:
{ "success": false, "action": "wallet", "error": "The wallet (withdrawal) feature is not supported by this service." }
Examples
The complete lifecycle โ balance, buy, code.
1 ยท Check your balance
curl "https://su-persim.uz/api/v1/compat?apiKay=YOUR_KEY&action=getBalance"
2 ยท Buy an account
curl "https://su-persim.uz/api/v1/compat?apiKay=YOUR_KEY&action=getNumber&country=PS"
3 ยท Fetch the login code
curl "https://su-persim.uz/api/v1/compat?apiKay=YOUR_KEY&action=getCode&hash_code=42"
password_2fa + code, then clean up the session via POST /api/v1/logout/{order_id} so you are the only active session.Errors
Every error tells you exactly what went wrong.
Errors return an HTTP status code plus a JSON body with an error message:
{ "success": false, "action": "getNumber", "error": "Invalid or inactive country code: XX" }
| HTTP | Meaning |
|---|---|
| 200 | Success |
| 400 | Missing/invalid parameter or unknown action |
| 401 | Invalid API key |
| 403 | Account suspended |
| 404 | Country or order not found |
| 429 | Rate limited โ slow down and retry later |
| 501 | Feature not supported (wallet) |
Changelog
- Initial release of the legacy classic-format compatibility endpoint
/api/v1/compat - Actions:
getBalance,getCountrys,getInfo,getNumber,getCode walletintentionally unsupported (returns 501)- Purchases share the same atomic engine as the REST
/buyendpoint
Need the full modern API? Read the Supersim REST API documentation.