The FoxyProxy Reseller API is a RESTful interface for resellers to resell VPN servers, proxy servers, and customer accounts on those servers. Reselling can be done on your website or within your software product. Supported services include a variety of VPN protocols and proxy protocols.

Introduction

There are two main objects upon which you can operate: nodes and accounts. A node represents a device on which a VPN server and/or proxy server is running. An account represents a username/password on one or more nodes (vpn/proxy servers). Accounts are used to authenticate with nodes. Changes to accounts (account history is not yet available in this API but are tracked.

You should also be aware of the concept of your reseller pool. Reseller pool is the list of nodes (or vpn/proxy servers) that your account can use. You may have 1 or 10,000 or any number of nodes in your pool. Currently, reseller pools can be only expanded/reduced by contact with FoxyProxy Support, not through this API.

You use this API to create accounts for your customers. You can also use this API to

  • list nodes in your reseller pool

  • activate, deactivate, and delete customer accounts

  • change passwords or usernames

  • get statistics about nodes and accounts like bandwidth use, timestamp of last use, etc

Your customers can use this API to enumerate their accounts and update their passwords.

Personally Identifiable Information (PII)

This API does not store any PII about your customers unless you choose to use email addresses for usernames. Passwords are stored using salted, SHA-512 one-way encryption with multiple passes. For this reason, passwords are unrecoverable. No data is logged about your customers except bandwidth use. That information is collected in order to isolate abusive customers (e.g. customers unintentionally part of a botnet or performing a denial-of-service attack on nodes in your reseller pool).

When deleting accounts, all records are permanently and irrecoverably purged from our systems.

We hope these policies meet or exceed GDPR regulations.

Authentication

There are two different roles with which you can authenticate to the API:

ROLE_RESELLER

the administrative role with which you can create accounts, deactivate accounts, list all of your accounts and nodes, etc. All endpoints documented in this API are callable with this role.

ROLE_USER

your customer’s role which is limited to enumerating account info for the authenticated username and updating associated passwords

ROLE_RESELLER

Upon signing up for the reseller service, FoxyProxy will issue you a username, password, and a domain. These are used to authenticate with the API using HTTP BASIC authentication and the custom HTTP header named X-DOMAIN. HTTP BASIC authentication allows for simpler auth than OAuth2 or JWT. It is completely stateless and token-less, but at the cost of being inherently insecure since HTTP BASIC is only Base64-encoded without any encryption. This limitation is mitigated by requiring all clients connect to API endpoints using HTTPS.

ROLE_USER

Your customers can authenticate against this API and use it in limited ways. This is provided so you can write applications for your customer, and he can retrieve account/node information within that application or update his password. When your customers authenticate over HTTPS using the X-DOMAIN HTTP header we assigned you, along with the HTTP BASIC username/password you create for them by calling Create Accounts, they can call a subset of the endpoints in this API.

Availability

API and VPN/proxy services are restarted every 90 days in order to renew SSL certificates. Downtime during this period is approximately 3 seconds per node. VPN/proxy services are unavailable during downtime, but API services are available. Unfortunately, existing VPN connections are terminated and must be re-established after the VPN services are restored. Notifications can be sent to alert you of forthcoming restarts.

Available Services

Different types of VPN and proxy services can be resold. You can offer some or all of these to your customers:

  • IPSec/IKEv2

  • IPSec/Cisco

  • IPSec/L2TP

  • OpenVPN

  • PPTP

  • HTTP Proxy

  • SSL Proxy

  • SOCKS5 Proxy

  • ShadowSocks

  • SNI

Some of these services work with IPv6 and some do not. Contact us for details.

Custom Domain Name

If you call this API from your application installed on your customers' devices, the customer may become aware of calls to FoxyProxy domains. This may raise suspicion unless you inform your customers about the purpose of these calls. You can therefore expose this API under your own domain name with our cooperation. You can also expose nodes (servers) in your reseller pool using your own domain names.

UTF-8 Support

Usernames and password can be any combination of UTF-8 characters. Non-ASCII characters work for all services resold by FoxyProxy except the PPTP VPN protocol (likely due to its significant age). Please keep this in mind if you plan to resell PPTP VPN service.

API Versioning

The current version of this API is called v2. The API uses the HTTP Content-Type header so that clients can request different API versions:

application/vnd.foxyproxy.reseller.api-nonleased.v2+json

means use exactly v2 of the API, even if there are newer versions

future

other Content-Types will be added as new API versions with breaking changes are released. Non-breaking versions may use the same Content-Type.

Endpoints

The examples in this document use domain.com for all endpoints. That domain is fictitious and does not work with this API. You will be given test and production API endpoints after registration.

All endpoints share these common HTTP request headers:

Table 1. HTTP Request Headers
Name Value Required?

X-DOMAIN

Provided by FoxyProxy

Yes

Authorization

HTTP Basic Auth provided by FoxyProxy and encoded like this

Yes

Content-Type

application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8

Yes

Accept

application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8

No

Accounts

An account represents a customer who can be assigned to one or more nodes (vpn/proxy servers). Each account is assigned to a single node and is used to authenticate against and use a vpn/proxy server on that node. Accounts that you create will often share the same username on different nodes.

Typically, each of your customers will have multiple accounts (one per node). Each of those accounts can share the same username and password for simplicity.

This section describes the endpoints and verbs used to create, read, update, and delete (CRUD) accounts.

Example Account

{
  "uid": "5b09a8dd-16fe-4e13-9407-e169f7f869ec",
  "active": true,
  "username": "johnConnor86",
  "node": { /* omitted for simplicity */ }
}

Active and Inactive

Accounts can be active or inactive. An inactive account cannot connect the node to which it is assigned, but the customer can still call API endpoints such as Get Accounts. You can activate/deactivate accounts based on customer payments, for example. When a customer fails to pay, you can deactivate his accounts. If he decides to pay a few days later, you can activate his accounts again. If he does not pay after several months, you can delete his accounts altogether (although this is not recommended because account history and bandwidth accounting is permanently lost). You can also deactivate his account on only some nodes, and not others, if you suspect abuse or want to restrict the customer for other reasons — perhaps you sell tiered access where customers only receive access to a subset of servers unless they pay full price.

Common API properties

Account operations which write/change data (create, update, delete) accept an optional JSON object in the HTTP request body. There are two JSON properties common to all of these API endpoints: nodenames and comment.

nodenames property

The nodenames property is a JSON array. It limits the effect of the current create, update, or delete operation to the set of nodes in the JSON array. If omitted, the current create, update, or delete operation applies to the specified username for all nodes in your reseller pool.

comment property

The comment property is a JSON string. Use it to save an optional reason or note for the current operation. For example, if you deactivate an account, you might add a comment such as User filed credit card chargeback. See ticket 9108832. Comments can be retrieved using the future GET /accounts/history/{username} operation. Comments are limited to 512 characters each. Future API release may also permit comments to be associated with an account itself, rather than just actions on accounts (account history).

Do not save personally identifiable information in comments

Create Accounts

POST /accounts/

Requires ROLE_RESELLER privilege.

An account is a username/password on one node. This endpoint creates accounts on one or more nodes with the specified username/password. If the optional nodeNames array in the JSON HTTP request body is missing or the length of the array is 0, then accounts are created on all nodes in your reseller pool (unless the username already exists; read below for details).

Accounts are created in the active state by default, but active in the JSON HTTP request body can be specified as 0 to create the accounts in the inactive/deactivated state. A value of 1 for active (the default) means the accounts are created in the active state.

An optional comment can be specified in the JSON HTTP request body. Comments are arbitrary strings that you can use for notes about accounts. This comment, if specified, is stored in the account’s history, accessed from the GET /accounts/history/{username} operation (not yet available). The comment is not stored for accounts that already exist before this call. Each comment is limited to 512 characters. Future API release may also permit comments to be associated with an account itself, rather than just actions on accounts (account history).

Password Restrictions

The password you send in the JSON HTTP request body should be unencrypted. It is stored using salted, SHA-512 one-way encryption with multiple passes. For this reason, the password is unrecoverable. Passwords must be between 3 and 16 characters, inclusive.

Username Restrictions

Usernames are unique per node. They cannot be changed after creation. (we may add this ability later). You cannot create the same username more than once on the same node. Use Username Exists to determine if username is already in use for any node. Usernames cannot contain colon (:) since that is reserved as an HTTP Basic authentication delimiter. Usernames must be between 3 and 16 characters, inclusive.

Non-ASCII characters are currently untested for some VPN and proxy protocols. This API supports non-ASCII characters in both usernames and passwords, and won’t complain about them, but depending on the VPN or proxy protocol, authentication may fail with non-ASCII characters. Please contact us if you’d like confirmation that non-ASCII characters will work for your system.
HTTP Response

As long as at least one account is created, the returned HTTP status code is 201. The JSON response body is an array of accounts. It includes both newly created accounts as well as any accounts for the specified nodes* that already existed with the given username before this call.

*specified nodes: the set of nodes if you called this API function with an optional nodeNames array OR all nodes in your reseller pool if nodeNames was omitted from the request. See the nodenames property section.

Here is an example response:

[
  {
    "uid": "13837902-33aa-4804-ae5a-7ece5bbcf8bc",
    "active": true,
    "username": "johnConnor88",
    "alreadyExists": true, (1)
    "node": {
      "active": true,
      "name": "test-node-it1", (2)
      "ipAddress": "89.22.109.41",
      "country": "Milan",
      "countryCode": "IT",
      "city": "Italy",
      "services": [ (3)
        {
          "name": "ipsec/ikev2/standard"
        },
        {
          "name": "ipsec/cisco"
        },
        {
          "name": "pptp"
        },
        {
          "name": "http-proxy",
          "ports": [
            8903,
            12951
          ]
        },
        {
          "name": "ssl-proxy",
          "ports": [
            43,
            266
          ]
        },
        {
          "name": "socks5-proxy",
          "ports": [
            515
          ]
        },
        {
          "name": "ipsec/lt2p"
        },
        {
          "name": "openvpn",
          "config": "client\ndev tun\nproto tcp\nremote 89.22.109.41 tcp\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\ncomp-lzo\nverb 3\nauth-user-pass\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIC/jCCAegCAQAwgYoxgYcwDQYDVQQDDAZkZmRzZmcwGwYJKoZIhvcNAQkBEw5k\nc2ZnZ0BzZGZhLmNvbTAKBgNVBAsTA3NhZDAKBgNVBAoTA2FzZDAOBgNVBAkTB3Nk\ndmNhc3YwDQYDVQQHEwZzZHZhc2MwCQYDVQQIEwJUWDAMBgNVBBETBTc3MDk4MAkG\nA1UEBhMCVVMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCi+KuwbmNk\nrlt9/mzpU3Wr+j/75rZJLEXj1LLacJ6dKmTick15pQiQ/neUsqElc8lE4ziX0lsp\nJIVstL9xpjYm0KG5BWiKffuAjoLlZEz29kAxd4+WiSGUdZy/jcdF/n8pLocQmeTz\nUcYRiQA2yXa/eBDT4Zv3N/oheemv0KQNnI/RI0F0Xmq7QBZ+SwOwBBH6x6UgPSrl\nIPxJ1uqjHnYtDSh3UJv3783MgSTTUs3KujTgDe2rb6sQ/zUo+RYoY9NdgmNnww4y\nvMu+InWaTmT9HPZiIIYVz2+7n6QLgMkSiBXJ16Qd20FOqTVaz/+wBm60mWR5KNXD\naREDLEzXI0L7AgMBAAGgMDAuBgkqhkiG9w0BCQ4xITAfMB0GA1UdDgQWBBRLKS9Y\nJsHymtlmhQl988rFG2g+KzALBgkqhkiG9w0BAQsDggEBACeJm4OnGDOpSYRoG3NS\nyX4ehuK2PVnRIQGpuOrSCbZAmOMx85VgYZOG9bJyP+ejr01W4KEZdAvDEI8lKFsr\nztzpvWEmtDPijZJcJLONnDtQtw2cNgafi7ONWybi14oVskO+vAYe7nDfojpFkeKg\nEvRnTKsDCg4L2uZGL3Ko/rHiTD7e8kqn7zO/VqfaW+kDxBjy+3PCEppcnF4e5QWr\ncPCqZrOdLYvjzMtsj+QDZFkZElMHIcPUcM461cLuXo9pRegZ1zT/7QKAGmjBPg+z\nOSw30FqaXlrHqUK9Py2M/7eiN49cd7ije/+3HtBPslhYos/OaHyz/FY/iHz73ybm\nrVEHQYDVR0OBBYEFCIs8LeB86HZFakNMWg7Dr4yg71pMIHfBgNVHSMEgdcwgdSAFCIs\n8LeB86HZFakNMWg7Dr4yg71poYGwpIGtMIGqMQswCQYDVQQGEwJVUzELMAkGA1UE\nCBMCTUExEDAOBgNVBAcTB0JlZGZvcmQxGDAWBgNVBAoTD0ZveHlQcm94eSwgSW5j\nLjEQMA4GA1UECxMHb3BlbnZwbjESMBAGA1UEAxMJbG9jYWxob3N0MRIwEAYDVQQp\nEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFkbWluQGdldGZveHl\n-----END CERTIFICATE-----</ca>"
        }
      ]
    }
  }
]
1 This username already existed on this node before this call. The account was not created or changed in any way as a result of this call.
2 This is the nodename. It can be combined with any of the DNS suffixes from GET /nodes/dns-suffixes/ to create a fully-qualified DNS name. But you can always use ipAddress to connect to the server (except for the ssl-proxy service which requires a DNS name). We suggest using ipAddress when possible because some countries/ISPs block DNS names.
3 An array of VPN/proxy services supported by these nodes. In this example, both nodes support all of the same services.
You should confirm the returned number of accounts is what you expect. A count lower than expected indicates an internal error and that not accounts could be created.
What if the username already exists?

If username already exists on some of the specified nodes (or all nodes if the optional nodeNames array in the JSON HTTP request body is omitted):

  • Accounts are only created on nodes which do not already have an account with the specified username

  • For accounts that already exist on nodes, comment is not stored.

  • For accounts that already exist on nodes, password and active status are not changed regardless of whether the values you specify in this call match the existing state of the accounts. To update existing accounts, you must use update passwords, activate accounts, and deactivate accounts.

  • On the returned JSON object, the alreadyExists property will be true for accounts that already existed prior to this call. If the account was created as a result of this call, the alreadyExists property will not be present in the returned JSON object.

  • If all nodes already have an account with the specified username, HTTP status 400 is returned with the this JSON:

{
  "exceptionId": "AccountsNotCreated",
  "error": "Bad Request",
  "message": "Accounts not created",
  "status": 400,
  "errors": [
    {
      "field": null,
      "code": "accounts.not.created",
      "message": "Accounts not created"
    }
  ]
}
If an account already exists, it is not updated when using this API function.

HTTP status code is 404 returned if (1) you do not have any nodes in your reseller pool or (2) none of the nodes you specified in the optional nodeNames array are in your reseller pool. If the optional nodeNames array contains some nodes which are in your reseller pool and some which are not, the nodes not in your pool are ignored.

Create accounts with username johnConnor88 on all nodes
curl example
$ curl 'https://domain.com/accounts/' -i -X POST \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    --data '{"username":"johnConnor88","password":"hunterkiller2","comment":"free account for beta user"}'}' (3)
1 Generates the HTTP Basic Authentication header. This must be the reseller’s credentials.
2 Provided to you by FoxyProxy
3 JSON with the username, password, and optional comment to create. The comment is associated with this account action (create), not the account itself, and is retrieved with GET /accounts/history/{username} (not yet available). Since nodeNames array is not specified, the account is created on all nodes in the reseller pool resulting in n accounts where n is the number of nodes in the reseller pool

