V1 api reference

Authentication

Each API request must have an ‘Authorization’ header with api key value. API key can be obtained in user panel in ‘Account settings’.

Third-party API integrations
PHP Symfony framework bundle by Alexey Samara

GET https://api.proxybonanza.com/v1/userpackages.json

List of active proxy plans in user account.

Example request:

$ch = curl_init();
$apiUrl = "https://api.proxybonanza.com/v1/userpackages.json";
$apiKey = "YOUR API KEY GOES HERE";
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ".$apiKey));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);

Result:

{
  "success": true,
  "data": [
    {
      "id": 212121,
      "login": "login11",
      "password": "login11",
      "expires": "2015-02-06T00:00:00+0000",
      "bandwidth": 34192444911,
      "last_ip_change": "2014-11-10T00:00:00+0000",
      "package": {
        "name": "Special 3",
        "bandwidth": 10737418240,
        "price": 5,
        "howmany_ips": 1,
        "price_per_gig": 1,
        "package_type": "exclusive"
      }
    },
    {
      "id": 31313131,
      "login": "login444",
      "password": "login444",
      "expires": "2015-01-01T00:00:00+0000",
      "bandwidth": 3433019582,
      "last_ip_change": "2014-07-28T00:00:00+0000",
      "package": {
        "name": "International",
        "bandwidth": 2147483648,
        "price": 12,
        "howmany_ips": 2,
        "price_per_gig": 2,
        "package_type": "geo"
      }
    }
  ]
}

GET https://api.proxybonanza.com/v1/userpackages/[userpackage ID].json

Details of proxy plan including list of proxy IPs. Substitute [userpackage ID] with ID from https://api.proxybonanza.com/v1/userpackages.json results.

Example request:

$ch = curl_init();
$apiUrl = "https://api.proxybonanza.com/v1/userpackages/[userpackage ID].json";
$apiKey = "YOUR API KEY GOES HERE";
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ".$apiKey));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);

Result:

{
  "success": true,
  "data": {
    "id": 212121,
    "login": "login11",
    "password": "login11",
    "expires": "2015-02-06T00:00:00+0000",
    "bandwidth": 34192444911,
    "last_ip_change": "2014-11-10T00:00:00+0000",
    "ippacks": [
      {
        "ip": "99.22.11.22",
        "port_http": 45623,
        "port_socks": 46860,
        "proxyserver": {
          "georegion_id": 18,
          "georegion": {
            "name": "New York",
            "country": {
              "isocode": "US",
              "name": "USA"
            }
          }
        }
      }
    ],
    "authips": [
      {
        "id": 3112222,
        "ip": "33.33.44.22",
        "userpackage_id": 212121
      }
    ],
    "package": {
      "name": "Special 3",
      "bandwidth": 10737418240,
      "price": 5,
      "howmany_ips": 1,
      "price_per_gig": 1,
      "package_type": "exclusive"
    }
  }
}

GET https://api.proxybonanza.com/v1/authips.json

List of all authentication IPs in user account.

Example request:

$ch = curl_init();
$apiUrl = "https://api.proxybonanza.com/v1/authips.json";
$apiKey = "YOUR API KEY GOES HERE";
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ".$apiKey));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);

Result:

{
  "success": true,
  "data": [
    {
      "id": 212121,
      "userpackage_id": 51,
      "ip": "33.33.44.22"
    }
  ]
}

POST https://api.proxybonanza.com/v1/authips.json

Add new authentication IP to proxy plan. POST parameters: ip, userpackage_id. Returns ID of created authentication IP.

Example request:

$ch = curl_init();
$apiUrl = "https://api.proxybonanza.com/v1/authips.json";
$apiKey = "YOUR API KEY GOES HERE";
$userpackage_id = 0; //proxy plan ID to add authentication IP to
$auth_ip = '11.55.33.22'; //replace with real IP
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ".$apiKey));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'ip='.$auth_ip.'&userpackage_id='.$userpackage_id);
$data = curl_exec($ch);
curl_close($ch);

Result:

{
  "success": true,
  "data": {
    "id": "99999"
  }
}

DELETE https://api.proxybonanza.com/v1/authips/[auth IP ID].json

Remove authentication IP from proxy plan. Substitute [auth IP ID] with ID from GET https://api.proxybonanza.com/v1/authips.json results.

Example request:

$ch = curl_init();
$apiKey = "YOUR API KEY GOES HERE";
$auth_ip_id = 99999; //replace with your auth IP id
$apiUrl = "https://api.proxybonanza.com/v1/authips/".$auth_ip_id.".json";
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ".$apiKey));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
$data = curl_exec($ch);
curl_close($ch);

Result:

{
  "success": true,
  "data": []
}

GET https://api.proxybonanza.com/v1/userpackagedailystats/[userpackage ID].json

Data transfer usage stats for the last 30 days. Substitute [userpackage ID] with ID from https://api.proxybonanza.com/v1/userpackages.json results. bnd_http and bnd_socks show data transfer for socks5 and http proxy protocols in bytes. conn_http and conn_socks show number of requests/connections.

Example request:

$ch = curl_init();
$apiUrl = "https://api.proxybonanza.com/v1/userpackagedailystats/[userpackage ID].json";
$apiKey = "YOUR API KEY GOES HERE";
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ".$apiKey));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);

Result:

{
  "success": true,
  "data": [
    {
      "userpackage_id": 51,
      "date": "2014-12-29",
      "bnd_http": 70152,
      "conn_http": 248,
      "bnd_socks": 0,
      "conn_socks": 0,
      "bnd_total": 70152,
      "conn_total": 248
    },
    {
      "userpackage_id": 51,
      "date": "2014-12-14",
      "bnd_http": 0,
      "conn_http": 0,
      "bnd_socks": 5650,
      "conn_socks": 25,
      "bnd_total": 5650,
      "conn_total": 25
    }
}

GET https://api.proxybonanza.com/v1/userpackagehourlystats/[userpackage ID].json

Data transfer for the last 24 hours. Substitute [userpackage ID] with ID from https://api.proxybonanza.com/v1/userpackages.json results. When used with date parameter, it’ll show hourly data transfer usage for a given date. For example: https://api.proxybonanza.com/v1/userpackagehourlystats/[userpackage ID].json?date=2014-01-01.

Example request:

$ch = curl_init();
$apiUrl = "https://api.proxybonanza.com/v1/userpackagehourlystats/[userpackage ID].json";
$apiKey = "YOUR API KEY GOES HERE";
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: ".$apiKey));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);

Result:

{
  "success": true,
  "data": [
    {
      "userpackage_id": 51,
      "date": "2014-12-29",
      "hour": 17,
      "bnd_http": 70152,
      "conn_http": 248,
      "bnd_socks": 0,
      "conn_socks": 0,
      "bnd_total": 70152,
      "conn_total": 248
    },
    {
      "userpackage_id": 51,
      "date": "2014-12-29",
      "hour": 16,
      "bnd_http": 0,
      "conn_http": 0,
      "bnd_socks": 1130,
      "conn_socks": 5,
      "bnd_total": 1130,
      "conn_total": 5
    }
}