Request Example — Single Item
curl -X POST https://ucapi.ucbot.net/api/uc \
-H "Content-Type: application/json" \
-H "Authorization: ucapi_your_key_here" \
-d '{
"item": "160",
"orderid": "yourOrderID",
"qty": 2
}'
Request Example — Multi-Item
curl -X POST https://ucapi.ucbot.net/api/uc \
-H "Content-Type: application/json" \
-H "Authorization: ucapi_your_key_here" \
-d '{
"item": {
"160": 2,
"80": 3,
"20": 5
},
"orderid": "yourOrderID"
}'
- Maximum 10 different UC types
- Maximum 100 total UCs across all items
- Example: {"160": 50, "80": 50} = 100 UCs ✓
- Example: {"160": 60, "80": 50} = 110 UCs ✗ (exceeds limit)
Success Response — Single Item
Success (Single):
{
"status": "success",
"order_id": "yourOrderID",
"item": "160",
"qty": 2,
"uc_list": [
"UPBD-F-S-02711106 2654-3639-7636-1362",
"UPBD-F-S-02711107 1234-5678-9012-3456"
],
"total_cost": 36.4
}
Success Response — Multi-Item
Success (Multi):
{
"status": "success",
"order_id": "yourOrderID",
"items": {
"160": 2,
"80": 3,
"20": 5
},
"uc_list": [
"UPBD-F-S-02711108 1111-2222-3333-4444",
"UPBD-F-S-02711109 5555-6666-7777-8888",
"UPBD-F-S-02711110 9999-0000-1111-2222",
"UPBD-F-S-02711111 3333-4444-5555-6666",
"UPBD-F-S-02711112 7777-8888-9999-0000",
"UPBD-F-S-02711113 1234-5678-9012-3456",
"UPBD-F-S-02711114 6543-2109-8765-4321",
"UPBD-F-S-02711115 1111-1111-1111-1111",
"UPBD-F-S-02711116 2222-2222-2222-2222",
"UPBD-F-S-02711117 3333-3333-3333-3333"
],
"total_cost": 182.0
}
items returns the original multi-item request object.
uc_list contains all UCs from all items combined.
UCs are pulled in the order specified in the request.
Error Responses
Stock Out:
{
"status": "error",
"order_id": "API-UC-A74A6E3C50",
"error": "Insufficient Stock:\n⚠︎ 160 🆄︎🅲︎ — Available: 0 pcs (Need: 2)",
"stock_out": true
}
Not Enough Stock:
{
"status": "error",
"order_id": "API-UC-A74A6E3C50",
"error": "Insufficient Stock:\n⚠︎ 160 🆄︎🅲︎ — Available: 1 pcs (Need: 2)",
"stock_out": true
}
Limit Over:
{
"status": "error",
"order_id": "API-UC-A74A6E3C50",
"error": "Baki limit exceeded — Used: 150.00৳ | Left: 50.00৳ | Required: 75.00৳"
}
Auto top-up for Indonesia Garena server. Use this endpoint for Indo-only items — do not send them via /api/topup.
| FIELD | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| uid | string | Yes | Player's game UID (7-16 digits) |
| item | string | Yes | Indo item code — e.g. 355, weekly, bp. |
| qty | integer | No | Quantity (default 1, max 5) |
| orderid | string | No | Your custom order ID |
Request Example
curl -X POST https://ucapi.ucbot.net/api/indo \
-H "Content-Type: application/json" \
-H "Authorization: ucapi_your_key_here" \
-d '{
"uid": "9876543210",
"item": "355",
"qty": 1,
"orderid": "INDO-001"
}'
Success Response
Success (Indo):
{
"status": "success",
"order_id": "INDO-001",
"username": "PlayerName",
"uid": "9876543210",
"item": "355",
"qty": 1,
"success_count": 1,
"fail_count": 0,
"report": [
{
"item_id": 6,
"item_name": "Indo 355 💎",
"ok_qty": 1,
"fail_qty": 0
}
],
"duration": 6.22
}
Error Responses
Indo not configured:
{
"status": "error",
"error": "Indo topup is not available. Please contact support."
}
weekly exist on both /api/topup (BD/MY) and /api/indo (Indonesia). Pick the correct endpoint for your target server.
Returns wallet balance, due amount, and due limit — updated in real-time.
Request Example
curl "https://ucapi.ucbot.net/api/balance" \
-H "Authorization: ucapi_your_key_here"
Success Response
Response:
{
"wallet": 150.0,
"due": 30.5,
"due_limit": 200.0,
"due_left": 169.5
}
| FIELD | DESCRIPTION |
|---|---|
| wallet | Advance balance (prepaid funds available) |
| due | Current outstanding due amount |
| due_limit | Maximum due amount allowed |
| due_left | Remaining due capacity (due_limit - due) |
Returns the log of the last N orders with full response data.
| FIELD | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| limit | integer | No | Number of orders (default 20, max 100) |
Request Example
curl "https://ucapi.ucbot.net/api/history?limit=10" \
-H "Authorization: ucapi_your_key_here"
Success Response
Response:
{
"orders": [
{
"order_id": "API-TP-6E5480A243",
"action": "topup",
"item": "160",
"qty": 1,
"uid": "7041346627",
"response": {
"status": "success",
"username": "彡ɴᴀʙɪʟ࿐",
"success": 1,
"failed": 0
},
"created_at": "2025-01-15T14:30:00"
},
{
"order_id": "API-UC-A74A6E3C50",
"action": "uc",
"items": {
"160": 2,
"80": 1
},
"uid": null,
"response": {
"status": "success",
"uc_list": ["UPBD-Q-S-02016173 3549-1273-5525-5362", "..."],
"total_cost": 92.5
},
"created_at": "2025-01-15T13:10:00"
}
]
}
UC Diamond (works for topup + uc)
| ITEM CODE | DIAMOND |
|---|---|
| 20 | 25 💎 |
| 36 | 50 💎 |
| 80 | 115 💎 |
| 160 | 240 💎 |
| 405 | 610 💎 |
| 810 | 1240 💎 |
| 1625 | 2530 💎 |
Subscription (topup only)
| ITEM CODE | SUBSCRIPTION |
|---|---|
| 161 | Weekly Subscription |
| 800 | Monthly Subscription |
| weeklylite | Weekly Lite |
Diamond Amount Alias (topup only, auto-converted)
| DIAMOND AMOUNT | CONVERTS TO |
|---|---|
| 25 | → 20 |
| 50 | → 36 |
| 115 | → 80 |
| 240 | → 160 |
| 610 | → 405 |
| 1240 | → 810 |
| 2530 | → 1625 |
240) and it will auto-convert to the correct item code (160).Shell Items (topup only)
| ITEM CODE | SHELL ITEM |
|---|---|
| weeklylite / lite | Weekly Lite (max qty 10) |
| lvl6 - lvl30 | Level Up packs (max qty 5 each) |
| all_lvl / lvlall | All levels 6 → 30 (qty 1 only) |
evo3, evo7, evo30 — will return an error.Indonesia Items (indo only — POST /api/indo)
| ITEM CODE | INDO ITEM |
|---|---|
| 5 | Indo 5 💎 |
| 50 | Indo 50 💎 |
| 70 | Indo 70 💎 |
| 140 | Indo 140 💎 |
| 355 | Indo 355 💎 |
| 720 | Indo 720 💎 |
| 7290 | Indo 7290 💎 |
| weekly | Indo Weekly 💎 |
| monthly | Indo Monthly 💎 |
| lvl6 - lvl30 | Level Up (Indo server) |
| bp | Booyah Pass 💎 |
All errors return "status": "error" with a human-readable message.
| ERROR | CAUSE |
|---|---|
| Invalid or inactive API key | Key is wrong or has been revoked |
| User not registered in bot | Not signed up in the bot |
| Baki limit exceeded | Not enough wallet + baki capacity |
| Insufficient Stock (stock_out: true) | No UC available in stock |
| AutoTopup is not active | Bot has no active subscription |
| AutoTopup subscription expired | Subscription has expired |
| AutoTopup limit exhausted | Topup limit has been used up |
| 2000 UC topup is not available via API | Use POST /api/uc for 2000 delivery only |
| Indo items must use POST /api/indo | Indo-only item sent to wrong endpoint |
| This item is no longer available | Discontinued item (evo3/7/30) |
| Bot 'xxx' is not connected | Bot is offline |
| Bot did not respond in time | 120s timeout exceeded |
| Too many requests | Rate limit exceeded — slow down |
| qty cannot exceed 5 / 100 | qty exceeds allowed limit for this endpoint |
| Valid game UID required | UID is invalid or missing (7-16 digits) |
| Maximum 5 / 10 different items allowed | Too many item types in multi-item order |
Rate Limits
UC: 30/min • Topup & Indo: 20/min • Balance: 30/min • History: 20/min. Exceeded limits return HTTP 429.
Timeout
Maximum timeout for all orders is 120 seconds. If the bot is offline, an error is returned immediately.
Queue System
If multiple requests arrive from the same user simultaneously, they are queued and processed one by one — no race conditions.
Multi-item Orders
Both /api/topup and /api/uc support multi-item orders. Topup: max 5 UCs total. UC code buy: max 10 types, 100 total UCs. Shell items don't support multi-item.
Billing
Wallet balance is deducted first. Once empty, the amount goes to due. Orders are rejected if the due limit is exceeded. Charges apply even for Used/Invalid UCs.
Telegram Notifications
A receipt is sent via Telegram DM after every order — applies to both /api/topup and /api/uc. No polling needed.
Token Safety
Keep your API key private. Never share it publicly. Keys can be revoked instantly via /revokeapikey command.
Ready to integrate?
Contact admin on Telegram to generate an API key. Keys are tied to your Telegram account.
Get API Key on Telegram