For examples, we keep the number of nodes small. This reseller has only two nodes, but in reality most resellers have many more. So here two accounts are created:

HTTP response
  1HTTP/1.1 201 OK
  2X-Content-Type-Options: nosniff
  3X-XSS-Protection: 1; mode=block
  4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
  5Pragma: no-cache
  6Expires: 0
  7X-Frame-Options: DENY
  8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
  9Transfer-Encoding: chunked
 10Content-Length: xxxx
 11
 12[
 13  {
 14    "uid": "13837902-33aa-4804-ae5a-7ece5bbcf8bc",
 15    "active": true,
 16    "username": "johnConnor88",
 17    "node": {
 18      "active": true,
 19      "name": "test-node-it1", (1)
 20      "ipAddress": "89.22.109.41",
 21      "country": "Milan",
 22      "countryCode": "IT",
 23      "city": "Italy",
 24      "services": [ (2)
 25        {
 26          "name": "ipsec/ikev2/standard"
 27        },
 28        {
 29          "name": "ipsec/cisco"
 30        },
 31        {
 32          "name": "pptp"
 33        },
 34        {
 35          "name": "http-proxy",
 36          "ports": [
 37            8903,
 38            12951
 39          ]
 40        },
 41        {
 42          "name": "ssl-proxy",
 43          "ports": [
 44            43,
 45            266
 46          ]
 47        },
 48        {
 49          "name": "socks5-proxy",
 50          "ports": [
 51            515
 52          ]
 53        },
 54        {
 55          "name": "ipsec/lt2p"
 56        },
 57        {
 58          "name": "openvpn",
 59          "config": "client\ndev tun\nproto tcp\nremote 89.22.109.41 tcp\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\ncomp-lzo\nverb 3\nauth-user-pass\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIC/jCCAegCAQAwgYoxgYcwDQYDVQQDDAZkZmRzZmcwGwYJKoZIhvcNAQkBEw5k\nc2ZnZ0BzZGZhLmNvbTAKBgNVBAsTA3NhZDAKBgNVBAoTA2FzZDAOBgNVBAkTB3Nk\ndmNhc3YwDQYDVQQHEwZzZHZhc2MwCQYDVQQIEwJUWDAMBgNVBBETBTc3MDk4MAkG\nA1UEBhMCVVMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCi+KuwbmNk\nrlt9/mzpU3Wr+j/75rZJLEXj1LLacJ6dKmTick15pQiQ/neUsqElc8lE4ziX0lsp\nJIVstL9xpjYm0KG5BWiKffuAjoLlZEz29kAxd4+WiSGUdZy/jcdF/n8pLocQmeTz\nUcYRiQA2yXa/eBDT4Zv3N/oheemv0KQNnI/RI0F0Xmq7QBZ+SwOwBBH6x6UgPSrl\nIPxJ1uqjHnYtDSh3UJv3783MgSTTUs3KujTgDe2rb6sQ/zUo+RYoY9NdgmNnww4y\nvMu+InWaTmT9HPZiIIYVz2+7n6QLgMkSiBXJ16Qd20FOqTVaz/+wBm60mWR5KNXD\naREDLEzXI0L7AgMBAAGgMDAuBgkqhkiG9w0BCQ4xITAfMB0GA1UdDgQWBBRLKS9Y\nJsHymtlmhQl988rFG2g+KzALBgkqhkiG9w0BAQsDggEBACeJm4OnGDOpSYRoG3NS\nyX4ehuK2PVnRIQGpuOrSCbZAmOMx85VgYZOG9bJyP+ejr01W4KEZdAvDEI8lKFsr\nztzpvWEmtDPijZJcJLONnDtQtw2cNgafi7ONWybi14oVskO+vAYe7nDfojpFkeKg\nEvRnTKsDCg4L2uZGL3Ko/rHiTD7e8kqn7zO/VqfaW+kDxBjy+3PCEppcnF4e5QWr\ncPCqZrOdLYvjzMtsj+QDZFkZElMHIcPUcM461cLuXo9pRegZ1zT/7QKAGmjBPg+z\nOSw30FqaXlrHqUK9Py2M/7eiN49cd7ije/+3HtBPslhYos/OaHyz/FY/iHz73ybm\nrVEHQYDVR0OBBYEFCIs8LeB86HZFakNMWg7Dr4yg71pMIHfBgNVHSMEgdcwgdSAFCIs\n8LeB86HZFakNMWg7Dr4yg71poYGwpIGtMIGqMQswCQYDVQQGEwJVUzELMAkGA1UE\nCBMCTUExEDAOBgNVBAcTB0JlZGZvcmQxGDAWBgNVBAoTD0ZveHlQcm94eSwgSW5j\nLjEQMA4GA1UECxMHb3BlbnZwbjESMBAGA1UEAxMJbG9jYWxob3N0MRIwEAYDVQQp\nEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFkbWluQGdldGZveHl\n-----END CERTIFICATE-----</ca>"
 60        }
 61      ]
 62    }
 63  },
 64  {
 65    "uid": "6011b48c-81c2-4cf5-b47d-2a07a435a289",
 66    "active": true,
 67    "username": "johnConnor88",
 68    "alreadyExists": true, (3)
 69    "node": {
 70      "active": true,
 71      "name": "test-node-de1", (1)
 72      "ipAddress": "123.41.54.2",
 73      "country": "Germany",
 74      "countryCode": "DE",
 75      "city": "Berlin",
 76      "services": [ (2)
 77        {
 78          "name": "ipsec/ikev2/standard"
 79        },
 80        {
 81          "name": "ipsec/cisco"
 82        },
 83        {
 84          "name": "ipsec/lt2p"
 85        },
 86        {
 87          "name": "openvpn",
 88          "config": "client\ndev tun\nproto tcp\nremote 123.41.54.1 443 tcp\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\ncomp-lzo\nverb 3\nauth-user-pass\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIE7jCCA9agAwIBAgIJAKCGoU4jOKP3MA0GCSqGSIb3DQEBBQUAMIGqMQswCQYD\nVQQGEwJVUzELMAkGA1UECBMCTUExEDAOBgNVBAcTB0JlZGZvcmQxGDAWBgNVBAoT\nD0ZveHlQcm94eSwgSW5jLjEQMA4GA1UECxMHb3BlbnZwbjESMBAGA1UEAxMJbG9j\nYWxob3N0MRIwEAYDVQQpEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFk\nbWluQGdldGZveHlwcm94eS5vcmcwHhcNMTgwMTE3MDYzOTM1WhcNMjgwMTE1MDYz\nOTM1WjCBqjELMAkGA1UEBhMCVVMxCzAJBgNV3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFkbWluQGdldGZveHlwcm94\neS5vcmeCCQCghqFOIzij9zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IB\nAQC7U0PwUsJmmNHhHbTUMlsLAkd5DMrkoX1hQ55nEuSQNxHO8n75bQmBjlO2KqHr\nOOh1B6JBfTDdE4p55qAu1qfi7e9y+8QvIIYQCdp3o0QG84pYLJ7ftSknKKOZcfjI\nSxdK7+2UdN9ch+oOFrke9R1W3twIzlep9uyxwlnA5UeJ5Ax51+8eqFuKYkx0iIvY\n6D3GWWqDu80Pkpz/D5s9CkwLnCdFJIaHU6rNkoLYkv4g65P2IJJbhoDXTXStWrIO\nuKQxEWTrcjaVDyfNEyfjM6/Y7J9qMAjvVREkwrI0MNR94v6Rve/nV5GH581Vs//8\nJQqDdoW4E669ZSlrNgZk4E8r\n-----END CERTIFICATE-----</ca>"
 89        },
 90        {
 91          "name": "pptp"
 92        },
 93        {
 94          "name": "http-proxy",
 95          "ports": [
 96            6502,
 97            13301
 98          ]
 99        },
100        {
101          "name": "ssl-proxy",
102          "ports": [
103            999,
104            1121
105          ]
106        },
107        {
108          "name": "socks5-proxy",
109          "ports": [
110            1080,
111            36
112          ]
113        }
114      ]
115    }
116  }
117]
1 This is the nodename. It can be combined with any of the DNS suffixes from GET /nodes/dns-suffixes/ to create a fully-qualified DNS name. But you can always use ipAddress to connect to the server (except for the ssl-proxy service which requires a DNS name). We suggest using ipAddress when possible because some countries/ISPs block DNS names.
2 An array of VPN/proxy services supported by these nodes. In this example, both nodes support all of the same services.
3 This username already existed on this node before this call. This account was not created or changed in any way as a result of this call.
Create accounts with username johnConnor85 on only one node

By specifying an array of nodeNames, you can choose to create new accounts on selected nodes instead of all nodes.

