Admin Portal API Docs

Use the same portal username and password with HTTP Basic auth. No API key is required.

Base URL

Use either admin domain. The tunnel domain works like pnl2.

https://admin.vsl247.com/api/v1
https://admin2.vsl247.com/api/v1

Authentication

Every API request uses HTTP Basic auth with the admin portal account username and password.

curl -u 'admin_username:admin_password' \
  https://admin2.vsl247.com/api/v1/me
GET

/me

Returns the current portal account. Admin accounts also get quota, allocated GB, and remaining GB.

GET

/admins

Superadmin only. Lists portal admins and their quota usage.

POST

/admins

Superadmin only. Creates a portal admin and linked non-sudo Marzban admin.

{
  "username": "portal_admin",
  "portal_password": "strong-password",
  "marzban_username": "marzban_admin",
  "marzban_password": "strong-password",
  "quota_gb": 100
}
PATCH

/admins/<id>

Superadmin only. Charge/reduce quota, enable/disable, or update passwords.

{
  "add_gb": 20,
  "reduce_gb": 5,
  "is_active": true,
  "portal_password": "new-password",
  "marzban_password": "new-password"
}
DELETE

/admins/<id>

Superadmin only. Deletes the admin from this portal. It does not delete Marzban users.

GET

/clients

Admin only. Paginated client list. Live Marzban status is included by default.

/clients?search=&page=1&per_page=10&live=1
POST

/clients

Admin only. Creates a Marzban user using the admin's remaining quota.

{
  "username": "client_username",
  "data_limit_gb": 20,
  "duration_days": 30,
  "inbounds": []
}
GET

/clients/<username>

Admin only. Returns one owned client with live status, traffic, subscription URL, and last connection data.

POST

/clients/<username>/add-gb

Admin only. Adds GB to an owned client and reduces the admin's remaining quota.

{
  "add_gb": 10
}

Responses

  • Success responses include "ok": true.
  • Error responses include "ok": false and an error message.
  • Unauthenticated requests return 401.
  • Wrong role requests return 403.