Guide
Start
Create a key in the panel: Settings → API access. Your account owner must switch API access on for you first. Keep the key on your own server. Never put it inside a mobile or web app: anyone holding it can sell and delete your services.
curl https://api.mikropanel.ir/v1/me -H "Authorization: Bearer mp_live_..."
Sell a service in 5 calls
GET /v1/me/balance— your traffic credit, peer quota and plan credits.GET /v1/routers— where you can create (can_create,l2tp_available).GET /v1/plans— your credit plans.POST /v1/peers— create it, with your order id asexternal_ref.GET /v1/peers/{id}/configor/qr— hand it to your customer.
curl -X POST https://api.mikropanel.ir/v1/peers \
-H "Authorization: Bearer mp_live_..." -H "Content-Type: application/json" \
-H "Idempotency-Key: order-10231-create" \
-d '{"name":"order10231","router_id":3,"traffic_bytes":32212254720,"days":30,"external_ref":"10231"}'Units and time
- Traffic is always whole bytes (1 GB here = 1073741824 bytes).
nulllimit means unlimited. - Times are ISO 8601 with the server offset (+03:30). Send times with an offset.
- Lists return
dataandnext_cursor; pass it ascursorto get the next page. - To follow changes use
GET /v1/peers?updated_since=.... Traffic counters are refreshed by the panel about once a minute (usage_updated_at).
Retries (Idempotency-Key)
Creating, renewing, adding traffic and adding L2TP need the header Idempotency-Key. Make one per operation (for example from your order id) and save it before calling.
- Network error or timeout: send the same request with the same key. You get the first result, nothing is done twice (the answer has the header
Idempotent-Replayed: true). request_in_progress: wait and retry with the same key.outcome_unknown: look the peer up (for example?external_ref=) before using a new key.- A refused request (for example
insufficient_credit) frees the key.
Limits
Without fixed IP addresses a key works from anywhere with the lower limits. If your server has a fixed address, add it in Settings → API access: then only those addresses can use your keys, and the limits are higher. Tiers as reads per minute | changes per minute | changes in flight | changes per day. Changes of one account are applied one after another: "in flight" is how many may be sent at the same time, the extra ones waiting up to 15 seconds for their turn (then server_busy; retry with the same Idempotency-Key).
- Any address: 600 | 60 | 1 | 5000
- Fixed addresses: 1200 | 120 | 3 | 20000
Your account owner may set other values; GET /v1/me shows yours. Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; on 429 or 503 wait for Retry-After seconds. 20 wrong keys in a minute block an address for the rest of that minute.
Errors
Every error is {"error": {"code", "message", "message_fa", "details", "request_id"}}. Decide by code, never by the message. Give request_id to support. After operation_failed, check the resource before trying again.
Agent types
- Limited agents pay from a traffic wallet (one, or one per router), cannot choose unlimited traffic or time (a credit plan your account owner gave you may be unlimited) and renew at most 90 days at a time. Deleting a peer returns the unused traffic.
- Deleting a client (L2TP) switches its WireGuard peer off and leaves it without limits. Delete that peer to get the unused traffic back, or renew it with new traffic and duration.
DELETE /v1/peers/<built-in function id>on a peer with L2TP does both steps in one call. - Unlimited agents have no traffic wallet; they may send
unlimited_trafficandunlimited_time. - Plan-only accounts must use
plan_id. Peer limits, per router too, apply to everyone. No agent sets a speed per peer.
Examples and tools
- A ready client in Python:
GET /v1/examples/mikropanel.py(standard library only). - A ready client in PHP:
GET /v1/examples/mikropanel.php(curl). - Postman collection of every endpoint:
GET /v1/postman.json. Set theapi_keyvariable.
Changes
- 1.0.0: first release. Account, routers, plans, peers, L2TP clients and usage.
Endpoints
Every answer shown here was produced by the API itself on test data. Keys and passwords are placeholders.
Account
GETWho this key is, what it may do and its limits/v1/me
Key access: read read
curl "https://api.mikropanel.ir/v1/me" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"account": {
"id": 10,
"username": "reseller1",
"type": "agent",
"mode": "limited",
"creation_mode": "hybrid",
"traffic_scope": "total",
"peer_scope": "total",
"shared_speed_limit_mbps": null,
"expires_at": null
},
"features": {
"wireguard": true,
"l2tp": true,
"custom_limits": true,
"credit_plans": true,
"unlimited_peers": false,
"max_renew_days": 90
},
"key": {
"id": 9,
"name": "test key",
"scopes": [
"read",
"peers:config",
"peers:write"
],
"expires_at": null
},
"limits": {
"tier": "any_ip",
"reads_per_minute": 600,
"writes_per_minute": 60,
"concurrent_writes": 1,
"writes_per_day": 5000
},
"network": {
"your_ip": "203.0.113.7",
"allowed_ips": []
},
"server_time": "2026-11-30T01:45:04+03:30"
}GETTraffic credit, peer quota and plan credits/v1/me/balance
Key access: read read
curl "https://api.mikropanel.ir/v1/me/balance" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"traffic": {
"unlimited": false,
"scope": "total",
"balance_bytes": 470640777560
},
"peers": {
"limit": 50,
"used": 4,
"available": 46
},
"routers": [
{
"router_id": 1,
"name": "Frankfurt-1",
"traffic_balance_bytes": null,
"peer_limit": null,
"live_peers": 4,
"peers": 4,
"traffic_used_bytes": 11811160064
},
{
"router_id": 2,
"name": "router-r2",
"traffic_balance_bytes": null,
"peer_limit": null,
"live_peers": 0,
"peers": 0,
"traffic_used_bytes": 0
}
],
"creation_mode": "hybrid",
"plan_credits": [
{
"plan_id": 2,
"name": "20 GB - 30 days - L2TP",
"remaining_credits": 5,
"unlimited_credits": false,
"credits_expire_at": null
},
{
"plan_id": 1,
"name": "10 GB - 30 days",
"remaining_credits": 4,
"unlimited_credits": false,
"credits_expire_at": null
}
]
}GETPeer counts and traffic sold/v1/me/stats
Key access: read read
curl "https://api.mikropanel.ir/v1/me/stats" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"peers": {
"total": 4,
"active": 2,
"online": 0
},
"traffic_sold_bytes": {
"total": 42949672960,
"today": 42949672960,
"last_7_days": 42949672960,
"last_30_days": 42949672960
}
}Routers
GETRouters assigned to you, with limits and availability/v1/routers
Key access: read read
curl "https://api.mikropanel.ir/v1/routers" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"data": [
{
"id": 1,
"name": "Frankfurt-1",
"active": true,
"last_test_status": "pending",
"public_endpoint": "r1.vpn.example.com",
"can_create": true,
"unavailable_reason": null,
"l2tp_available": true,
"peers": 4,
"live_peers": 4,
"peer_limit": null,
"traffic_used_bytes": 11811160064,
"traffic_balance_bytes": null
},
{
"id": 2,
"name": "router-r2",
"active": true,
"last_test_status": "pending",
"public_endpoint": "192.0.2.20",
"can_create": true,
"unavailable_reason": null,
"l2tp_available": false,
"peers": 0,
"live_peers": 0,
"peer_limit": null,
"traffic_used_bytes": 0,
"traffic_balance_bytes": null
}
]
}GETOne assigned router/v1/routers/{router_id}
Key access: read read
curl "https://api.mikropanel.ir/v1/routers/1" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"router": {
"id": 1,
"name": "Frankfurt-1",
"active": true,
"last_test_status": "pending",
"public_endpoint": "r1.vpn.example.com",
"can_create": true,
"unavailable_reason": null,
"l2tp_available": true,
"peers": 4,
"live_peers": 4,
"peer_limit": null,
"traffic_used_bytes": 11811160064,
"traffic_balance_bytes": null
}
}Plans
GETYour credit plans with remaining credits/v1/plans
Key access: read read
curl "https://api.mikropanel.ir/v1/plans" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"creation_mode": "hybrid",
"data": [
{
"id": 2,
"name": "20 GB - 30 days - L2TP",
"description": "",
"traffic_limit_bytes": 21474836480,
"unlimited_traffic": false,
"days": 30,
"unlimited_time": false,
"speed_down_mbps": null,
"speed_up_mbps": null,
"starts_immediately_by_default": true,
"protocols": [
"wireguard",
"l2tp"
],
"router_id": null,
"remaining_credits": 5,
"unlimited_credits": false,
"credits_expire_at": null,
"can_create": true,
"can_renew": true
},
{
"id": 1,
"name": "10 GB - 30 days",
"description": "",
"traffic_limit_bytes": 10737418240,
"unlimited_traffic": false,
"days": 30,
"unlimited_time": false,
"speed_down_mbps": null,
"speed_up_mbps": null,
"starts_immediately_by_default": true,
"protocols": [
"wireguard"
],
"router_id": null,
"remaining_credits": 4,
"unlimited_credits": false,
"credits_expire_at": null,
"can_create": true,
"can_renew": true
}
]
}GETOne credit plan/v1/plans/{plan_id}
Key access: read read
curl "https://api.mikropanel.ir/v1/plans/2" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"plan": {
"id": 2,
"name": "20 GB - 30 days - L2TP",
"description": "",
"traffic_limit_bytes": 21474836480,
"unlimited_traffic": false,
"days": 30,
"unlimited_time": false,
"speed_down_mbps": null,
"speed_up_mbps": null,
"starts_immediately_by_default": true,
"protocols": [
"wireguard",
"l2tp"
],
"router_id": null,
"remaining_credits": 5,
"unlimited_credits": false,
"credits_expire_at": null,
"can_create": true,
"can_renew": true
}
}Peers
GETList your peers, newest first/v1/peers
Key access: read read
Query parameters
| Name | Type | Meaning |
|---|---|---|
limit | int | Items per page (default 50). |
cursor | int | next_cursor of the previous page. |
status | str | Only this status.Values: suspended | active | limit_reached | disabled_by_owner | not_started | pending_deletion |
router_id | int | Only this router. |
name | str | Name contains this text. |
external_ref | str | Exactly this external_ref. |
customer_telegram_id | int | Exactly this Telegram id. |
updated_since | datetime | Settings or status changed at or after this time (traffic counters alone do not count). |
curl "https://api.mikropanel.ir/v1/peers?limit=2" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"data": [
{
"id": 3,
"name": "order10233",
"description": "",
"external_ref": null,
"customer_telegram_id": null,
"router_id": 1,
"router_name": "Frankfurt-1",
"client_ip": "172.0.0.4/32",
"status": "active",
"status_reason": null,
"online": false,
"last_handshake_at": null,
"traffic_limit_bytes": 21474836480,
"traffic_used_bytes": 0,
"traffic_remaining_bytes": 21474836480,
"unlimited_traffic": false,
"shown_as_unlimited": false,
"days": 30,
"expires_at": "2026-12-30T01:45:03+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"plan_id": null,
"plan_name": null,
"protocols": [
"wireguard",
"l2tp"
],
"client_id": 1,
"group_id": null,
"group_name": null,
"missing_on_router": false,
"created_at": "2026-11-30T01:45:02+03:30",
"updated_at": "2026-11-30T01:45:02+03:30",
"usage_updated_at": null
},
{
"id": 2,
"name": "order10232",
"description": "",
"external_ref": null,
"customer_telegram_id": null,
"router_id": 1,
"router_name": "Frankfurt-1",
"client_ip": "172.0.0.3/32",
"status": "active",
"status_reason": null,
"online": false,
"last_handshake_at": null,
"traffic_limit_bytes": 10737418240,
"traffic_used_bytes": 0,
"traffic_remaining_bytes": 10737418240,
"unlimited_traffic": false,
"shown_as_unlimited": false,
"days": 30,
"expires_at": "2026-12-30T01:45:02+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"plan_id": 1,
"plan_name": "10 GB - 30 days",
"protocols": [
"wireguard"
],
"client_id": null,
"group_id": null,
"group_name": null,
"missing_on_router": false,
"created_at": "2026-11-30T01:45:02+03:30",
"updated_at": "2026-11-30T01:45:02+03:30",
"usage_updated_at": null
}
],
"next_cursor": 2
}POSTCreate a peer (WireGuard, optionally with L2TP)/v1/peers
Give plan_id, or your own traffic and duration. Unlimited traffic or time must be asked for explicitly and only unlimited agents may do it. With protocols ["wireguard","l2tp"] both are made, or neither. The answer includes the config only when the key has the peers:config scope.
Key access: create and change peers:write · needs the Idempotency-Key header
JSON body
| Name | Type | Meaning |
|---|---|---|
namerequired | str | 3-30 characters: letters, digits, - and _. Unique per router. |
router_id | int | Needed when you have several routers and the plan does not fix one. |
plan_id | int | Use a credit plan: it decides every limit. |
start_now | bool | With a plan: start the clock now instead of at the first connection. |
traffic_bytes | int | Traffic limit in bytes. |
unlimited_traffic | bool | No traffic limit (unlimited agents only). |
days | int | Duration in days. |
unlimited_time | bool | No expiry (unlimited agents only). |
expires_at | datetime | Exact expiry instead of (or besides) days. |
start_on_first_connect | bool | Count the days from the first connection. |
show_as_unlimited | bool | Limited agents: show the customer "unlimited" (the limit still applies). |
protocols | strlist | ["wireguard"] (default) or ["wireguard","l2tp"]. A plan decides this itself. |
description | str | Your note. |
external_ref | str | Your own id for this peer (order id). Unique among your peers. |
customer_telegram_id | int | Telegram id of your customer. |
curl -X POST "https://api.mikropanel.ir/v1/peers" \
-H "Authorization: Bearer mp_live_YOUR_KEY" \
-H "Idempotency-Key: order-10231-create" \
-H "Content-Type: application/json" \
-d '{"name": "order10231", "router_id": 1, "traffic_bytes": 32212254720, "days": 30, "external_ref": "10231"}'{
"peer": {
"id": 1,
"name": "order10231",
"description": "",
"external_ref": "10231",
"customer_telegram_id": null,
"router_id": 1,
"router_name": "Frankfurt-1",
"client_ip": "172.0.0.2/32",
"status": "active",
"status_reason": null,
"online": false,
"last_handshake_at": null,
"traffic_limit_bytes": 32212254720,
"traffic_used_bytes": 0,
"traffic_remaining_bytes": 32212254720,
"unlimited_traffic": false,
"shown_as_unlimited": false,
"days": 30,
"expires_at": "2026-12-30T01:45:02+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"plan_id": null,
"plan_name": null,
"protocols": [
"wireguard"
],
"client_id": null,
"group_id": null,
"group_name": null,
"missing_on_router": false,
"created_at": "2026-11-30T01:45:02+03:30",
"updated_at": "2026-11-30T01:45:02+03:30",
"usage_updated_at": null,
"gift_code": null,
"public_page_url": "https://mpeer.ir/52774d0b-bc03-459d-bc5c-45a32e506cda"
},
"config": {
"filename": "order10231.conf",
"config": "[Interface]\nPrivateKey = CLIENT_PRIVATE_KEY\nAddress = 172.0.0.2/32\nDNS = 1.1.1.1, 8.8.8.8\n\n[Peer]\nPublicKey = kO1Vw0Qq0dS7o8Yv9m1m0m6i7l4uY5o2m3q4r5s6t7U=\nEndpoint = r1.vpn.example.com:61234\nAllowedIPs = 0.0.0.0/0"
}
}DELETEDelete a peer/v1/peers/{peer_id}
A limited agent gets the unused traffic back as the panel does. A peer with L2TP is deleted together with its client.
Key access: create and change peers:write
curl -X DELETE "https://api.mikropanel.ir/v1/peers/1" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"deleted": true,
"peer_id": 1,
"client_deleted": null,
"refunded_bytes": 37580963840
}GETOne peer with its gift code and public page link/v1/peers/{peer_id}
Key access: read read
curl "https://api.mikropanel.ir/v1/peers/1" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"peer": {
"id": 1,
"name": "order10231",
"description": "",
"external_ref": "10231",
"customer_telegram_id": null,
"router_id": 1,
"router_name": "Frankfurt-1",
"client_ip": "172.0.0.2/32",
"status": "active",
"status_reason": null,
"online": false,
"last_handshake_at": null,
"traffic_limit_bytes": 32212254720,
"traffic_used_bytes": 1805625000,
"traffic_remaining_bytes": 30406629720,
"unlimited_traffic": false,
"shown_as_unlimited": false,
"days": 30,
"expires_at": "2026-12-30T01:45:02+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"plan_id": null,
"plan_name": null,
"protocols": [
"wireguard"
],
"client_id": null,
"group_id": null,
"group_name": null,
"missing_on_router": false,
"created_at": "2026-11-30T01:45:02+03:30",
"updated_at": "2026-11-30T01:45:02+03:30",
"usage_updated_at": null,
"gift_code": null,
"public_page_url": "https://mpeer.ir/52774d0b-bc03-459d-bc5c-45a32e506cda"
}
}PATCHChange name, description or your own references/v1/peers/{peer_id}
Key access: create and change peers:write
JSON body
| Name | Type | Meaning |
|---|---|---|
name | str | New name (also renamed on the router). |
description | str | New note; "" clears it. |
external_ref | str | Your own id; "" clears it. |
customer_telegram_id | int | Telegram id of your customer; 0 clears it. |
curl -X PATCH "https://api.mikropanel.ir/v1/peers/1" \
-H "Authorization: Bearer mp_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"description": "phone", "customer_telegram_id": 123456789}'{
"peer": {
"id": 1,
"name": "order10231",
"description": "phone",
"external_ref": "10231",
"customer_telegram_id": 123456789,
"router_id": 1,
"router_name": "Frankfurt-1",
"client_ip": "172.0.0.2/32",
"status": "active",
"status_reason": null,
"online": false,
"last_handshake_at": null,
"traffic_limit_bytes": 32212254720,
"traffic_used_bytes": 1805625000,
"traffic_remaining_bytes": 30406629720,
"unlimited_traffic": false,
"shown_as_unlimited": false,
"days": 30,
"expires_at": "2026-12-30T01:45:02+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"plan_id": null,
"plan_name": null,
"protocols": [
"wireguard"
],
"client_id": null,
"group_id": null,
"group_name": null,
"missing_on_router": false,
"created_at": "2026-11-30T01:45:02+03:30",
"updated_at": "2026-11-30T01:45:03+03:30",
"usage_updated_at": null,
"gift_code": null,
"public_page_url": "https://mpeer.ir/52774d0b-bc03-459d-bc5c-45a32e506cda"
}
}GETWireGuard configuration/v1/peers/{peer_id}/config
Key access: see configurations and passwords peers:config
Query parameters
| Name | Type | Meaning |
|---|---|---|
format | str | json (default) or file.Values: json | file |
use_domain | bool | Use the router's current domain as endpoint (default true). |
curl "https://api.mikropanel.ir/v1/peers/1/config" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"filename": "order10231.conf",
"config": "[Interface]\nPrivateKey = CLIENT_PRIVATE_KEY\nAddress = 172.0.0.2/32\nDNS = 1.1.1.1, 8.8.8.8\n\n[Peer]\nPublicKey = kO1Vw0Qq0dS7o8Yv9m1m0m6i7l4uY5o2m3q4r5s6t7U=\nEndpoint = r1.vpn.example.com:61234\nAllowedIPs = 0.0.0.0/0"
}GETQR code of the configuration (PNG)/v1/peers/{peer_id}/qr
Key access: see configurations and passwords peers:config
Query parameters
| Name | Type | Meaning |
|---|---|---|
use_domain | bool | Use the router's current domain as endpoint (default true). |
curl "https://api.mikropanel.ir/v1/peers/1/qr" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
POSTRenew a peer with a plan or your own limits/v1/peers/{peer_id}/renew
mode "set" (default) replaces the limits, "add" adds to them. Limited agents: at most 90 days; lowering the traffic returns nothing at once, the unused amount comes back on delete or reset. A peer that also has L2TP is renewed as a whole (set only, new traffic and duration, usage restarts). The answer includes the config only when the key has the peers:config scope.
Key access: create and change peers:write · needs the Idempotency-Key header
JSON body
| Name | Type | Meaning |
|---|---|---|
plan_id | int | Use a credit plan: it decides every limit. |
start_now | bool | With a plan: start the clock now instead of at the first connection. |
traffic_bytes | int | Traffic limit in bytes. |
unlimited_traffic | bool | No traffic limit (unlimited agents only). |
days | int | Duration in days. |
unlimited_time | bool | No expiry (unlimited agents only). |
expires_at | datetime | Exact new expiry. |
mode | str | set or add.Values: set | add |
reset_usage | bool | Start counting usage from zero (set mode; say the new traffic too). |
start_on_first_connect | bool | Only for a peer with L2TP renewed with your own limits. |
curl -X POST "https://api.mikropanel.ir/v1/peers/1/renew" \
-H "Authorization: Bearer mp_live_YOUR_KEY" \
-H "Idempotency-Key: order-10250-renew" \
-H "Content-Type: application/json" \
-d '{"traffic_bytes": 32212254720, "days": 30, "reset_usage": true}'{
"peer": {
"id": 1,
"name": "order10231",
"description": "phone",
"external_ref": "10231",
"customer_telegram_id": 123456789,
"router_id": 1,
"router_name": "Frankfurt-1",
"client_ip": "172.0.0.2/32",
"status": "active",
"status_reason": null,
"online": false,
"last_handshake_at": null,
"traffic_limit_bytes": 32212254720,
"traffic_used_bytes": 0,
"traffic_remaining_bytes": 32212254720,
"unlimited_traffic": false,
"shown_as_unlimited": false,
"days": 30,
"expires_at": "2026-12-30T01:45:03+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"plan_id": null,
"plan_name": null,
"protocols": [
"wireguard"
],
"client_id": null,
"group_id": null,
"group_name": null,
"missing_on_router": false,
"created_at": "2026-11-30T01:45:02+03:30",
"updated_at": "2026-11-30T01:45:03+03:30",
"usage_updated_at": null,
"gift_code": null,
"public_page_url": "https://mpeer.ir/52774d0b-bc03-459d-bc5c-45a32e506cda"
},
"config": {
"filename": "order10231.conf",
"config": "[Interface]\nPrivateKey = CLIENT_PRIVATE_KEY\nAddress = 172.0.0.2/32\nDNS = 1.1.1.1, 8.8.8.8\n\n[Peer]\nPublicKey = kO1Vw0Qq0dS7o8Yv9m1m0m6i7l4uY5o2m3q4r5s6t7U=\nEndpoint = r1.vpn.example.com:61234\nAllowedIPs = 0.0.0.0/0"
},
"router_updated": true
}POSTSuspend a peer/v1/peers/{peer_id}/suspend
Key access: create and change peers:write
curl -X POST "https://api.mikropanel.ir/v1/peers/1/suspend" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"peer": {
"id": 1,
"name": "order10231",
"description": "phone",
"external_ref": "10231",
"customer_telegram_id": 123456789,
"router_id": 1,
"router_name": "Frankfurt-1",
"client_ip": "172.0.0.2/32",
"status": "suspended",
"status_reason": "manual_suspension",
"online": false,
"last_handshake_at": null,
"traffic_limit_bytes": 37580963840,
"traffic_used_bytes": 0,
"traffic_remaining_bytes": 37580963840,
"unlimited_traffic": false,
"shown_as_unlimited": false,
"days": 30,
"expires_at": "2026-12-30T01:45:03+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"plan_id": null,
"plan_name": null,
"protocols": [
"wireguard"
],
"client_id": null,
"group_id": null,
"group_name": null,
"missing_on_router": false,
"created_at": "2026-11-30T01:45:02+03:30",
"updated_at": "2026-11-30T01:45:03+03:30",
"usage_updated_at": null,
"gift_code": null,
"public_page_url": "https://mpeer.ir/52774d0b-bc03-459d-bc5c-45a32e506cda"
},
"router_updated": true
}POSTLift a suspension/v1/peers/{peer_id}/unsuspend
Refused with renew_required when the traffic or time is used up.
Key access: create and change peers:write
curl -X POST "https://api.mikropanel.ir/v1/peers/1/unsuspend" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"peer": {
"id": 1,
"name": "order10231",
"description": "phone",
"external_ref": "10231",
"customer_telegram_id": 123456789,
"router_id": 1,
"router_name": "Frankfurt-1",
"client_ip": "172.0.0.2/32",
"status": "active",
"status_reason": null,
"online": false,
"last_handshake_at": null,
"traffic_limit_bytes": 37580963840,
"traffic_used_bytes": 0,
"traffic_remaining_bytes": 37580963840,
"unlimited_traffic": false,
"shown_as_unlimited": false,
"days": 30,
"expires_at": "2026-12-30T01:45:03+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"plan_id": null,
"plan_name": null,
"protocols": [
"wireguard"
],
"client_id": null,
"group_id": null,
"group_name": null,
"missing_on_router": false,
"created_at": "2026-11-30T01:45:02+03:30",
"updated_at": "2026-11-30T01:45:03+03:30",
"usage_updated_at": null,
"gift_code": null,
"public_page_url": "https://mpeer.ir/52774d0b-bc03-459d-bc5c-45a32e506cda"
},
"router_updated": true
}L2TP clients
GETList your clients, newest first/v1/clients
Key access: read read
Query parameters
| Name | Type | Meaning |
|---|---|---|
limit | int | Items per page (default 50). |
cursor | int | next_cursor of the previous page. |
status | str | Only this status.Values: inactive | active | limit_reached | suspended | not_started |
router_id | int | Only this router. |
name | str | Name contains this text. |
updated_since | datetime | Changed at or after this time. |
curl "https://api.mikropanel.ir/v1/clients?limit=2" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"data": [
{
"id": 1,
"name": "order10233",
"description": "",
"router_id": 1,
"status": "active",
"status_reason": null,
"protocols": [
"wireguard",
"l2tp"
],
"peer_ids": [
3
],
"plan_id": null,
"traffic_limit_bytes": 21474836480,
"traffic_used_bytes": 0,
"traffic_remaining_bytes": 21474836480,
"unlimited_traffic": false,
"days": 30,
"expires_at": "2026-12-30T01:45:03+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"created_at": "2026-11-30T01:45:02+03:30",
"updated_at": "2026-11-30T01:45:02+03:30"
}
],
"next_cursor": null
}POSTTurn one of your peers into a client/v1/clients/from-peer
The client takes over the peer's limit, expiry and usage; L2TP is added. A peer made from a plan can only get the protocols of that plan.
Key access: create and change peers:write · needs the Idempotency-Key header
JSON body
| Name | Type | Meaning |
|---|---|---|
peer_idrequired | int | Your standalone peer. |
protocols | strlist | Default ["wireguard","l2tp"]. |
curl -X POST "https://api.mikropanel.ir/v1/clients/from-peer" \
-H "Authorization: Bearer mp_live_YOUR_KEY" \
-H "Idempotency-Key: order-10262-client" \
-H "Content-Type: application/json" \
-d '{"peer_id": 4, "protocols": ["wireguard"]}'{
"client": {
"id": 2,
"name": "order10234",
"description": "",
"router_id": 1,
"status": "active",
"status_reason": null,
"protocols": [
"wireguard"
],
"peer_ids": [
4
],
"plan_id": null,
"traffic_limit_bytes": 5368709120,
"traffic_used_bytes": 0,
"traffic_remaining_bytes": 5368709120,
"unlimited_traffic": false,
"days": 30,
"expires_at": "2026-12-30T01:45:04+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"created_at": "2026-11-30T01:45:04+03:30",
"updated_at": "2026-11-30T01:45:04+03:30",
"accounts": [
{
"protocol": "wireguard",
"account_id": 4,
"name": "order10234",
"traffic_used_bytes": 0,
"online": null,
"router_state": null
}
]
},
"l2tp": null
}DELETEDelete a client/v1/clients/{client_id}
The L2TP account is removed. The WireGuard peer stays, switched off; delete it with DELETE /peers/{id} (a limited agent is refunded then).
Key access: create and change peers:write
curl -X DELETE "https://api.mikropanel.ir/v1/clients/2" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"deleted": true,
"client_id": 2,
"traffic_used_bytes": 0,
"released_peer_ids": [
4
]
}GETOne client with its accounts/v1/clients/{client_id}
Key access: read read
curl "https://api.mikropanel.ir/v1/clients/1" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"client": {
"id": 1,
"name": "order10233",
"description": "",
"router_id": 1,
"status": "active",
"status_reason": null,
"protocols": [
"wireguard",
"l2tp"
],
"peer_ids": [
3
],
"plan_id": null,
"traffic_limit_bytes": 21474836480,
"traffic_used_bytes": 0,
"traffic_remaining_bytes": 21474836480,
"unlimited_traffic": false,
"days": 30,
"expires_at": "2026-12-30T01:45:03+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"created_at": "2026-11-30T01:45:02+03:30",
"updated_at": "2026-11-30T01:45:02+03:30",
"accounts": [
{
"protocol": "wireguard",
"account_id": 3,
"name": "order10233",
"traffic_used_bytes": 0,
"online": null,
"router_state": null
},
{
"protocol": "l2tp",
"account_id": 1,
"name": "order10233",
"traffic_used_bytes": 0,
"online": false,
"router_state": "absent"
}
]
}
}POSTRaise a client's traffic limit/v1/clients/{client_id}/add-traffic
A limited agent pays the added traffic from its wallet.
Key access: create and change peers:write · needs the Idempotency-Key header
JSON body
| Name | Type | Meaning |
|---|---|---|
traffic_bytesrequired | int | Bytes to add. |
curl -X POST "https://api.mikropanel.ir/v1/clients/1/add-traffic" \
-H "Authorization: Bearer mp_live_YOUR_KEY" \
-H "Idempotency-Key: order-10260-traffic" \
-H "Content-Type: application/json" \
-d '{"traffic_bytes": 5368709120}'{
"client": {
"id": 1,
"name": "order10233",
"description": "",
"router_id": 1,
"status": "active",
"status_reason": null,
"protocols": [
"wireguard",
"l2tp"
],
"peer_ids": [
3
],
"plan_id": null,
"traffic_limit_bytes": 26843545600,
"traffic_used_bytes": 0,
"traffic_remaining_bytes": 26843545600,
"unlimited_traffic": false,
"days": 30,
"expires_at": "2026-12-30T01:45:03+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"created_at": "2026-11-30T01:45:02+03:30",
"updated_at": "2026-11-30T01:45:03+03:30",
"accounts": [
{
"protocol": "wireguard",
"account_id": 3,
"name": "order10233",
"traffic_used_bytes": 0,
"online": null,
"router_state": null
},
{
"protocol": "l2tp",
"account_id": 1,
"name": "order10233",
"traffic_used_bytes": 0,
"online": false,
"router_state": "absent"
}
]
}
}GETL2TP login of a client/v1/clients/{client_id}/credentials
Key access: see configurations and passwords peers:config
curl "https://api.mikropanel.ir/v1/clients/1/credentials" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"l2tp": {
"server": "l2tp.vpn.example.com",
"username": "order10233",
"password": "L2TP_PASSWORD",
"ipsec_secret": "IPSEC_SECRET",
"ipsec_mode": "required",
"remote_address": "10.90.0.2"
}
}POSTDisable a client (all protocols)/v1/clients/{client_id}/disable
Key access: create and change peers:write
curl -X POST "https://api.mikropanel.ir/v1/clients/1/disable" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"client": {
"id": 1,
"name": "order10233",
"description": "",
"router_id": 1,
"status": "suspended",
"status_reason": "disabled_by_agent",
"protocols": [
"wireguard",
"l2tp"
],
"peer_ids": [
3
],
"plan_id": null,
"traffic_limit_bytes": 21474836480,
"traffic_used_bytes": 0,
"traffic_remaining_bytes": 21474836480,
"unlimited_traffic": false,
"days": 30,
"expires_at": "2026-12-30T01:45:04+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"created_at": "2026-11-30T01:45:02+03:30",
"updated_at": "2026-11-30T01:45:03+03:30",
"accounts": [
{
"protocol": "wireguard",
"account_id": 3,
"name": "order10233",
"traffic_used_bytes": 0,
"online": null,
"router_state": null
},
{
"protocol": "l2tp",
"account_id": 1,
"name": "order10233",
"traffic_used_bytes": 0,
"online": false,
"router_state": "absent"
}
]
}
}POSTEnable a client/v1/clients/{client_id}/enable
Refused with renew_required when the traffic or time is used up.
Key access: create and change peers:write
curl -X POST "https://api.mikropanel.ir/v1/clients/1/enable" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"client": {
"id": 1,
"name": "order10233",
"description": "",
"router_id": 1,
"status": "active",
"status_reason": null,
"protocols": [
"wireguard",
"l2tp"
],
"peer_ids": [
3
],
"plan_id": null,
"traffic_limit_bytes": 21474836480,
"traffic_used_bytes": 0,
"traffic_remaining_bytes": 21474836480,
"unlimited_traffic": false,
"days": 30,
"expires_at": "2026-12-30T01:45:04+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"created_at": "2026-11-30T01:45:02+03:30",
"updated_at": "2026-11-30T01:45:03+03:30",
"accounts": [
{
"protocol": "wireguard",
"account_id": 3,
"name": "order10233",
"traffic_used_bytes": 0,
"online": null,
"router_state": null
},
{
"protocol": "l2tp",
"account_id": 1,
"name": "order10233",
"traffic_used_bytes": 0,
"online": false,
"router_state": "absent"
}
]
}
}POSTAdd L2TP to a client/v1/clients/{client_id}/l2tp
Key access: create and change peers:write · needs the Idempotency-Key header
curl -X POST "https://api.mikropanel.ir/v1/clients/2/l2tp" \ -H "Authorization: Bearer mp_live_YOUR_KEY" \ -H "Idempotency-Key: order-10263-l2tp"
{
"client": {
"id": 2,
"name": "order10234",
"description": "",
"router_id": 1,
"status": "active",
"status_reason": null,
"protocols": [
"wireguard",
"l2tp"
],
"peer_ids": [
4
],
"plan_id": null,
"traffic_limit_bytes": 5368709120,
"traffic_used_bytes": 0,
"traffic_remaining_bytes": 5368709120,
"unlimited_traffic": false,
"days": 30,
"expires_at": "2026-12-30T01:45:04+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"created_at": "2026-11-30T01:45:04+03:30",
"updated_at": "2026-11-30T01:45:04+03:30",
"accounts": [
{
"protocol": "wireguard",
"account_id": 4,
"name": "order10234",
"traffic_used_bytes": 0,
"online": null,
"router_state": null
},
{
"protocol": "l2tp",
"account_id": 2,
"name": "order10234",
"traffic_used_bytes": 0,
"online": false,
"router_state": "absent"
}
]
},
"l2tp": {
"server": "l2tp.vpn.example.com",
"username": "order10234",
"password": "L2TP_PASSWORD",
"ipsec_secret": "IPSEC_SECRET",
"ipsec_mode": "required",
"remote_address": "10.90.0.3"
}
}POSTStart a new period for a client/v1/clients/{client_id}/renew
Give plan_id, or both traffic (or unlimited_traffic) and days (or unlimited_time). Usage restarts. Limited agents: at most 90 days.
Key access: create and change peers:write · needs the Idempotency-Key header
JSON body
| Name | Type | Meaning |
|---|---|---|
plan_id | int | Use a credit plan: it decides every limit. |
start_now | bool | With a plan: start the clock now instead of at the first connection. |
traffic_bytes | int | Traffic limit in bytes. |
unlimited_traffic | bool | No traffic limit (unlimited agents only). |
days | int | Duration in days. |
unlimited_time | bool | No expiry (unlimited agents only). |
start_on_first_connect | bool | Count the days from the first connection. |
curl -X POST "https://api.mikropanel.ir/v1/clients/1/renew" \
-H "Authorization: Bearer mp_live_YOUR_KEY" \
-H "Idempotency-Key: order-10261-renew" \
-H "Content-Type: application/json" \
-d '{"traffic_bytes": 21474836480, "days": 30}'{
"client": {
"id": 1,
"name": "order10233",
"description": "",
"router_id": 1,
"status": "active",
"status_reason": null,
"protocols": [
"wireguard",
"l2tp"
],
"peer_ids": [
3
],
"plan_id": null,
"traffic_limit_bytes": 21474836480,
"traffic_used_bytes": 0,
"traffic_remaining_bytes": 21474836480,
"unlimited_traffic": false,
"days": 30,
"expires_at": "2026-12-30T01:45:04+03:30",
"unlimited_time": false,
"start_on_first_connect": false,
"waiting_for_first_connection": false,
"activated_at": null,
"created_at": "2026-11-30T01:45:02+03:30",
"updated_at": "2026-11-30T01:45:03+03:30",
"accounts": [
{
"protocol": "wireguard",
"account_id": 3,
"name": "order10233",
"traffic_used_bytes": 0,
"online": null,
"router_state": null
},
{
"protocol": "l2tp",
"account_id": 1,
"name": "order10233",
"traffic_used_bytes": 0,
"online": false,
"router_state": "absent"
}
]
}
}GETRouters where you can sell L2TP/v1/l2tp-servers
Key access: read read
curl "https://api.mikropanel.ir/v1/l2tp-servers" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"data": [
{
"router_id": 1,
"name": "Frankfurt-1",
"server": "l2tp.vpn.example.com"
}
]
}Usage
GETDaily or hourly traffic of one peer/v1/peers/{peer_id}/usage
A day range covers at most 366 days. L2TP traffic has totals only (see the client).
Key access: read read
Query parameters
| Name | Type | Meaning |
|---|---|---|
interval | str | day (default) or hour.Values: day | hour |
from | date | interval=day: first day (default 29 days before "to"). |
to | date | interval=day: last day (default today). |
date | date | interval=hour: the day (default today). |
curl "https://api.mikropanel.ir/v1/peers/1/usage?from=2026-11-28&to=2026-11-30" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"peer_id": 1,
"interval": "day",
"from": "2026-11-28",
"to": "2026-11-30",
"total": {
"rx_bytes": 1605000000,
"tx_bytes": 200625000,
"total_bytes": 1805625000
},
"points": [
{
"date": "2026-11-28",
"rx_bytes": 410000000,
"tx_bytes": 51250000,
"total_bytes": 461250000
},
{
"date": "2026-11-29",
"rx_bytes": 980000000,
"tx_bytes": 122500000,
"total_bytes": 1102500000
},
{
"date": "2026-11-30",
"rx_bytes": 215000000,
"tx_bytes": 26875000,
"total_bytes": 241875000
}
]
}GETDaily or hourly traffic of all your peers/v1/usage
Key access: read read
Query parameters
| Name | Type | Meaning |
|---|---|---|
interval | str | day (default) or hour.Values: day | hour |
from | date | interval=day: first day (default 29 days before "to"). |
to | date | interval=day: last day (default today). |
date | date | interval=hour: the day (default today). |
curl "https://api.mikropanel.ir/v1/usage?from=2026-11-28&to=2026-11-30" \ -H "Authorization: Bearer mp_live_YOUR_KEY"
{
"interval": "day",
"from": "2026-11-28",
"to": "2026-11-30",
"total": {
"rx_bytes": 1605000000,
"tx_bytes": 200625000,
"total_bytes": 1805625000
},
"points": [
{
"date": "2026-11-28",
"rx_bytes": 410000000,
"tx_bytes": 51250000,
"total_bytes": 461250000
},
{
"date": "2026-11-29",
"rx_bytes": 980000000,
"tx_bytes": 122500000,
"total_bytes": 1102500000
},
{
"date": "2026-11-30",
"rx_bytes": 215000000,
"tx_bytes": 26875000,
"total_bytes": 241875000
}
]
}Service
GETThis reference (HTML)/v1/docs
No key needed
curl "https://api.mikropanel.ir/v1/docs"
GETExample client in PHP/v1/examples/mikropanel.php
No key needed
curl "https://api.mikropanel.ir/v1/examples/mikropanel.php"
GETExample client in Python/v1/examples/mikropanel.py
No key needed
curl "https://api.mikropanel.ir/v1/examples/mikropanel.py"
GETIs the API up and can it reach its database/v1/health
No key needed
curl "https://api.mikropanel.ir/v1/health"
{
"status": "ok",
"database": true,
"version": "1.0.0"
}GETOpenAPI 3.1 description/v1/openapi.json
No key needed
curl "https://api.mikropanel.ir/v1/openapi.json"
GETPostman collection of every endpoint/v1/postman.json
No key needed
curl "https://api.mikropanel.ir/v1/postman.json"
Subscription (customer apps)
Your customer app reads the configuration and the traffic and time left from these addresses. No API key: the code or UUID is the secret, because the answer holds the private key. A web page on another domain cannot call them.
GET https://mpeer.ir/giftcode/{code}
GET https://mpeer.ir/config/{uuid}curl "https://mpeer.ir/giftcode/K7M2PQ9X"
{
"client_config": "[Interface]\nPrivateKey = CLIENT_PRIVATE_KEY\nAddress = 172.0.0.4/32\nDNS = 1.1.1.1, 8.8.8.8\n\n[Peer]\nPublicKey = kO1Vw0Qq0dS7o8Yv9m1m0m6i7l4uY5o2m3q4r5s6t7U=\nEndpoint = r1.vpn.example.com:61234\nAllowedIPs = 0.0.0.0/0",
"peer_name": "order10233",
"subscription": {
"days_remaining": 30,
"days_total": 30,
"expires_at": "2026-12-30T01:45:04+03:30",
"seconds_remaining": 2591997,
"shared_between_devices": false,
"status": "active",
"traffic_limit_bytes": 21474836480,
"traffic_remaining_bytes": 18253611008,
"traffic_used_bytes": 3221225472,
"unlimited_time": false,
"unlimited_traffic": false,
"usable": true,
"usage_updated_at": null,
"waiting_for_first_connection": false
},
"success": true,
"uuid": "4077a464-06ff-4f84-8bd7-de0982b83585"
}Fields of subscription
| Name | Type | Meaning |
|---|---|---|
status | string | State of the subscription; see the table of values. |
usable | boolean | The customer can connect. |
unlimited_traffic | boolean | There is no traffic limit to show. |
traffic_limit_bytes | integer | null | Traffic limit; null when unlimited. |
traffic_used_bytes | integer | Used in the current period (download and upload). |
traffic_remaining_bytes | integer | null | Traffic left, never below 0; null when unlimited. |
unlimited_time | boolean | It never expires. |
days_total | integer | null | Length of the subscription in days. |
days_remaining | integer | null | Days left, rounded up (5 hours left is 1); 0 means expired. The panel's public client page rounds down. |
seconds_remaining | integer | null | For a countdown on the last day. |
expires_at | string | null | ISO 8601 with offset; null when unlimited or not started. |
waiting_for_first_connection | boolean | The days start at the first connection. |
shared_between_devices | boolean | The figures belong to one quota shared by several devices. |
usage_updated_at | string | null | When the traffic was last read from the server. |
Values of status
| status | usable | Meaning |
|---|---|---|
active | true | Working. |
not_started | true | Ready; time starts at the first connection. |
expired | false | The time is over. |
out_of_traffic | false | The traffic is used up. |
suspended | false | Switched off by the seller. |
inactive | false | Switched off for a used-up limit that has not been cleared. |
Errors
| HTTP | Meaning |
|---|---|
400 | The code is not 4 to 12 letters or digits. |
404 | No client has this code or UUID (deleted, or the code was replaced), or it has no configuration. |
429 | Code address only: 30 different unknown codes in 10 minutes. Correct codes are refused too until Retry-After passes. |
500 | Panel error. Retry later. |
Ask every few minutes; traffic is refreshed about once a minute. A server that asks for many customers should use the UUID address, which has no lookup limit. subscription can be null: the configuration is still valid.
Error codes
| Code | HTTP | Meaning |
|---|---|---|
account_inactive | 403 | The account is suspended or expired. |
add_to_unlimited | 409 | There is no limit to add to: this is already unlimited. |
agent_needs_wireguard | 403 | Agents make L2TP services on a WireGuard peer. |
already_member | 409 | The peer already belongs to a client. |
api_disabled | 403 | API access is not enabled for this account. |
bad_content_type | 415 | Send the body as application/json. |
bad_json | 400 | The request body is not valid JSON. |
bad_protocols | 422 | protocols must name wireguard and/or l2tp. |
bad_value | 422 | A field has an invalid value. |
billing_unsupported | 409 | This plan cannot be used for this operation. |
body_too_large | 413 | The request body is too large. |
client_renew_unsupported | 409 | A service with L2TP only supports a full renewal. |
clients_disabled | 404 | L2TP clients are not enabled on this panel. |
clients_not_allowed | 403 | L2TP clients are not enabled for this account. |
config_unavailable | 404 | No configuration is stored for this peer. |
conflicting_fields | 422 | These fields cannot be used together. |
credits_expired | 409 | Your credit for this plan has expired. |
daily_limit_reached | 429 | The daily limit of changes is used up. |
database_unavailable | 503 | The database is not available. |
duration_required | 422 | Give days, expires_at or unlimited_time. |
encryption_unavailable | 503 | Secret storage is not available on this server. |
expiry_in_past | 422 | The expiry date must be in the future. |
external_ref_taken | 409 | Another of your peers already has this external_ref. |
group_not_supported | 409 | This peer is part of a multi-device group. Manage it in the dashboard for now. |
https_required | 403 | Use HTTPS. |
idempotency_key_required | 422 | Send an Idempotency-Key header (8 to 128 characters). |
idempotency_key_reused | 422 | This Idempotency-Key was used for a different request. |
in_client | 409 | This peer belongs to a client; manage it through /clients. |
in_group | 409 | The peer is part of a multi-device group. |
insufficient_credit | 409 | Not enough traffic credit. |
insufficient_credits | 409 | Not enough credits for this plan. |
insufficient_scope | 403 | This key does not have the needed scope. |
internal_error | 500 | Unexpected server error. Quote the request id to support. |
invalid_api_key | 401 | The API key is not valid, expired or revoked. |
invalid_name | 422 | The name must be 3 to 30 characters: a-z, A-Z, 0-9, "-" and "_". |
invalid_plan | 422 | The plan id is not valid. |
ip_not_allowed | 403 | This IP address is not in the allowed list of the account. |
l2tp_failed | 502 | L2TP could not be added. |
l2tp_not_allowed | 403 | L2TP is not allowed on this router for your account. |
l2tp_unavailable | 409 | L2TP is not available on this router. |
member_not_found | 404 | Peer not found. |
method_not_allowed | 405 | This method is not allowed here. |
missing_api_key | 401 | Send your key as "Authorization: Bearer <key>". |
missing_field | 422 | A required field is missing. |
name_taken | 409 | This name is already used on this router. |
no_agent_profile | 403 | The account has no agent profile. |
no_credits | 409 | You have no credit for this plan. |
no_free_ip | 409 | No free address is left on this router. |
no_l2tp | 404 | This client has no L2TP account. |
no_router_assigned | 409 | No router is assigned to this account. |
no_server | 409 | This client has no router. |
not_agent | 403 | The API is for agent accounts. |
not_found | 404 | Not found. |
nothing_to_renew | 422 | The renewal changes nothing. |
operation_failed | 502 | The operation failed. Check the resource before retrying; quote the request id to support. |
out_of_range | 422 | A value is outside the allowed range. |
outcome_unknown | 409 | The first request with this key did not finish cleanly. Check the resource (for example by external_ref) before sending a new key. |
peer_limit_reached | 409 | Your peer limit is used up. |
peer_locked | 409 | This peer is locked by the account owner or by a package limit. |
peer_manager_unavailable | 503 | Peer management is not available right now. |
peer_not_attachable | 409 | This peer cannot become a client in its current state. |
plan_conversion_needs_limits | 422 | Renewing a plan peer with custom limits needs both traffic and duration. |
plan_credit_only | 403 | This account works with credit plans only. |
plan_group_unsupported | 409 | A multi-device client cannot be renewed with a plan. |
plan_mode_disabled | 403 | Credit plans are not enabled for this account. |
plan_not_found | 404 | Plan not found or inactive. |
plan_protocols | 409 | The plan and the protocols do not match. |
plan_router_mismatch | 409 | This plan cannot be used on this router. |
protocol_present | 409 | The client already has L2TP. |
rate_limited | 429 | Too many requests. Wait and retry. |
renew_days_limit | 403 | A limited agent can renew for at most 90 days. |
renew_required | 409 | This peer reached its limit or expiry. Renew it first. |
request_in_progress | 409 | The first request with this key is still running. |
router_busy | 503 | Another change is running on this router. Retry in a few seconds. |
router_full | 409 | This router has no free capacity. |
router_not_assigned | 403 | This router is not assigned to you. |
router_not_found | 404 | Router not found. |
router_not_ready | 409 | WireGuard is not set up on this router. |
router_peer_cap_reached | 409 | Your peer limit on this router is used up. |
router_peer_cap_unset | 409 | No peer limit is set for you on this router yet. |
router_required | 422 | Say which router (router_id). |
router_unreachable | 502 | The router could not be reached. |
server_busy | 503 | The server is busy. Retry in a few seconds. |
speed_not_allowed | 422 | Agents cannot set a speed per peer; the shared agent speed applies. |
too_many_auth_failures | 429 | Too many failed keys from this address. |
too_many_concurrent_writes | 429 | Too many changes running at the same time. |
traffic_required | 422 | Give traffic_bytes or unlimited_traffic. |
unknown_field | 422 | The request has fields this endpoint does not accept. |
unlimited | 409 | This client has no traffic limit, so there is nothing to add to. |
unlimited_not_allowed | 403 | A limited agent cannot give unlimited traffic or time. |