curl example
$ curl 'https://domain.com/accounts/' -i -X POST \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    --data '{"username":"johnConnor85","password":"hunterkiller2", "nodeNames": ["test-node-de1"]}' (3)
1 Generates the HTTP Basic Authentication header. This must be the reseller’s credentials.
2 Provided to you by FoxyProxy
3 JSON of the accounts to create on the one named node, includes the username, password, nodeNames array and an optional comment (omitted)

One account is created:

HTTP response
 1HTTP/1.1 201 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12[
13  {
14    "uid": "122fdab6-60da-425c-8d36-c7b97c62420a",
15    "active": true,
16    "username": "johnConnor85",
17    "node": {
18      "active": true,
19      "name": "test-node-de1", (1)
20      "ipAddress": "123.41.54.2",
21      "country": "Germany",
22      "countryCode": "DE",
23      "city": "Berlin",
24      "services": [ (2)
25        {
26          "name": "ipsec/ikev2/standard"
27        },
28        {
29          "name": "ipsec/cisco"
30        },
31        {
32          "name": "ipsec/lt2p"
33        },
34        {
35          "name": "openvpn",
36          "config": "client\ndev tun\nproto tcp\nremote 123.41.54.1 443 tcp\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\ncomp-lzo\nverb 3\nauth-user-pass\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIE7jCCA9agAwIBAgIJAKCGoU4jOKP3MA0GCSqGSIb3DQEBBQUAMIGqMQswCQYD\nVQQGEwJVUzELMAkGA1UECBMCTUExEDAOBgNVBAcTB0JlZGZvcmQxGDAWBgNVBAoT\nD0ZveHlQcm94eSwgSW5jLjEQMA4GA1UECxMHb3BlbnZwbjESMBAGA1UEAxMJbG9j\nYWxob3N0MRIwEAYDVQQpEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFk\nbWluQGdldGZveHlwcm94eS5vcmcwHhcNMTgwMTE3MDYzOTM1WhcNMjgwMTE1MDYz\nOTM1WjCBqjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMRAwDgYDVQQHEwdCZWRm\nb3JkMRgwFgYDVQQKEw9Gb3h5UHJveHksIEluYy4xEDAOBgNVBAsTB29wZW52cG4x\nEjAQBgNVBAMTCWxvY2FsaG9zdDESMBAGA1UEKRMJRm94eVByb3h5MSgwJgYJKoZI\nhvcNAQkBFhlzc2xhZG1pbkBnZXRmb3h5cHJveHkub3JnMIIBIjANBgkqhkiG9w0B\nAQEFAAOCAQ8AMIIBCgKCAQEA7pPahdu5AX4iYFjgkjHFFKBdFC+j+VJ2BjcmpzfK\n4L0ahWfJRzw0GTH5mlgcj0b2vz0FhiHZZXEOF6qFtkBBycnHgep8EPjjqIzzbl28\nRuZ24DTmn/BokTPVBPIRd69JMg8W/Xt/DQYar4F0xpJkuWcHeJ39y3r68pxWrDqa\nwvmOv6WcMQHBj1rriHlA4KKqIRz279iOUWpU79HTCeM9l0NFUfuPMLPJuqacckak\n/GMad3ah9XL2vl63T3/O6PmGKkEz3L0W70XGeyXsFb8MEx6LSW3hyNC9S3Y3QKQQ\nqGNc+KBMwzl2sENE75gBDZzeIeaD1AlD2fycjyGx+tmvbwIDAQABo4IBEzCCAQ8w\nHQYDVR0OBBYEFCIs8LeB86HZFakNMWg7Dr4yg71pMIHfBgNVHSMEgdcwgdSAFCIs\n8LeB86HZFakNMWg7Dr4yg71poYGwpIGtMIGqMQswCQYDVQQGEwJVUzELMAkGA1UE\nCBMCTUExEDAOBgNVBAcTB0JlZGZvcmQxGDAWBgNVBAoTD0ZveHlQcm94eSwgSW5j\nLjEQMA4GA1UECxMHb3BlbnZwbjESMBAGA1UEAxMJbG9jYWxob3N0MRIwEAYDVQQp\nEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFkbWluQGdldGZveHlwcm94\neS5vcmeCCQCghqFOIzij9zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IB\nAQC7U0PwUsJmmNHhHbTUMlsLAkd5DMrkoX1hQ55nEuSQNxHO8n75bQmBjlO2KqHr\nOOh1B6JBfTDdE4p55qAu1qfi7e9y+8QvIIYQCdp3o0QG84pYLJ7ftSknKKOZcfjI\nSxdK7+2UdN9ch+oOFrke9R1W3twIzlep9uyxwlnA5UeJ5Ax51+8eqFuKYkx0iIvY\n6D3GWWqDu80Pkpz/D5s9CkwLnCdFJIaHU6rNkoLYkv4g65P2IJJbhoDXTXStWrIO\nuKQxEWTrcjaVDyfNEyfjM6/Y7J9qMAjvVREkwrI0MNR94v6Rve/nV5GH581Vs//8\nJQqDdoW4E669ZSlrNgZk4E8r\n-----END CERTIFICATE-----</ca>"
37        },
38        {
39          "name": "pptp"
40        },
41        {
42          "name": "http-proxy",
43          "ports": [
44            6502,
45            13301
46          ]
47        },
48        {
49          "name": "ssl-proxy",
50          "ports": [
51            999,
52            1121
53          ]
54        },
55        {
56          "name": "socks5-proxy",
57          "ports": [
58            1080,
59            36
60          ]
61        }
62      ]
63    }
64  }
65]
1 This is the nodename. It can be combined with any of the DNS suffixes from GET /nodes/dns-suffixes/ to create a fully-qualified DNS name. But you can always use ipAddress to connect to the server (except for the ssl-proxy service which requires a DNS name). We suggest using ipAddress when possible because some countries/ISPs block DNS names.
2 An array of VPN/proxy services supported by these nodes. In this example, both nodes support all of the same services.
Create accounts with username johnConnor85 on only two nodes in the inactive state

By specifying an array of nodeNames, you can choose to create new accounts on selected nodes instead of all nodes. You can also optionally specify the active/inactive state with the active property. The default when not specified is 1 (active). Here we use 0 to create them in the inactive/deactivated state.

curl example
$ curl 'https://domain.com/accounts/' -i -X POST \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    --data '{"username":"johnConnor85", "password":"hunterkiller2", "active": 0, "nodeNames": ["test-node-de1", "test-node-it1"]}' (3)
1 Generates the HTTP Basic Authentication header. This must be the reseller’s credentials.
2 Provided to you by FoxyProxy
3 JSON with the username and password of the accounts to create on the two named nodes. active is 0 which means the accounts are created in the inactive/deactivated state. The optional comment (omitted) property is omitted.

Two accounts are created:

HTTP response
  1HTTP/1.1 201 OK
  2X-Content-Type-Options: nosniff
  3X-XSS-Protection: 1; mode=block
  4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
  5Pragma: no-cache
  6Expires: 0
  7X-Frame-Options: DENY
  8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
  9Transfer-Encoding: chunked
 10Content-Length: xxxx
 11
 12[
 13  {
 14    "uid": "91635249-df1d-4409-a356-785e2a50b0d6",
 15    "active": false, (1)
 16    "username": "johnConnor85",
 17    "node": {
 18      "active": true,
 19      "name": "test-node-de1", (2)
 20      "ipAddress": "123.41.54.2",
 21      "country": "Germany",
 22      "countryCode": "DE",
 23      "city": "Berlin",
 24      "services": [ (3)
 25        {
 26          "name": "ipsec/ikev2/standard"
 27        },
 28        {
 29          "name": "ipsec/cisco"
 30        },
 31        {
 32          "name": "ipsec/lt2p"
 33        },
 34        {
 35          "name": "openvpn",
 36          "config": "client\ndev tun\nproto tcp\nremote 123.41.54.1 443 tcp\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\ncomp-lzo\nverb 3\nauth-user-pass\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIE7jCCA9agAwIBAgIJAKCGoU4jOKP3MA0GCSqGSIb3DQEBBQUAMIGqMQswCQYD\nVQQGEwJVUzELMAkGA1UECBMCTUExEDAOBgNVBAcTB0JlZGZvcmQxGDAWBgNVBAoT\nD0ZveHlQcm94eSwgSW5jLjEQMA4GA1UECxMHb3BlbnZwbjESMBAGA1UEAxMJbG9j\nYWxob3N0MRIwEAYDVQQpEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFk\nbWluQGdldGZveHlwcm94eS5vcmcwHhcNMTgwMTE3MDYzOTM1WhcNMjgwMTE1MDYz\nOTM1WjCBqjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMRAwDgYDVQQHEwdCZWRm\nb3JkMRgwFgYDVQQKEw9Gb3h5UHJveHksIEluYy4xEDAOBgNVBAsTB29wZW52cG4x\nEjAQBgNVBAMTCWxvY2FsaG9zdDESMBAGA1UEKRMJRm94eVByb3h5MSgwJgYJKoZI\nhvcNAQkBFhlzc2xhZG1pbkBnZXRmb3h5cHJveHkub3JnMIIBIjANBgkqhkiG9w0B\nAQEFAAOCAQ8AMIIBCgKCAQEA7pPahdu5AX4iYFjgkjHFFKBdFC+j+VJ2BjcmpzfK\n4L0ahWfJRzw0GTH5mlgcj0b2vz0FhiHZZXEOF6qFtkBBycnHgep8EPjjqIzzbl28\nRuZ24DTmn/BokTPVBPIRd69JMg8W/Xt/DQYar4F0xpJkuWcHeJ39y3r68pxWrDqa\nwvmOv6WcMQHBj1rriHlA4KKqIRz279iOUWpU79HTCeM9l0NFUfuPMLPJuqacckak\n/GMad3ah9XL2vl63T3/O6PmGKkEz3L0W70XGeyXsFb8MEx6LSW3hyNC9S3Y3QKQQ\nqGNc+KBMwzl2sENE75gBDZzeIeaD1AlD2fycjyGx+tmvbwIDAQABo4IBEzCCAQ8w\nHQYDVR0OBBYEFCIs8LeB86HZFakNMWg7Dr4yg71pMIHfBgNVHSMEgdcwgdSAFCIs\n8LeB86HZFakNMWg7Dr4yg71poYGwpIGtMIGqMQswCQYDVQQGEwJVUzELMAkGA1UE\nCBMCTUExEDAOBgNVBAcTB0JlZGZvcmQxGDAWBgNVBAoTD0ZveHlQcm94eSwgSW5j\nLjEQMA4GA1UECxMHb3BlbnZwbjESMBAGA1UEAxMJbG9jYWxob3N0MRIwEAYDVQQp\nEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFkbWluQGdldGZveHlwcm94\neS5vcmeCCQCghqFOIzij9zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IB\nAQC7U0PwUsJmmNHhHbTUMlsLAkd5DMrkoX1hQ55nEuSQNxHO8n75bQmBjlO2KqHr\nOOh1B6JBfTDdE4p55qAu1qfi7e9y+8QvIIYQCdp3o0QG84pYLJ7ftSknKKOZcfjI\nSxdK7+2UdN9ch+oOFrke9R1W3twIzlep9uyxwlnA5UeJ5Ax51+8eqFuKYkx0iIvY\n6D3GWWqDu80Pkpz/D5s9CkwLnCdFJIaHU6rNkoLYkv4g65P2IJJbhoDXTXStWrIO\nuKQxEWTrcjaVDyfNEyfjM6/Y7J9qMAjvVREkwrI0MNR94v6Rve/nV5GH581Vs//8\nJQqDdoW4E669ZSlrNgZk4E8r\n-----END CERTIFICATE-----</ca>"
 37        },
 38        {
 39          "name": "pptp"
 40        },
 41        {
 42          "name": "http-proxy",
 43          "ports": [
 44            6502,
 45            13301
 46          ]
 47        },
 48        {
 49          "name": "ssl-proxy",
 50          "ports": [
 51            999,
 52            1121
 53          ]
 54        },
 55        {
 56          "name": "socks5-proxy",
 57          "ports": [
 58            1080,
 59            36
 60          ]
 61        }
 62      ]
 63    }
 64  },
 65  {
 66    "uid": "b1d4fa5c-f5bc-4dee-bb46-9f6ff69bf09c",
 67    "active": false, (1)
 68    "username": "johnConnor85",
 69    "node": {
 70      "active": true,
 71      "name": "test-node-it1", (2)
 72      "ipAddress": "89.22.109.41",
 73      "country": "Milan",
 74      "countryCode": "IT",
 75      "city": "Italy",
 76      "services": [ (3)
 77        {
 78          "name": "ipsec/ikev2/standard"
 79        },
 80        {
 81          "name": "ipsec/cisco"
 82        },
 83        {
 84          "name": "pptp"
 85        },
 86        {
 87          "name": "http-proxy",
 88          "ports": [
 89            8903,
 90            12951
 91          ]
 92        },
 93        {
 94          "name": "ssl-proxy",
 95          "ports": [
 96            43,
 97            266
 98          ]
 99        },
100        {
101          "name": "socks5-proxy",
102          "ports": [
103            515
104          ]
105        },
106        {
107          "name": "ipsec/lt2p"
108        },
109        {
110          "name": "openvpn",
111          "config": "client\ndev tun\nproto tcp\nremote 89.22.109.41 tcp\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\ncomp-lzo\nverb 3\nauth-user-pass\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIC/jCCAegCAQAwgYoxgYcwDQYDVQQDDAZkZmRzZmcwGwYJKoZIhvcNAQkBEw5k\nc2ZnZ0BzZGZhLmNvbTAKBgNVBAsTA3NhZDAKBgNVBAoTA2FzZDAOBgNVBAkTB3Nk\ndmNhc3YwDQYDVQQHEwZzZHZhc2MwCQYDVQQIEwJUWDAMBgNVBBETBTc3MDk4MAkG\nA1UEBhMCVVMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCi+KuwbmNk\nrlt9/mzpU3Wr+j/75rZJLEXj1LLacJ6dKmTick15pQiQ/neUsq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ERTIFICATE-----</ca>"
112        }
113      ]
114    }
115  }
116]
1 Notice the active flag is false because we created this account in the inactive state
2 This is the nodename. It can be combined with any of the DNS suffixes from GET /nodes/dns-suffixes/ to create a fully-qualified DNS name. But you can always use ipAddress to connect to the server (except for the ssl-proxy service which requires a DNS name). We suggest using ipAddress when possible because some countries/ISPs block DNS names.
3 An array of VPN/proxy services supported by these nodes. In this example, both nodes support all of the same services.

