Contoh Request
Gunakan HTTPS: https://<VPS_DOMAIN>.
Trial Account (Auto)
Request
curl -X POST https://<VPS_DOMAIN>/api/v1/vpn/accounts/trial \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"protocol": "ssh",
"trial_minutes": 60,
"bandwidth_gb": 1,
"device_limit": 1
}'
Response
{
"account": {
"id": "ssh:trialabc123",
"protocol": "ssh",
"username": "trialabc123",
"expires_at": "2026-01-30"
},
"protocol_info": {
"ports": ["80/tcp", "443/tcp", "20000-65535/udp"],
"networks": ["tcp", "udp"]
}
}
SSH
Request
curl -X POST https://<VPS_DOMAIN>/api/v1/vpn/accounts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"protocol": "ssh",
"username": "user1",
"password": "pass1",
"expires_at": "2026-01-30",
"bandwidth_gb": 10,
"device_limit": 2
}'
Response
{
"account": {
"id": "ssh:user1",
"protocol": "ssh",
"username": "user1",
"expires_at": "2026-01-30"
},
"protocol_info": {
"ports": ["80/tcp", "443/tcp", "20000-65535/udp"],
"networks": ["tcp", "udp"]
},
"ssh_details": {
"host": "vpn.example.com",
"ports": {
"ssh_ws": [80, 8080, 8880, 2082, 2095, 2086, 443, 8443],
"ssh_udp": "20000-65535"
},
"access": {
"ws": "vpn.example.com:80@user1:pass1",
"wss": "vpn.example.com:443@user1:pass1",
"udp": "vpn.example.com:20000-65535@user1:pass1"
}
}
}
Xray (VMess/VLESS/Trojan)
Request
curl -X POST https://<VPS_DOMAIN>/api/v1/vpn/accounts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"protocol": "xray",
"username": "user1",
"expires_at": "2026-01-30",
"bandwidth_gb": 10,
"device_limit": 2
}'
Response
{
"account": {
"id": "xray:user1",
"protocol": "xray",
"username": "user1",
"expires_at": "2026-01-30"
},
"protocol_info": {
"ports": ["80/tcp", "443/tcp"],
"networks": ["tcp", "ws", "httpupgrade", "xhttp", "grpc"]
},
"vmess_details": {
"domain": "vpn.example.com",
"ports": { "public": { "tls": 443, "non_tls": 80 } },
"links": {
"ws_tls": "vmess://...",
"ws_ntls": "vmess://..."
}
}
}
OpenVPN
Request
curl -X POST https://<VPS_DOMAIN>/api/v1/vpn/accounts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"protocol": "openvpn",
"username": "user1",
"password": "pass1",
"expires_at": "2026-01-30",
"bandwidth_gb": 10,
"device_limit": 2
}'
Response
{
"account": {
"id": "openvpn:user1",
"protocol": "openvpn",
"username": "user1",
"expires_at": "2026-01-30"
},
"protocol_info": {
"ports": ["1194/tcp", "2200/udp"],
"networks": ["tcp", "udp"]
}
}
NoobVPN
Request
curl -X POST https://<VPS_DOMAIN>/api/v1/vpn/accounts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"protocol": "noobvpn",
"username": "user1",
"password": "pass1",
"identifier": "noobz-id.github.io",
"expires_at": "2026-01-30",
"bandwidth_gb": 10,
"device_limit": 2
}'
Response
{
"account": {
"id": "noobvpn:user1",
"protocol": "noobvpn",
"username": "user1",
"expires_at": "2026-01-30"
},
"noobvpn_details": {
"domain": "vpn.example.com",
"server_ssl": "vpn.example.com:9444",
"server_plain": "vpn.example.com:8881",
"username": "user1@noobz-id.github.io"
}
}
ZIVPN
Request
curl -X POST https://<VPS_DOMAIN>/api/v1/vpn/accounts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"protocol": "zivpn",
"password": "pass1",
"expires_at": "2026-01-30",
"bandwidth_gb": 10,
"device_limit": 2
}'
Response
{
"account": {
"id": "zivpn:pass1",
"protocol": "zivpn",
"username": "pass1",
"expires_at": "2026-01-30"
},
"protocol_info": {
"ports": ["6000-19999/udp"],
"networks": ["udp"]
}
}
Renew Account
Request
curl -X POST https://<VPS_DOMAIN>/api/v1/vpn/accounts/ssh:user1/renew \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"expires_at": "2026-02-28",
"bandwidth_gb": 20,
"device_limit": 2
}'
Response
{
"account": {
"id": "ssh:user1",
"protocol": "ssh",
"username": "user1",
"expires_at": "2026-02-28"
},
"protocol_info": {
"ports": ["80/tcp", "443/tcp", "20000-65535/udp"],
"networks": ["tcp", "udp"]
}
}
Delete Account
Request
curl -X DELETE https://<VPS_DOMAIN>/api/v1/vpn/accounts/ssh:user1 \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{ "status": "deleted" }