Get Accounts

GET /accounts/?index=xxx&size=yyy

Requires ROLE_USER or ROLE_RESELLER privileges.

Get at most size accounts beginning at the specified zero-based index. Maximum value for size is 100.

This endpoint can be called by customers or resellers. If the authenticated user is a reseller (ROLE_RESELLER), then all accounts are returned. If the authenticated user is a customer (ROLE_USER), then only accounts with the authenticated username are returned.

Accounts are sorted lexicographically by the node’s country name (account.node.country).

When called as ROLE_USER, this endpoint performs the same operation as Get Accounts By Username.
Get accounts as a customer
curl example
$ curl 'https://domain.com/accounts/?index=0&size=100' -i -X GET \ (1)
     --user johnConnor88:hunterkiller2 \ (2)
    -H 'X-DOMAIN: test-reseller-1' \ (3)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (4)
1 Minimum index is 0; max size is 100
2 Generates the HTTP Basic Authentication header. This can be either reseller credentials or a customers’s credentials. In this example, we use customers’s credentials.
3 Provided to you by FoxyProxy
4 There is no HTTP body

Since we sent customer credentials and not reseller’s credentials, only the accounts with username johnConnor88 are returned. There are two results in this example:

HTTP response
  1HTTP/1.1 200 OK
  2X-Content-Type-Options: nosniff
  3X-XSS-Protection: 1; mode=block
  4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
  5Pragma: no-cache
  6Expires: 0
  7X-Frame-Options: DENY
  8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
  9Transfer-Encoding: chunked
 10Content-Length: xxxx
 11
 12[
 13  {
 14    "uid": "6abbc07b-fd48-48d3-8250-01d9aebf22e9",
 15    "active": true,
 16    "username": "johnConnor88",
 17    "node": {
 18      "active": true,
 19      "name": "test-node-it1", (1)
 20      "ipAddress": "89.22.109.41",
 21      "country": "Milan",
 22      "countryCode": "IT",
 23      "city": "Italy",
 24      "services": [ (2)
 25        {
 26          "name": "ipsec/ikev2/standard"
 27        },
 28        {
 29          "name": "ipsec/cisco"
 30        },
 31        {
 32          "name": "ipsec/lt2p"
 33        },
 34        {
 35          "name": "openvpn",
 36          "config": "client\ndev tun\nproto tcp\nremote 89.22.109.41 tcp\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\ncomp-lzo\nverb 3\nauth-user-pass\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIC/jCCAegCAQAwgYoxgYcwDQYDVQQDDAZkZmRzZmcwGwYJKoZIhvcNAQkBEw5k\nc2ZnZ0BzZGZhLmNvbTAKBgNVBAsTA3NhZDAKBgNVBAoTA2FzZDAOBgNVBAkTB3Nk\ndmNhc3YwDQYDVQQHEwZzZHZhc2MwCQYDVQQIEwJUWDAMBgNVBBETBTc3MDk4MAkG\nA1UEBhMCVVMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCi+KuwbmNk\nrlt9/mzpU3Wr+j/75rZJLEXj1LLacJ6dKmTick15pQiQ/neUsqElc8lE4ziX0lsp\nJIVstL9xpjYm0KG5BWiKffuAjoLlZEz29kAxd4+WiSGUdZy/jcdF/n8pLocQmeTz\nUcYRiQA2yXa/eBDT4Zv3N/oheemv0KQNnI/RI0F0Xmq7QBZ+SwOwBBH6x6UgPSrl\nIPxJ1uqjHnYtDSh3UJv3783MgSTTUs3KujTgDe2rb6sQ/zUo+RYoY9NdgmNnww4y\nvMu+InWaTmT9HPZiIIYVz2+7n6QLgMkSiBXJ16Qd20FOqTVaz/+wBm60mWR5KNXD\naREDLEzXI0L7AgMBAAGgMDAuBgkqhkiG9w0BCQ4xITAfMB0GA1UdDgQWBBRLKS9Y\nJsHymtlmhQl988rFG2g+KzALBgkqhkiG9w0BAQsDggEBACeJm4OnGDOpSYRoG3NS\nyX4ehuK2PVnRIQGpuOrSCbZAmOMx85VgYZOG9bJyP+ejr01W4KEZdAvDEI8lKFsr\nztzpvWEmtDPijZJcJLONnDtQtw2cNgafi7ONWybi14oVskO+vAYe7nDfojpFkeKg\nEvRnTKsDCg4L2uZGL3Ko/rHiTD7e8kqn7zO/VqfaW+kDxBjy+3PCEppcnF4e5QWr\ncPCqZrOdLYvjzMtsj+QDZFkZElMHIcPUcM461cLuXo9pRegZ1zT/7QKAGmjBPg+z\nOSw30FqaXlrHqUK9Py2M/7eiN49cd7ije/+3HtBPslhYos/OaHyz/FY/iHz73ybm\nrVEHQYDVR0OBBYEFCIs8LeB86HZFakNMWg7Dr4yg71pMIHfBgNVHSMEgdcwgdSAFCIs\n8LeB86HZFakNMWg7Dr4yg71poYGwpIGtMIGqMQswCQYDVQQGEwJVUzELMAkGA1UE\nCBMCTUExEDAOBgNVBAcTB0JlZGZvcmQxGDAWBgNVBAoTD0ZveHlQcm94eSwgSW5j\nLjEQMA4GA1UECxMHb3BlbnZwbjESMBAGA1UEAxMJbG9jYWxob3N0MRIwEAYDVQQp\nEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFkbWluQGdldGZveHl\n-----END CERTIFICATE-----</ca>"
 37        },
 38        {
 39          "name": "pptp"
 40        },
 41        {
 42          "name": "http-proxy",
 43          "ports": [
 44            8903,
 45            12951
 46          ]
 47        },
 48        {
 49          "name": "ssl-proxy",
 50          "ports": [
 51            43,
 52            266
 53          ]
 54        },
 55        {
 56          "name": "socks5-proxy",
 57          "ports": [
 58            515
 59          ]
 60        }
 61      ]
 62    }
 63  },
 64  {
 65    "uid": "8aff01d1-ad18-41b0-b082-ff38f9f88030",
 66    "active": true,
 67    "username": "johnConnor88",
 68    "node": {
 69      "active": true,
 70      "name": "test-node-de1", (1)
 71      "ipAddress": "123.41.54.2",
 72      "country": "Germany",
 73      "countryCode": "DE",
 74      "city": "Berlin",
 75      "services": [ (2)
 76        {
 77          "name": "ipsec/ikev2/standard"
 78        },
 79        {
 80          "name": "ipsec/cisco"
 81        },
 82        {
 83          "name": "ipsec/lt2p"
 84        },
 85        {
 86          "name": "openvpn",
 87          "config": "client\ndev tun\nproto tcp\nremote 123.41.54.1 443 tcp\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\ncomp-lzo\nverb 3\nauth-user-pass\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIE7jCCA9agAwIBAgIJAKCGoU4jOKP3MA0GCSqGSIb3DQEBBQUAMIGqMQswCQYD\nVQQGEwJVUzELMAkGA1UECBMCTUExEDAOBgNVBAcTB0JlZGZvcmQxGDAWBgNVBAoT\nD0ZveHlQcm94eSwgSW5jLjEQMA4GA1UECxMHb3BlbnZwbjESMBAGA1UEAxMJbG9j\nYWxob3N0MRIwEAYDVQQpEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFk\nbWluQGdldGZveHlwcm94eS5vcmcwHhcNMTgwMTE3MDYzOTM1WhcNMjgwMTE1MDYz\nOTM1WjCBqjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMRAwDgYDVQQHEwdCZWRm\nb3JkMRgwFgYDVQQKEw9Gb3h5UHJveHksIEluYy4xEDAOBgNVBAsTB29wZW52cG4x\nEjAQBgNVBAMTCWxvY2FsaG9zdDESMBAGA1UEKRMJRm94eVByb3h5MSgwJgYJKoZI\nhvcNAQkBFhlzc2xhZG1pbkBnZXRmb3h5cHJveHkub3JnMIIBIjANBgkqhkiG9w0B\nAQEFAAOCAQ8AMIIBCgKCAQEA7pPahdu5AX4iYFjgkjHFFKBdFC+j+VJ2BjcmpzfK\n4L0ahWfJRzw0GTH5mlgcj0b2vz0FhiHZZXEOF6qFtkBBycnHgep8EPjjqIzzbl28\nRuZ24DTmn/BokTPVBPIRd69JMg8W/Xt/DQYar4F0xpJkuWcHeJ39y3r68pxWrDqa\nwvmOv6WcMQHBj1rriHlA4KKqIRz279iOUWpU79HTCeM9l0NFUfuPMLPJuqacckak\n/GMad3ah9XL2vl63T3/O6PmGKkEz3L0W70XGeyXsFb8MEx6LSW3hyNC9S3Y3QKQQ\nqGNc+KBMwzl2sENE75gBDZzeIeaD1AlD2fycjyGx+tmvbwIDAQABo4IBEzCCAQ8w\nHQYDVR0OBBYEFCIs8LeB86HZFakNMWg7Dr4yg71pMIHfBgNVHSMEgdcwgdSAFCIs\n8LeB86HZFakNMWg7Dr4yg71poYGwpIGtMIGqMQswCQYDVQQGEwJVUzELMAkGA1UE\nCBMCTUExEDAOBgNVBAcTB0JlZGZvcmQxGDAWBgNVBAoTD0ZveHlQcm94eSwgSW5j\nLjEQMA4GA1UECxMHb3BlbnZwbjESMBAGA1UEAxMJbG9jYWxob3N0MRIwEAYDVQQp\nEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFkbWluQGdldGZveHlwcm94\neS5vcmeCCQCghqFOIzij9zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IB\nAQC7U0PwUsJmmNHhHbTUMlsLAkd5DMrkoX1hQ55nEuSQNxHO8n75bQmBjlO2KqHr\nOOh1B6JBfTDdE4p55qAu1qfi7e9y+8QvIIYQCdp3o0QG84pYLJ7ftSknKKOZcfjI\nSxdK7+2UdN9ch+oOFrke9R1W3twIzlep9uyxwlnA5UeJ5Ax51+8eqFuKYkx0iIvY\n6D3GWWqDu80Pkpz/D5s9CkwLnCdFJIaHU6rNkoLYkv4g65P2IJJbhoDXTXStWrIO\nuKQxEWTrcjaVDyfNEyfjM6/Y7J9qMAjvVREkwrI0MNR94v6Rve/nV5GH581Vs//8\nJQqDdoW4E669ZSlrNgZk4E8r\n-----END CERTIFICATE-----</ca>"
 88        },
 89        {
 90          "name": "pptp"
 91        },
 92        {
 93          "name": "http-proxy",
 94          "ports": [
 95            6502,
 96            13301
 97          ]
 98        },
 99        {
100          "name": "ssl-proxy",
101          "ports": [
102            999,
103            1121
104          ]
105        },
106        {
107          "name": "socks5-proxy",
108          "ports": [
109            1080,
110            36
111          ]
112        }
113      ]
114    }
115  }
116]
1 This is the nodename. It can be combined with any of the DNS suffixes from GET /nodes/dns-suffixes/ to create a fully-qualified DNS name. But you can always use ipAddress to connect to the server (except for the ssl-proxy service which requires a DNS name). We suggest using ipAddress when possible because some countries/ISPs block DNS names.
2 An array of VPN/proxy services supported by these nodes. In this example, both nodes support all of the same services.
Get accounts as a reseller
curl example
$ curl 'https://domain.com/accounts/?index=0&size=100' -i -X GET \ (1)
     --user milesDyson:skynet101 \ (2)
    -H 'X-DOMAIN: test-reseller-1' \ (3)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (4)
1 Minimum index is 0; max size is 100
2 Generates the HTTP Basic Authentication header. This can be either reseller credentials or a customers’s credentials. In this example, we use a reseller’s credentials.
3 Provided to you by FoxyProxy
4 There is no HTTP body

Since we sent reseller credentials, accounts with all usernames are returned. Accounts are sorted ascending by account uid (account.uid).

Get Accounts By Username

GET /accounts/{username}/?index=xxx&size=yyy

Requires ROLE_USER or ROLE_RESELLER privileges.

Get accounts with the specified username. At most size accounts are returned, beginning at the specified zero-based index. Maximum value for size is 100.

This endpoint can be called by customers or resellers. If the authenticated user is a customer (ROLE_USER), then username in the URL must match username in the HTTP Basic Authentication header. The response is limited to that single username. If the authenticated user is a reseller (ROLE_RESELLER), then username in the URL is unrestricted. Accounts are sorted lexicographically by the node’s country name (account.node.country).

When called as ROLE_USER, this endpoint performs the same operation as Get Accounts.
Get accounts by username as a customer
curl example
$ curl 'https://domain.com/accounts/johnConnor88/?index=0&size=100' -i -X GET \ (1)
     --user johnConnor88:hunterkiller2 \ (2)
    -H 'X-DOMAIN: test-reseller-1' \ (3)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (4)
1 Minimum index is 0; max size is 100
2 Generates the HTTP Basic Authentication header. This can be either reseller credentials or a customers’s credentials. In this example, we use customers’s credentials and so the username specified in the HTTP Basic Authorization header must match the username in the URL
3 Provided to you by FoxyProxy
4 There is no HTTP body

Only the accounts with username johnConnor88 are returned. There are two results in this example:

HTTP response
  1HTTP/1.1 200 OK
  2X-Content-Type-Options: nosniff
  3X-XSS-Protection: 1; mode=block
  4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
  5Pragma: no-cache
  6Expires: 0
  7X-Frame-Options: DENY
  8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
  9Transfer-Encoding: chunked
 10Content-Length: xxxx
 11
 12[
 13  {
 14    "uid": "6abbc07b-fd48-48d3-8250-01d9aebf22e9",
 15    "active": true,
 16    "username": "johnConnor88",
 17    "node": {
 18      "active": true,
 19      "name": "test-node-it1", (1)
 20      "ipAddress": "89.22.109.41",
 21      "country": "Milan",
 22      "countryCode": "IT",
 23      "city": "Italy",
 24      "services": [ (2)
 25        {
 26          "name": "ipsec/ikev2/standard"
 27        },
 28        {
 29          "name": "ipsec/cisco"
 30        },
 31        {
 32          "name": "ipsec/lt2p"
 33        },
 34        {
 35          "name": "openvpn",
 36          "config": "client\ndev tun\nproto tcp\nremote 89.22.109.41 tcp\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\ncomp-lzo\nverb 3\nauth-user-pass\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIC/jCCAegCAQAwgYoxgYcwDQYDVQQDDAZkZmRzZmcwGwYJKoZIhvcNAQkBEw5k\nc2ZnZ0BzZGZhLmNvbTAKBgNVBAsTA3NhZDAKBgNVBAoTA2FzZDAOBgNVBAkTB3Nk\ndmNhc3YwDQYDVQQHEwZzZHZhc2MwCQYDVQQIEwJUWDAMBgNVBBETBTc3MDk4MAkG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ECxMHb3BlbnZwbjESMBAGA1UEAxMJbG9jYWxob3N0MRIwEAYDVQQp\nEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFkbWluQGdldGZveHl\n-----END CERTIFICATE-----</ca>"
 37        },
 38        {
 39          "name": "pptp"
 40        },
 41        {
 42          "name": "http-proxy",
 43          "ports": [
 44            8903,
 45            12951
 46          ]
 47        },
 48        {
 49          "name": "ssl-proxy",
 50          "ports": [
 51            43,
 52            266
 53          ]
 54        },
 55        {
 56          "name": "socks5-proxy",
 57          "ports": [
 58            515
 59          ]
 60        }
 61      ]
 62    }
 63  },
 64  {
 65    "uid": "8aff01d1-ad18-41b0-b082-ff38f9f88030",
 66    "active": true,
 67    "username": "johnConnor88",
 68    "node": {
 69      "active": true,
 70      "name": "test-node-de1", (1)
 71      "ipAddress": "123.41.54.2",
 72      "country": "Germany",
 73      "countryCode": "DE",
 74      "city": "Berlin",
 75      "services": [ (2)
 76        {
 77          "name": "ipsec/ikev2/standard"
 78        },
 79        {
 80          "name": "ipsec/cisco"
 81        },
 82        {
 83          "name": "ipsec/lt2p"
 84        },
 85        {
 86          "name": "openvpn",
 87          "config": "client\ndev tun\nproto tcp\nremote 123.41.54.1 443 tcp\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\ncomp-lzo\nverb 3\nauth-user-pass\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIE7jCCA9agAwIBAgIJAKCGoU4jOKP3MA0GCSqGSIb3DQEBBQUAMIGqMQswCQYD\nVQQGEwJVUzELMAkGA1UECBMCTUExEDAOBgNVBAcTB0JlZGZvcmQxGDAWBgNVBAoT\nD0ZveHlQcm94eSwgSW5jLjEQMA4GA1UECxMHb3BlbnZwbjESMBAGA1UEAxMJbG9j\nYWxob3N0MRIwEAYDVQQpEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFk\nbWluQGdldGZveHlwcm94eS5vcmcwHhcNMTgwMTE3MDYzOTM1WhcNMjgwMTE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sJmmNHhHbTUMlsLAkd5DMrkoX1hQ55nEuSQNxHO8n75bQmBjlO2KqHr\nOOh1B6JBfTDdE4p55qAu1qfi7e9y+8QvIIYQCdp3o0QG84pYLJ7ftSknKKOZcfjI\nSxdK7+2UdN9ch+oOFrke9R1W3twIzlep9uyxwlnA5UeJ5Ax51+8eqFuKYkx0iIvY\n6D3GWWqDu80Pkpz/D5s9CkwLnCdFJIaHU6rNkoLYkv4g65P2IJJbhoDXTXStWrIO\nuKQxEWTrcjaVDyfNEyfjM6/Y7J9qMAjvVREkwrI0MNR94v6Rve/nV5GH581Vs//8\nJQqDdoW4E669ZSlrNgZk4E8r\n-----END CERTIFICATE-----</ca>"
 88        },
 89        {
 90          "name": "pptp"
 91        },
 92        {
 93          "name": "http-proxy",
 94          "ports": [
 95            6502,
 96            13301
 97          ]
 98        },
 99        {
100          "name": "ssl-proxy",
101          "ports": [
102            999,
103            1121
104          ]
105        },
106        {
107          "name": "socks5-proxy",
108          "ports": [
109            1080,
110            36
111          ]
112        }
113      ]
114    }
115  }
116]
1 This is the nodename. It can be combined with any of the DNS suffixes from GET /nodes/dns-suffixes/ to create a fully-qualified DNS name. But you can always use ipAddress to connect to the server (except for the ssl-proxy service which requires a DNS name). We suggest using ipAddress when possible because some countries/ISPs block DNS names.
2 An array of VPN/proxy services supported by these nodes. In this example, both nodes support all of the same services.
Get accounts by username as a reseller
curl example
$ curl 'https://domain.com/accounts/kyleReese/?index=0&size=100' -i -X GET \ (1)
     --user milesDyson:skynet101 \ (2)
    -H 'X-DOMAIN: test-reseller-1' \ (3)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (4)
1 Minimum index is 0; max size is 100
2 Generates the HTTP Basic Authentication header. This can be either reseller credentials or a customers’s credentials. In this example, we use a reseller’s credentials. The username in the URL can be any username
3 Provided to you by FoxyProxy
4 There is no HTTP body

We authenticated as the reseller. All accounts with the username kyleReese are returned.

Get Accounts By Node

GET /nodes/{nodeName}/accounts/?index=xxx&size=yyy

Requires ROLE_RESELLER privileges.

Gets all accounts for the specified nodeName. At most size accounts are returned, beginning at the specified zero-based index. Maximum value for size is 100. No node infomration is returned. Use another endpoint to retrieve that.

Future releases will likely include traffic and last used information, such as that provided in Node Traffic By Account.

This endpoint can only be called by resellers.

curl example
$ curl 'https://domain.com/nodes/test-node-it1/accounts/?index=0&size=100' -i -X GET \ (1)
     --user johnConnor88:hunterkiller2 \ (2)
    -H 'X-DOMAIN: test-reseller-1' \ (3)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (4)
1 The node test-node-it1 is specified. Minimum index is 0; max size is 100.
2 Generates the HTTP Basic Authentication header. This can only be the reseller credentials.
3 Provided to you by FoxyProxy
4 There is no HTTP body
HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12[
13  {
14    "uid": "6abbc07b-fd48-48d3-8250-01d9aebf22e9",
15    "active": true,
16    "username": "johnConnor88"
17  },
18  {
19    "uid": "d014ca66-97bf-4576-b029-b80c522219b3",
20    "active": false,
21    "username": "sarahConnor2"
22  },
23  {
24    "uid": "8aff01d1-ad18-41b0-b082-ff38f9f88030",
25    "active": true,
26    "username": "kylereese89"
27  }
28]

Count Accounts

GET /accounts/count/

Requires ROLE_RESELLER privileges.

Gets the total count of accounts. This count includes duplicate usernames. For example, if the reseller has 40 nodes and 100,000 of the same usernames on each node, this method returns 4,000,000, not 100,000.

curl example
$ curl 'https://domain.com/accounts/count/' -i -X GET \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (3)
1 Generates the HTTP Basic Authentication header. This must be the reseller’s credentials.
2 Provided to you by FoxyProxy
3 There is no HTTP body
HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{"count": 4000000}

Username Exists

GET /accounts/exists/{username}

Requires ROLE_RESELLER privileges.

Returns HTTP status 200 if the specified username exists on any node in your reseller pool. HTTP status 404 is returned if the specified username does not exist on any node in your reseller pool

curl example
$ curl 'https://domain.com/accounts/exists/kyleReese/' -i -X GET \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (3)
1 Generates the HTTP Basic Authentication header. This must be the reseller’s credentials.
2 Provided to you by FoxyProxy
3 There is no HTTP request body

The following response indicates the username does not exist on any nodes in your reseller pool:

HTTP response
 1HTTP/1.1 404 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10(1)
1 There is no HTTP response body

Deactivate Accounts

PATCH /accounts/deactivate/{username}

Requires ROLE_RESELLER privilege.

Deactivates accounts on one or more nodes and returns a count of affected accounts. If nodeNames array in the optional JSON HTTP request body is missing or length of the array is 0, then accounts with the specified username are deactivated on all nodes in your reseller pool. An optional comment can be specified in the JSON HTTP request body. Comments are arbitrary strings that you can use for notes about accounts. This comment, if specified, is stored in the account’s history, accessed from the GET /accounts/history/{username} operation (not yet available). Each comment is limited to 512 characters.

A count of the number of affected accounts is returned.

You should confirm the returned count is what you expect. A count lower than expected indicates an internal error and that not all accounts could be updated.

The HTTP PATCH verb is used to signify this is partial update to one or more records (accounts), even though specifications like JSON Patch are not followed by this API.

This call only affects new connections to nodes. Accounts that are already connected to a node are not disconnected by this call. In other words, if an account has an active connection to a node, it will remain active an and functional until the connection drops. New connections will fail. Therefore, for long-lived VPN connections, after this call completes, the account may remain active and functional longer than you intend. Proxy connections are generally shorter-lived, except when streaming, but the same limitation applies to proxy and VPN connections alike.
Deactivate accounts with username johnConnor85 on all nodes
curl example
$ curl 'https://domain.com/accounts/deactivate/johnConnor85/' -i -X PATCH \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    --data '{"comment": "user abused system, see ticket #9883201}' (3)
1 Generates the HTTP Basic Authentication header. This must be the reseller’s credentials.
2 Provided to you by FoxyProxy
3 The entire body is optional but this example specifies a comment property. The comment is associated with this account action (deactivate), not the account itself, and is retrieved with GET /accounts/history/{username} (not yet available). The lack of a nodeNames property indicates that accounts with this username on all nodes in the reseller pool should be deactivated, not a subset of all accounts.
HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{"count": 3}
If you retrieve the accounts after deactivation, the active flag for those accounts is true.
Deactivate accounts with username johnConnor85 on only two nodes

By specifying an array of nodeNames, you can choose to deactivate accounts on selected nodes instead of all nodes.

curl example
$ curl 'https://domain.com/accounts/deactivate/johnConnor85/' -i -X PATCH \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    --data '{"nodeNames": ["testnode-nl01", "testnode-uk01"]}' (3)
1 Generates the HTTP Basic Authentication header. This must be the reseller’s credentials.
2 Provided to you by FoxyProxy
3 JSON HTTP request body specifying the nodes on which to deactivate. The optional comment property is omitted.

Two accounts are deactivated:

HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{"count": 2}

Activate Accounts

PATCH /accounts/activate/{username}

Requires ROLE_RESELLER privilege.

Activates accounts on one or more nodes and returns a count of affected accounts. If nodeNames array in the optional JSON HTTP request body is missing or length of the array is 0, then accounts with the specified username are activated on all nodes in your reseller pool. An optional comment can be specified in the JSON HTTP request body. Comments are arbitrary strings that you can use for notes about accounts. This comment, if specified, is stored in the account’s history, accessed from the GET /accounts/history/{username} operation (not yet available). Each comment is limited to 512 characters.

A count of the number of affected accounts is returned.

You should confirm the returned count is what you expect. A count lower than expected indicates an internal error and that not all accounts could be updated.

The HTTP PATCH verb is used to signify this is partial update to one or more records (accounts), even though specifications like JSON Patch are not followed by this API.

Activate accounts with username johnConnor85 on all nodes
curl example
$ curl 'https://domain.com/accounts/activate/johnConnor85/' -i -X PATCH \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    --data '{"comment": "user paid again, see ticket #7883201}' (3)
1 Generates the HTTP Basic Authentication header. This must be the reseller’s credentials.
2 Provided to you by FoxyProxy
3 The entire body is optional but this example specifies a comment property. The comment is associated with this account action (activate), not the account itself, and is retrieved with GET /accounts/history/{username} (not yet available). The lack of a nodeNames property indicates that accounts with this username on all nodes in the reseller pool should be activated, not a subset of all accounts.
HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{"count": 3}
If you retrieve the accounts after activation, the active flag for those accounts is true.
Activate accounts with username johnConnor85 on only two nodes

By specifying an array of nodeNames, you can choose to activate accounts on selected nodes instead of all nodes.

curl example
$ curl 'https://domain.com/accounts/activate/johnConnor85/' -i -X PATCH \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    --data '{"nodeNames": ["test-node-de1", "test-node-it1"]}' (3)
1 Generates the HTTP Basic Authentication header. This must be the reseller’s credentials.
2 Provided to you by FoxyProxy
3 JSON HTTP request body specifying the nodes on which to activate. The optional comment property is omitted.

Two accounts are activated:

HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{"count": 2}

Update Passwords

PATCH /accounts/update-password/{username}

Requires ROLE_USER or ROLE_RESELLER privilege.

Updates the password on one or more nodes and returns a count of affected accounts. If the nodeNames array in the optional JSON HTTP request body is missing or length of the array is 0, then passwords for all accounts with the specified username on all nodes in your reseller pool are updated. An optional comment can be specified in the JSON HTTP request body. Comments are arbitrary strings that you can use for notes about accounts. This comment, if specified, is stored in the account’s history, accessed from the GET /accounts/history/{username} operation (not yet available). Each comment is limited to 512 characters.

A count of the number of affected accounts is returned.

You should confirm the returned count is what you expect. A count lower than expected indicates an internal error and that not accounts could be updated.

The password should be unencrypted. It is stored using salted, SHA-512 one-way encryption with multiple passes. For this reason, the password is unrecoverable. Passwords must be between 3 and 127 characters, inclusive. Passwords are sent in the JSON HTTP request body, not the URL, so that passwords aren’t accidentally logged or stored in browser history. This purposely breaks the pattern of the rest of this API.

This endpoint can be called by customers or resellers. If the authenticated user is a reseller (ROLE_RESELLER), then username in the URL is unrestricted. If the authenticated user is a customer (ROLE_USER), then only accounts with the authenticated username can be updated.

The HTTP PATCH verb is used to signify this is partial update to one or more records (accounts), even though specifications like JSON Patch are not followed by this API.

Update password for accounts with username johnConnor88 on all nodes
curl example
$ curl 'https://domain.com/accounts/update-password/johnConnor88' -i -X PATCH \
     --user johnConnor88:hunterkiller2 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    --data '{"password": "ill2Be3Back4", "comment": "app forced password change after 90 days"}' (3)
1 Generates the HTTP Basic Authentication header. This can be either reseller credentials or a customers’s credentials. In this example, we use customers’s credentials and so the username specified in the HTTP Basic Authorization header must match the username in the URL. The password is the current, unchanged password.
2 Provided to you by FoxyProxy
3 The new password is provided in a JSON HTTP request body. The optional comment is associated with this account action (update-password), not the account itself, and is retrieved with GET /accounts/history/{username} (not yet available). The lack of a nodeNames property indicates that accounts with this username on all nodes in the reseller pool should be updated, not a subset of all accounts.
HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{"count": 5}
Update password for accounts with username johnConnor88 only two nodes

By specifying an array of nodeNames, you can choose a subset of accounts to be updated:

curl example
$ curl 'https://domain.com/accounts/update-password/johnConnor88' -i -X PATCH \
     --user johnConnor88:hunterkiller2 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    --data '{"password": "ill2Be3Back4", "nodeNames": ["testnode-nl01", "testnode-uk01"]}' (3)
1 Generates the HTTP Basic Authentication header. This can be either reseller credentials or a customers’s credentials. In this example, we use customers’s credentials and so the username specified in the HTTP Basic Authorization header must match the username in the URL. The password is the current, unchanged password.
2 Provided to you by FoxyProxy
3 The new password is provided in a JSON HTTP request body. The JSON also includes a nodeNames array specifying only accounts on certain nodes to be updated. No optional comment is specified.

Two accounts are affected:

HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{"count": 2}

Delete Accounts

DELETE /accounts/{username}

Requires ROLE_RESELLER privilege.

Deletes accounts and, optionally, account history on one or more nodes and returns a count of affected accounts. If nodeNames array in the optional JSON HTTP request body is missing or length of the array is 0, then accounts with the specified username are deleted on all nodes in your reseller pool. If "includeHistory": true is included in the optional JSON HTTP request body, all account history entries are also deleted. If not specified or false, then account history is not deleted.

An optional comment can be specified in the JSON HTTP request body. Comments are arbitrary strings that you can use for notes about accounts. This comment, if specified, is stored in the account’s history, accessed from the GET /accounts/history/{username} operation (not yet available). Each comment is limited to 512 characters. If both "includeHistory": true and comment are specified, then comment is ignored and all history with comments are permanently deleted.

A count of the number of affected accounts is returned.

You should confirm the returned count is what you expect. A count lower than expected indicates an internal error and that not accounts could be deleted.
All information about deleted accounts are permanently and unrecoverably purged from our systems when you use this endpoint.
We discourage you from deleting accounts. Instead, consider deactivating them. This way, (1) you will have an accurate count of total accounts over time. (2) Deleting accounts means you have no record of bandwidth consumed by the deleted accounts. If a particular user is abusing your nodes, you may want to keep the records for that by not deleting accounts. We do not store anything about accounts except bandwidth use, username, and encrypted password.
Delete accounts with username johnConnor85 on all nodes
curl example
$ curl 'https://domain.com/accounts/johnConnor85/' -i -X DELETE \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    --data '{"includeHistory": true}' (3)
1 Generates the HTTP Basic Authentication header. This must be the reseller’s credentials.
2 Provided to you by FoxyProxy
3 There is no nodeNames array. This indicates accounts with this username on all nodes in the reseller pool should be deleted, not a subset of all accounts. Account history is also deleted.

Two accounts are deleted:

HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{"count": 2}
Delete accounts with username johnConnor85 on only one node

By specifying an array of nodeNames, you can choose to delete accounts on selected nodes instead of all nodes.

curl example
$ curl 'https://domain.com/accounts/johnConnor85/' -i -X DELETE \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    --data '{"nodeNames": ["testnode-nl01"], "comment": "account created in error"}' (3)
1 Generates the HTTP Basic Authentication header. This must be the reseller’s credentials.
2 Provided to you by FoxyProxy
3 JSON HTTP request body specifying the nodes on which to delete. A comment is stored in the account history. Account history is not deleted since includeHistory is omitted.

One account is deleted:

HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{"count": 2}

Copy Accounts From One Node to Others

POST /copy-all/{sourceNodeName}

Requires ROLE_RESELLER privilege.

Copies all accounts on sourceNodeName to one or more other nodes. The nodeNames array in the required JSON HTTP request body must contain at least one node. A count of the number of copied accounts is returned.

You should confirm the returned count is what you expect. A count lower than expected indicates an internal error and that not all accounts could be copied.

If accounts are created or changed on the source node during before the copy operation completes, those creations/changes are ignored. They are not reflected to the copied accounts.

Example
curl example
$ curl 'https://domain.com/accounts/copy-all/test-node-de1/' -i -X POST \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
     --data '{"nodeNames": ["test-node-it1"]}' (3)
1 Generates the HTTP Basic Authentication header. This must be the reseller’s credentials.
2 Provided to you by FoxyProxy
3 JSON HTTP request body specifying the destination node(s) to which accounts from test-node-de1 will be copied
HTTP response
 1HTTP/1.1 201 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{"count": 8932}

Nodes

A node represents a device on which a VPN server and/or proxy server is running. This section describes the endpoints and verbs used to read information about the nodes in your reseller pool. There are no write operations for nodes.

Example Node

{
    "active": true,
    "name": "test-node-it1", (1)
    "ipAddress": "209.141.40.200",
    "country": "Milan",
    "countryCode": "IT",
    "city": "Italy",
    "services": [
      {
        "name": "ipsec/ikev2/standard"
      },
      {
        "name": "openvpn",
        "config": "client\ndev tun\nproto tcp\nremote 185.229.190.85 443 tcp\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\ncomp-lzo\nverb 3\nauth-user-pass\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIE7jCCA9agAwIBAgIJAKCGoU4jOKP3MA0GCSqGSIb3DQEBBQUAMIGqMQswCQYD\nVQQGEwJVUzELMAkGA1UECBMCTUExEDAOBgNVBAcTB0JlZGZvcmQxGDAWBgNVBAoT\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xMHb3BlbnZwbjESMBAGA1UEAxMJbG9jYWxob3N0MRIwEAYDVQQp\nEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFkbWluQGdldGZveHlwcm94\neS5vcmeCCQCghqFOIzij9zAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IB\nAQC7U0PwUsJmmNHhHbTUMlsLAkd5DMrkoX1hQ55nEuSQNxHO8n75bQmBjlO2KqHr\nOOh1B6JBfTDdE4p55qAu1qfi7e9y+8QvIIYQCdp3o0QG84pYLJ7ftSknKKOZcfjI\nSxdK7+2UdN9ch+oOFrke9R1W3twIzlep9uyxwlnA5UeJ5Ax51+8eqFuKYkx0iIvY\n6D3GWWqDu80Pkpz/D5s9CkwLnCdFJIaHU6rNkoLYkv4g65P2IJJbhoDXTXStWrIO\nuKQxEWTrcjaVDyfNEyfjM6/Y7J9qMAjvVREkwrI0MNR94v6Rve/nV5GH581Vs//8\nJQqDdoW4E669ZSlrNgZk4E8r\n-----END CERTIFICATE-----</ca>"
      },
      {
        "name": "http-proxy",
        "ports": [
          1543,
          23411
        ]
      },
      {
        "name": "ssl-proxy",
        "ports": [
          53235
        ]
      },
      {
        "name": "socks5-proxy",
        "ports": [
          86
        ]
      }
    ]
}
1 This is the nodename. It can be combined with any of the DNS suffixes from GET /nodes/dns-suffixes/ to create a fully-qualified DNS name. But you can always use ipAddress to connect to the server (except for the ssl-proxy service which requires a DNS name). If you do not offer ssl-proxy service to your customesr, do not worry about this.

Active and Inactive

Nodes can be active or inactive. They will typically always be active. Currently, an inactive node does not mean the node is down or out-of-service. This flag is reserved for future use.

Get DNS Suffixes

GET /nodes/dns-suffixes/

Requires ROLE_RESELLER privileges.

Gets an array of DNS suffixes that can be appended to nodeNames in order to build a fully-qualified DNS name (FQDN). Nodes can be reached by their ipAddress or by FQDN DNS name (although ssl-proxy requires use of DNS name because certificates are signed against domain names, not IP addresses). We suggest using ipAddress when possible because some countries/ISPs block DNS names.

Resellers can request DNS name to be added to this list, in order to completely whitelist nodes.
curl example
$ curl 'https://domain.com/nodes/dns-suffixes/' -i -X GET \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (3)
1 Generates the HTTP Basic Authentication header. This can only be the reseller credentials.
2 Provided to you by FoxyProxy
3 There is no HTTP body
HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12[".somecompany.com", ".getfoxyproxy.org", ".foxyproxy.com"]

Get All Nodes

GET /nodes/?index=xxx&size=yyy

Requires ROLE_RESELLER privileges.

Gets at most size nodes in the reseller pool, beginning at the specified zero-based index. Maximum value for size is 100. Nodes are sorted lexicographically by name.

The node can be reached by its ipAddress or by fully-qualified DNS name. Fully-qualified DNS names are calculated by concatenating nodeName with one of the values returned by from GET /nodes/dnsSuffixes/ (although ssl-proxy requires use of DNS name because certificates are signed against domain names, not IP addresses). We suggest using ipAddress when possible because some countries/ISPs block DNS names.

For brevity, this example only includes two nodes. Most resellers will have many more than that.
curl example
$ curl 'https://domain.com/nodes/?index=0&size=100' -i -X GET \ (1)
     --user milesDyson:skynet101 \ (2)
    -H 'X-DOMAIN: test-reseller-1' \ (3)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (4)
1 Minimum index is 0; max size is 100
2 Generates the HTTP Basic Authentication header. This can only be the reseller credentials.
3 Provided to you by FoxyProxy
4 There is no HTTP body
HTTP response
  1HTTP/1.1 200 OK
  2X-Content-Type-Options: nosniff
  3X-XSS-Protection: 1; mode=block
  4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
  5Pragma: no-cache
  6Expires: 0
  7X-Frame-Options: DENY
  8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
  9Transfer-Encoding: chunked
 10Content-Length: xxxx
 11
 12[
 13  {
 14    "active": true,
 15    "name": "test-node-de1", (1)
 16    "ipAddress": "123.41.54.2",
 17    "country": "Germany",
 18    "countryCode": "DE",
 19    "city": "Berlin",
 20    "services": [ (2)
 21      {
 22        "name": "ipsec/ikev2/standard"
 23      },
 24      {
 25        "name": "ipsec/cisco"
 26      },
 27      {
 28        "name": "ipsec/lt2p"
 29      },
 30      {
 31        "name": "openvpn",
 32        "config": "client\ndev tun\nproto tcp\nremote 123.41.54.1 443 tcp\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\ncomp-lzo\nverb 3\nauth-user-pass\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIE7jCCA9agAwIBAgIJAKCGoU4jOKP3MA0GCSqGSIb3DQEBBQUAMIGqMQswCQYD\nVQQGEwJVUzELMAkGA1UECBMCTUExEDAOBgNVBAcTB0JlZGZvcmQxGDAWBgNVBAoT\nD0ZveHlQcm94eSwgSW5jLjEQMA4GA1UECxMHb3BlbnZwbjESMBAGA1UEAxMJbG9j\nYWxob3N0MRIwEAYDVQQpEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFk\nbWluQGdldGZveHlwcm94eS5vcmcwHhcNMTgwMTE3MDYzOTM1WhcNMjgwMTE1MDYz\nOTM1WjCBqjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMRAwDgYDVQQHEwdCZWRm\nb3JkMRgwFgYDVQQKEw9Gb3h5UHJveHksIEluYy4xEDAOBgNVBAsTB29wZW52cG4x\nEjAQBgNVBAMTC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lep9uyxwlnA5UeJ5Ax51+8eqFuKYkx0iIvY\n6D3GWWqDu80Pkpz/D5s9CkwLnCdFJIaHU6rNkoLYkv4g65P2IJJbhoDXTXStWrIO\nuKQxEWTrcjaVDyfNEyfjM6/Y7J9qMAjvVREkwrI0MNR94v6Rve/nV5GH581Vs//8\nJQqDdoW4E669ZSlrNgZk4E8r\n-----END CERTIFICATE-----</ca>"
 33      },
 34      {
 35        "name": "pptp"
 36      },
 37      {
 38        "name": "http-proxy",
 39        "ports": [
 40          6502,
 41          13301
 42        ]
 43      },
 44      {
 45        "name": "ssl-proxy",
 46        "ports": [
 47          999,
 48          1121
 49        ]
 50      },
 51      {
 52        "name": "socks5-proxy",
 53        "ports": [
 54          1080,
 55          36
 56        ]
 57      }
 58    ]
 59  },
 60  {
 61    "active": true,
 62    "name": "test-node-it1", (1)
 63    "ipAddress": "89.22.109.41",
 64    "country": "Milan",
 65    "countryCode": "IT",
 66    "city": "Italy",
 67    "services": [ (2)
 68      {
 69        "name": "ipsec/ikev2/standard"
 70      },
 71      {
 72        "name": "ipsec/cisco"
 73      },
 74      {
 75        "name": "ipsec/lt2p"
 76      },
 77      {
 78        "name": "openvpn",
 79        "config": "client\ndev tun\nproto tcp\nremote 89.22.109.41 tcp\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\ncomp-lzo\nverb 3\nauth-user-pass\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIC/jCCAegCAQAwgYoxgYcwDQYDVQQDDAZkZmRzZmcwGwYJKoZIhvcNAQkBEw5k\nc2ZnZ0BzZGZhLmNvbTAKBgNVBAsTA3NhZDAKBgNVBAoTA2FzZDAOBgNVBAkTB3Nk\ndmNhc3YwDQYDVQQHEwZzZHZhc2MwCQYDVQQIEwJUWDAMBgNVBBETBTc3MDk4MAkG\nA1UEBhMCVVMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCi+KuwbmNk\nrlt9/mzpU3Wr+j/75rZJLEXj1LLacJ6dKm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dldGZveHl\n-----END CERTIFICATE-----</ca>"
 80      },
 81      {
 82        "name": "pptp"
 83      },
 84      {
 85        "name": "http-proxy",
 86        "ports": [
 87          8903,
 88          12951
 89        ]
 90      },
 91      {
 92        "name": "ssl-proxy",
 93        "ports": [
 94          43,
 95          266
 96        ]
 97      },
 98      {
 99        "name": "socks5-proxy",
100        "ports": [
101          515
102        ]
103      }
104    ]
105  }
106]
1 This is the nodename. It can be combined with any of the DNS suffixes from GET /nodes/dns-suffixes/ to create a fully-qualified DNS name. But you can always use ipAddress to connect to the server (except for the ssl-proxy service which requires a DNS name). We suggest using ipAddress when possible because some countries/ISPs block DNS names.
2 An array of VPN/proxy services supported by these nodes. In this example, both nodes support all of the same services.

Get Node By Name

GET /nodes/{nodeName}

Requires ROLE_RESELLER privileges.

Get the node with the specified nodeName in the reseller pool.

do not use a DNS name for nodeName. For example, if you want to GET testnode-nl01, do not use testnode-nl01.getfoxyproxy.org, testnode-nl01.foxyproxy.com, etc.

The node can be reached by its ipAddress or by fully-qualified DNS name. Fully-qualified DNS names are calculated by concatenating nodeName with one of the values returned by from GET /nodes/dnsSuffixes/ (although ssl-proxy requires use of DNS name because certificates are signed against domain names, not IP addresses). We suggest using ipAddress when possible because some countries/ISPs block DNS names.

curl example
$ curl 'https://domain.com/nodes/testnode-nl01/' -i -X GET \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (3)
1 Generates the HTTP Basic Authentication header. This can only be the reseller credentials.
2 Provided to you by FoxyProxy
3 There is no HTTP body
HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{
13  "active": true,
14  "name": "test-node-de1", (1)
15  "ipAddress": "123.41.54.2",
16  "country": "Germany",
17  "countryCode": "DE",
18  "city": "Berlin",
19  "services": [ (2)
20    {
21      "name": "ipsec/ikev2/standard"
22    },
23    {
24      "name": "ipsec/cisco"
25    },
26    {
27      "name": "ipsec/lt2p"
28    },
29    {
30      "name": "openvpn",
31      "config": "client\ndev tun\nproto tcp\nremote 123.41.54.1 443 tcp\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\ncomp-lzo\nverb 3\nauth-user-pass\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIE7jCCA9agAwIBAgIJAKCGoU4jOKP3MA0GCSqGSIb3DQEBBQUAMIGqMQswCQYD\nVQQGEwJVUzELMAkGA1UECBMCTUExEDAOBgNVBAcTB0JlZGZvcmQxGDAWBgNVBAoT\nD0ZveHlQcm94eSwgSW5jLjEQMA4GA1UECxMHb3BlbnZwbjESMBAGA1UEAxMJbG9j\nYWxob3N0MRIwEAYDVQQpEwlGb3h5UHJveHkxKDAmBgkqhkiG9w0BCQEWGXNzbGFk\nbWluQGdldGZveHlwcm94eS5vcmcwHhcNMTgwMTE3MDYzOTM1WhcNMjgwMTE1MDYz\nOTM1WjCBqjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1BMRAwDgYDVQQHEwdCZWRm\nb3JkMRgwFgYDVQQKEw9Gb3h5UHJveHksIEluYy4xEDAOBgNVBAsTB29wZW52cG4x\nEjAQBgNVBAMTCWxvY2FsaG9zdDESMBAGA1UEKRMJRm94eVByb3h5MSgwJgYJKoZI\nhvcNAQkBFhlzc2xhZG1pbkBnZXRmb3h5cHJveHkub3JnMIIBIjANBgkqhkiG9w0B\nAQEFAAOCAQ8AMIIBCgKCAQEA7pPahdu5AX4iYFjgkjHFFKBdFC+j+VJ2BjcmpzfK\n4L0ahWf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\n-----END CERTIFICATE-----</ca>"
32    },
33    {
34      "name": "pptp"
35    },
36    {
37      "name": "http-proxy",
38      "ports": [
39        6502,
40        13301
41      ]
42    },
43    {
44      "name": "ssl-proxy",
45      "ports": [
46        999,
47        1121
48      ]
49    },
50    {
51      "name": "socks5-proxy",
52      "ports": [
53        1080,
54        36
55      ]
56    }
57  ]
58}
1 This is the nodename. It can be combined with any of the DNS suffixes from GET /nodes/dns-suffixes/ to create a fully-qualified DNS name. But you can always use ipAddress to connect to the server (except for the ssl-proxy service which requires a DNS name). We suggest using ipAddress when possible because some countries/ISPs block DNS names.
2 An array of VPN/proxy services supported by these nodes. In this example, both nodes support all of the same services.

Get Node Count

GET /nodes/count/

Requires ROLE_RESELLER privileges.

Gets the total number of nodes in the reseller pool.

curl example
$ curl 'https://domain.com/nodes/count/' -i -X GET \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (3)
1 Generates the HTTP Basic Authentication header. This can only be the reseller credentials.
2 Provided to you by FoxyProxy
3 There is no HTTP body
HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{"count": 3}

Node Traffic Totals

GET /nodes/{nodeName}/traffic/{startTime}/{endTime}/

Requires ROLE_RESELLER privileges.

Gets various traffic counts for the specified node between two timestamps, inclusive. startTime and endTime are epoch times in seconds, not milliseconds. The JSON object in the response has these keys:

  • trafficUp: the total amount of bandwidth sent from all clients to the node, in bytes, during the specified time range

  • trafficDown: the total amount of bandwidth sent from the node to all clients, in bytes during the specified time range

  • trafficAll: the sum of up and down

  • quota: the maximum amount of bandwidth per month contracted for this server, in bytes. If sum exceeds quota, the server may be shutdown or throttled, depending on contractual agreements. 0 or -1 means no quota ; i.e. the node has unlimited bandwidth.

Values are typically updated every 10 minutes but may be delayed up to 30 minutes. Values may be in scientific notation but this is subject to change. Do not rely on the value being in scientific notation form.

Traffic from deleted accounts is not included in traffic totals. So the all value is inaccurate if an account sent/received traffic to the specified node during the specified time range, but then was subsequently deleted. This has important implications on quota because node traffic may exceed quota even though all is smaller than quota. Therefore, as mentioned elsewhere in these API docs, we recommend you do not delete accounts. Deactivate them instead.
curl example
$ curl 'https://domain.com/nodes/testnode-nl01/traffic/1556668800/1559347199/' -i -X GET \ (1)
     --user milesDyson:skynet101 \ (2)
    -H 'X-DOMAIN: test-reseller-1' \ (3)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (4)
1 The time stamp 1556668800 is 1 May 2019 12:00:00 GMT and 1559347199 is 31 May 2019 11:59:59 PM GMT.
2 Generates the HTTP Basic Authentication header. This can only be the reseller credentials.
3 Provided to you by FoxyProxy
4 There is no HTTP body
HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{"trafficAll":1.903529416E9, "trafficDown":1.8443741E7, "trafficUp":2.2557639E7, "quota":1e+12}

Node Traffic By Account

GET /nodes/{nodeName}/traffic-by-account/{startTime}/{endTime}/

Requires ROLE_RESELLER privileges.

Gets various traffic counts and last authentication info for all accounts on the specified node between two timestamps, inclusive. startTime and endTime are epoch times in seconds, not milliseconds. The JSON object in the response has these keys:

  • trafficUp: the total amount of bandwidth sent from all clients to the node, in bytes, during the specified time range

  • trafficDown: the total amount of bandwidth sent from the node to all clients, in bytes during the specified time range

  • trafficAll: the sum of up and down

Values are typically updated every 10 minutes but may be delayed up to 30 minutes.

Traffic from deleted accounts is not included in traffic totals. So the all value is inaccurate if an account sent/received traffic to the specified node during the specified time range, but then was subsequently deleted. This has important implications on quota because node traffic may exceed quota even though all is smaller than quota. Therefore, as mentioned elsewhere in these API docs, we recommend you do not delete accounts. Deactivate them instead.
curl example
$ curl 'https://domain.com/nodes/testnode-nl01/traffic-by-account/1556668800/1559347199/' -i -X GET \ (1)
     --user milesDyson:skynet101 \ (2)
    -H 'X-DOMAIN: test-reseller-1' \ (3)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (4)
1 The time stamp 1556668800 is 1 May 2019 12:00:00 GMT and 1559347199 is 31 May 2019 11:59:59 PM GMT.
2 Generates the HTTP Basic Authentication header. This can only be the reseller credentials.
3 Provided to you by FoxyProxy
4 There is no HTTP body
HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12[
13   {
14      "uid":"6abbc07b-fd48-48d3-8250-01d9aebf22e9",
15      "active":false,
16      "username":"johnConnor88",
17      "trafficUp":397322,
18      "trafficDown":5407570,
19      "trafficTotal":5846333
20   },
21   {
22      "uid":"93a96d74-a5d8-4073-8b06-4e96e15d50d0",
23      "active":true,
24      "username":"kylereese89",
25      "trafficUp":7900148,
26      "trafficDown":794051,
27      "trafficTotal":1859431701
28   },
29   {
30      "uid":"acff5189-c88c-428b-b9b4-9f4b5947b068",
31      "active":true,
32      "username":"johnconnor81232",
33      "trafficUp":14260169,
34      "trafficDown":12242120,
35      "trafficTotal":38251382
36   }
37]

Active Node Connection Totals

GET /nodes/{nodeName}/connections/

Requires ROLE_RESELLER privileges.

Gets a count of active connections for the specified node. This does not include closed connections. Use

A single account may have more than 1 active connection. Each connection is counted separately. To see how many connections each account has, use Active Node Connections By Account.

Values are typically updated every 30 minutes and may be delayed up to 30 minutes.

curl example
$ curl 'https://domain.com/nodes/testnode-nl01/' -i -X GET \ //
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (3)
1 Generates the HTTP Basic Authentication header. This can only be the reseller credentials.
2 Provided to you by FoxyProxy
3 There is no HTTP body
HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{"count": 15}

Active Node Connections By Account

GET /nodes/{nodeName}/connections-by-account/

Requires ROLE_RESELLER privileges.

Gets the active connections for the specified node. This does not include closed connections.

Values are typically updated every 30 minutes and may be delayed up to 30 minutes.

curl example
$ curl 'https://domain.com/nodes/testnode-nl01/connections-by-account/' -i -X GET \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (3)
1 Generates the HTTP Basic Authentication header. This can only be the reseller credentials.
2 Provided to you by FoxyProxy
3 There is no HTTP body
HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12[
13   {
14      "uid":"6abbc07b-fd48-48d3-8250-01d9aebf22e9",
15      "active":true,
16      "username":"johnConnor88",
17      "connections": 3
18   },
19   {
20      "uid":"93a96d74-a5d8-4073-8b06-4e96e15d50d0",
21      "active":true,
22      "username":"kylereese89",
23      "connections": 1
24   }
25]

Historical Node Connection Totals

GET /nodes/{nodeName}/connections/{startTime}/{endTime}/

Requires ROLE_RESELLER privileges.

Gets a count of connections for the specified node between two timestamps, inclusive. startTime and endTime are epoch times in seconds, not milliseconds. This does not include active connections.

A single account may have had more than 1 active connection during the specified time range. Each connection is counted separately. To see how many connections each account had, use Historical Node Connections By Account.

Values are typically updated every 30 minutes and may be delayed up to 30 minutes.

curl example
$ curl 'https://domain.com/nodes/testnode-nl01/connections/1556668800/1559347199/' -i -X GET \ //
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (3)
1 Generates the HTTP Basic Authentication header. This can only be the reseller credentials.
2 Provided to you by FoxyProxy
3 There is no HTTP body
HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12{"count": 15}

Historical Node Connections By Account

GET /nodes/{nodeName}/connections-by-account/{startTime}/{endTime}/

Requires ROLE_RESELLER privileges.

Gets the connections for the specified node between two timestamps, inclusive. startTime and endTime are epoch times in seconds, not milliseconds. This does not include active connections.

Values are typically updated every 30 minutes and may be delayed up to 30 minutes.

curl example
$ curl 'https://domain.com/nodes/testnode-nl01/connections-by-account/1556668800/1559347199/' -i -X GET \
     --user milesDyson:skynet101 \ (1)
    -H 'X-DOMAIN: test-reseller-1' \ (2)
    -H 'Accept: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8' \
    -H 'Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8'
    (3)
1 Generates the HTTP Basic Authentication header. This can only be the reseller credentials.
2 Provided to you by FoxyProxy
3 There is no HTTP body
HTTP response
 1HTTP/1.1 200 OK
 2X-Content-Type-Options: nosniff
 3X-XSS-Protection: 1; mode=block
 4Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 5Pragma: no-cache
 6Expires: 0
 7X-Frame-Options: DENY
 8Content-Type: application/vnd.foxyproxy.reseller.api.nonleased.v2+json;charset=UTF-8
 9Transfer-Encoding: chunked
10Content-Length: xxxx
11
12[
13   {
14      "uid":"6abbc07b-fd48-48d3-8250-01d9aebf22e9",
15      "active":true,
16      "username":"johnConnor88",
17      "connections": 3
18   },
19   {
20      "uid":"93a96d74-a5d8-4073-8b06-4e96e15d50d0",
21      "active":true,
22      "username":"kylereese89",
23      "connections": 1
24   }
25]

Release Notes

Only release notes which change this API or this documentation are published. Therefore, some releases may not be documented here.

  • version 1.6, released 2019-07-21

  • version 1.5.1, released 2019-05-28

  • version 1.4.3, released 2019-04-17

    • Bugfix release. Preliminary support for copying accounts. No public changes yet.

  • version 1.4.2, released 2019-03-08

    • No public changes

  • version 1.4.1, released 2019-02-27

    • node objects now include node.services to explain the VPN and proxy protocols supported by a node, as well as configuration (for OpenVPN) and/or port information.

    • node.openVPNConfig is replaced by node.services.config where node.services.name is openvpn.

    • Added optional comment property to create/update/delete account endpoints. These will be retrievable from forthcoming GET /account/history/ endpoints.

    • Changed sort order of Get Accounts By Username and Get Accounts from user.uid to account.node.country

    • Added documentation section Availability

  • version 1.3.1, 2019-02-05

    • Fixed account creation bug affecting only secondary creates (whereby the account with a given username already exists); updated POST /accounts docs with extensive information about this functions behavior on subsequent calls with existing username

    • Nodes are referred to by a "short name", not full DNS name. This enables us to support multiple DNS names for each node, including custom DNS names for total whitelisting. The following changes occured to support this:

    • Added GET /nodes/dns-suffixes/ to get a list of DNS names for the current reseller

    • GET /nodes/?index=xxx&size=yyy returns a JSON with the property name instead of dnsName, and the value is a short name; e.g. "name":"testnode-de01" and not "name":"testnode-de01.getfoxyproxy.org" Concatenate the short name with the a value returned from /nodes/dns-suffixes/ to get fully qualified DNS names.

    • GET /nodes/{dnsName} changed to GET /nodes/{name}. It returns a JSON with the property name instead of dnsName, and the value is a short name; e.g. "name":"testnode-de01" and not "name":"testnode-de01.getfoxyproxy.org" Concatenate the short name with the a value returned from /nodes/dns-suffixes/ to get fully qualified DNS names.

    • PATCH /accounts/activate/{username} optional payload changed JSON property name from dnsNames to nodeNames. For example, {"dnsNames": ["testnode-nl01.getfoxyproxy.org", "testnode-uk01.getfoxyproxy.org"]} would now be {"nodeNames": ["testnode-nl01", "testnode-uk01"]}.

    • All references in documentation to dnsName or dnsNames changed to nodeName or nodeNames, except for the new method GET /nodes/dns-suffixes/

  • version 1.0.7, 2019-01-11

    • Fixed documentation examples for GET /nodes/{dnsName}/ and GET /nodes/ by removing extraneous nodes property

    • Ability to create new accounts in the inactive/deactivated state with the new active property in POST /accounts/

  • version 1.0, initial public release, 2018-11-27