{
  "openapi": "3.0.4",
  "info": {
    "title": "Databay Api",
    "description": "Public documentation to manage your Databay dashboard user account.\r\n<h2>Step-by-step guide on how to import our API into Postman</h2>\r\n\r\n<h3>Open Postman & Import the OpenAPI JSON via Link</h3>\r\n<p>Navigate to <a>File > Import</a> at the top left of Postman. Switch to the \"Link\" tab and paste the URL <a>https://api.databay.com/swagger/v1/swagger.json</a>, then hit \"Continue\" and \"Import\".</p>\r\n\r\n<h3>Explore the API</h3>\r\n<p>After importing, the API will appear in your Collections tab. You can now explore different endpoints and their associated operations.</p>\r\n\r\nYou must first generate your api key on <a href=\"https://app.databay.com/account/profile\">your profile page</a>.\r\n<br>\r\nYou can get your accountId on <a href=\"https://app.databay.com/account/profile\">your dashboard profile page</a>.\r\n<br>\r\nFor more information, <a href=\"mailto:support@databay.com\">contact us</a>.",
    "termsOfService": "https://databay.com/legal/index",
    "contact": {
      "name": "Databay Team",
      "url": "https://databay.com",
      "email": "support@databay.com"
    },
    "version": "v1"
  },
  "paths": {
    "/api/v{version}/accounts/{accountId}": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "Get your account information",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "Your account id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Your account information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAccountDetailsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The user does not have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The user has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error."
          }
        }
      }
    },
    "/api/v{version}/accounts/{accountId}/proxy-users/{proxyUserId}/bandwidths": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "Get traffic details of specified proxy user.",
        "parameters": [
          {
            "name": "proxyUserId",
            "in": "path",
            "description": "The ID of the proxy user for whom the traffic details are being requested.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountId",
            "in": "path",
            "description": "The ID of the account to which the proxy user is associated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The proxy user bandwidth.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetProxyUserTrafficResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The user does not have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The user has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error."
          }
        }
      },
      "post": {
        "tags": [
          "Accounts"
        ],
        "summary": "Add bandwidth to specified proxy user.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "The ID of the account to which the proxy user is associated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "proxyUserId",
            "in": "path",
            "description": "The ID of the proxy user who will receive the added bandwidth.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The model containing the amount of bandwidth to be added or transferred.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/TransferBandwidthModel"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferBandwidthModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferBandwidthModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TransferBandwidthModel"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/TransferBandwidthModel"
              }
            },
            "text/xml": {
              "schema": {
                "$ref": "#/components/schemas/TransferBandwidthModel"
              }
            },
            "application/*+xml": {
              "schema": {
                "$ref": "#/components/schemas/TransferBandwidthModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A HTTPs response indicating the result of the addition."
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The user does not have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The user has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error."
          }
        }
      }
    },
    "/api/v{version}/accounts/{accountId}/proxy-users/{proxyUserId}/bandwidths/logs": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "Get traffic logs of specified proxy user.",
        "parameters": [
          {
            "name": "proxyUserId",
            "in": "path",
            "description": "The ID of the proxy user whose traffic logs are being requested.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountId",
            "in": "path",
            "description": "The ID of the account to which the proxy user is linked.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The proxy user bandwidth logs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetProxyUserTrafficLogsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The user does not have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The user has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error."
          }
        }
      }
    },
    "/api/v{version}/accounts/{accountId}/proxy-users/{proxyUserId}": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "Get a proxy user.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "The ID of the account to which the proxy user belongs.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "proxyUserId",
            "in": "path",
            "description": "The ID of the proxy user whose details are to be fetched.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The proxy user details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetProxyUserResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The user does not have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The user has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error."
          }
        }
      },
      "patch": {
        "tags": [
          "Accounts"
        ],
        "summary": "Update password of the specified proxy user.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "The ID of the account with which the proxy user is associated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "proxyUserId",
            "in": "path",
            "description": "The ID of the proxy user to be updated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The new details, including the updated password, for the proxy user.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProxyUserModel"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProxyUserModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProxyUserModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProxyUserModel"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProxyUserModel"
              }
            },
            "text/xml": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProxyUserModel"
              }
            },
            "application/*+xml": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProxyUserModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A HTTPs response indicating the result of the update."
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The user does not have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The user has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error."
          }
        }
      },
      "delete": {
        "tags": [
          "Accounts"
        ],
        "summary": "Delete specified proxy user.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "The ID of the account from which the proxy user is to be deleted.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "proxyUserId",
            "in": "path",
            "description": "The ID of the proxy user to be deleted.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "A HTTPs response indicating the result of the deletion."
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The user does not have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The user has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error."
          }
        }
      }
    },
    "/api/v{version}/accounts/{accountId}/proxy-users/page/{pageIndex}": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "Get the list of your proxy users.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "The ID of the account for which the proxy users are to be listed.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageIndex",
            "in": "path",
            "description": "The index for the page of results. Defaults to 0.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A paginated list of proxy users.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetProxyUsersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The user does not have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The user has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error."
          }
        }
      }
    },
    "/api/v{version}/accounts/{accountId}/proxy-users": {
      "post": {
        "tags": [
          "Accounts"
        ],
        "summary": "Create a new proxy user.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "The ID of the account to which the new proxy user will be associated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The details required to create a new proxy user, including the username and\npassword.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProxyUserModel"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProxyUserModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProxyUserModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProxyUserModel"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/CreateProxyUserModel"
              }
            },
            "text/xml": {
              "schema": {
                "$ref": "#/components/schemas/CreateProxyUserModel"
              }
            },
            "application/*+xml": {
              "schema": {
                "$ref": "#/components/schemas/CreateProxyUserModel"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A HTTPs response indicating the result of the addition.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedResultModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The user does not have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The user has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error."
          }
        }
      }
    },
    "/api/v{version}/accounts/{accountId}/proxy-users/{proxyUserId}/whitelisted-ips": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "Get the proxy user whitelisted IPs",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "The ID of the account under which the proxy user exists.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "proxyUserId",
            "in": "path",
            "description": "The ID of the proxy user whose whitelisted IPs are being requested.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The proxy user whitelisted IPs."
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The user does not have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The user has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error."
          }
        }
      },
      "post": {
        "tags": [
          "Accounts"
        ],
        "summary": "Add a whitelisted IP.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "The ID of the account under which the proxy user exists.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "proxyUserId",
            "in": "path",
            "description": "The ID of the proxy user to whom the IP will be whitelisted.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The model containing the IP address and any other parameters required for the\nwhitelisting process.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/AddWhitelistedIpModel"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddWhitelistedIpModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddWhitelistedIpModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddWhitelistedIpModel"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/AddWhitelistedIpModel"
              }
            },
            "text/xml": {
              "schema": {
                "$ref": "#/components/schemas/AddWhitelistedIpModel"
              }
            },
            "application/*+xml": {
              "schema": {
                "$ref": "#/components/schemas/AddWhitelistedIpModel"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "A HTTPs response indicating the result of the addition.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedResultModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The user does not have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The user has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error."
          }
        }
      }
    },
    "/api/v{version}/accounts/{accountId}/whitelist/{whitelistedIpId}": {
      "delete": {
        "tags": [
          "Accounts"
        ],
        "summary": "Delete a whitelisted IP.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "The ID of the account from which the IP will be removed.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whitelistedIpId",
            "in": "path",
            "description": "The ID of the whitelisted IP address to be removed.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "A HTTPs response indicating the result of the deletion."
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The user does not have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The user has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error."
          }
        }
      }
    },
    "/api/v{version}/accounts/{accountId}/whitelist/page/{pageIndex}": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "Get the list of your whitelisted IPs.",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "The id of the account.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageIndex",
            "in": "path",
            "description": "Page index of the results. Default value is 0.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get the list of whitelisted IPs."
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The user does not have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The user has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error."
          }
        }
      }
    },
    "/api/v{version}/orders/{accountId}/order": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Create a new order",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "The ID of the account for which the order will be created.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The model containing necessary details for creating a new order.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderModel"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderModel"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderModel"
              }
            },
            "text/xml": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderModel"
              }
            },
            "application/*+xml": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A HTTPs response indicating the order information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAccountDetailsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The user does not have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The user has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error."
          }
        }
      }
    },
    "/api/v{version}/proxyserver/continents": {
      "get": {
        "tags": [
          "ProxyServer"
        ],
        "summary": "Get all available continents",
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of continents.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PoolEntity"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. Access to this resource is restricted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The client has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v{version}/proxyserver/countries": {
      "get": {
        "tags": [
          "ProxyServer"
        ],
        "summary": "Returns the list of countries",
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of countries.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PoolEntity"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. Access to this resource is restricted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The client has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v{version}/proxyserver/states": {
      "get": {
        "tags": [
          "ProxyServer"
        ],
        "summary": "Get all available states",
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of states.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PoolEntity"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. Access to this resource is restricted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The client has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v{version}/proxyserver/cities": {
      "get": {
        "tags": [
          "ProxyServer"
        ],
        "summary": "Get all available cities",
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of cities.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PoolEntity"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. Access to this resource is restricted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The client has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v{version}/proxyserver/asns": {
      "get": {
        "tags": [
          "ProxyServer"
        ],
        "summary": "Get all available ASNs",
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of ASNs.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PoolEntity"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. Access to this resource is restricted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The client has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v{version}/proxyserver/postalcodes": {
      "get": {
        "tags": [
          "ProxyServer"
        ],
        "summary": "Get all available postal codes",
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of postal codes.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PoolEntity"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Invalid request or validation error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. Access to this resource is restricted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. The client has exceeded the rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TooManyRequestsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v{version}/tests/{accountId}/test": {
      "get": {
        "tags": [
          "Tests"
        ],
        "summary": "Retrieves a simple \"Hello world\" message.",
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              },
              "text/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/v{version}/tests": {
      "post": {
        "tags": [
          "Tests"
        ],
        "summary": "Posts a name and returns a greeting message.",
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The model containing the name to greet.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/TestModel"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TestModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TestModel"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/TestModel"
              }
            },
            "text/xml": {
              "schema": {
                "$ref": "#/components/schemas/TestModel"
              }
            },
            "application/*+xml": {
              "schema": {
                "$ref": "#/components/schemas/TestModel"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              },
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              },
              "text/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddWhitelistedIpModel": {
        "required": [
          "ipAddress"
        ],
        "type": "object",
        "properties": {
          "ipAddress": {
            "minLength": 1,
            "type": "string"
          },
          "proxySource": {
            "$ref": "#/components/schemas/ProxySource"
          },
          "parameters": {
            "maxLength": 128,
            "minLength": 5,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Balance": {
        "type": "object",
        "properties": {
          "eur": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "BandwidthLog": {
        "type": "object",
        "properties": {
          "proxySource": {
            "$ref": "#/components/schemas/ProxySource"
          },
          "logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BandwidthLogEntity"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BandwidthLogEntity": {
        "type": "object",
        "properties": {
          "up": {
            "$ref": "#/components/schemas/DataSize"
          },
          "down": {
            "$ref": "#/components/schemas/DataSize"
          },
          "date": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "CreateOrderModel": {
        "type": "object",
        "properties": {
          "productId": {
            "type": "integer",
            "format": "int32"
          },
          "productQuantity": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "CreateProxyUserModel": {
        "required": [
          "userName"
        ],
        "type": "object",
        "properties": {
          "userName": {
            "maxLength": 30,
            "minLength": 5,
            "type": "string"
          },
          "password": {
            "maxLength": 36,
            "minLength": 6,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreatedResultModel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataSize": {
        "type": "object",
        "properties": {
          "totalTerabytes": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "totalGigabytes": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "totalMegabytes": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "totalKilobytes": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "totalBytes": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "totalBytesInaccurate": {
            "type": "integer",
            "format": "int64",
            "readOnly": true
          },
          "bytes": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "GetAccountDetailsResponse": {
        "type": "object",
        "properties": {
          "wallet": {
            "$ref": "#/components/schemas/Wallet"
          },
          "orders": {
            "$ref": "#/components/schemas/Orders"
          }
        },
        "additionalProperties": false
      },
      "GetProxyUserResponse": {
        "type": "object",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/ProxyUserApiDto"
          }
        },
        "additionalProperties": false
      },
      "GetProxyUserTrafficLogsResponse": {
        "type": "object",
        "properties": {
          "logs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BandwidthLog"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetProxyUserTrafficResponse": {
        "type": "object",
        "properties": {
          "traffics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProxyAccountBandwidth"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetProxyUsersResponse": {
        "type": "object",
        "properties": {
          "proxyAccounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProxyUserApiDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Orders": {
        "type": "object",
        "properties": {
          "ordersCount": {
            "type": "integer",
            "format": "int32"
          },
          "lastOrderProductName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PoolEntity": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "format": {
            "type": "string",
            "nullable": true
          },
          "networks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProxySource"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "ProxyAccountBandwidth": {
        "type": "object",
        "properties": {
          "bandwidth": {
            "$ref": "#/components/schemas/DataSize"
          },
          "proxySource": {
            "$ref": "#/components/schemas/ProxySource"
          },
          "expiration": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ProxySource": {
        "enum": [
          0,
          1,
          2,
          4,
          8
        ],
        "type": "integer",
        "format": "int32"
      },
      "ProxyUserApiDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "isMainUser": {
            "type": "boolean"
          },
          "userName": {
            "maxLength": 30,
            "minLength": 5,
            "type": "string",
            "nullable": true
          },
          "normalizedUserName": {
            "maxLength": 30,
            "minLength": 5,
            "type": "string",
            "nullable": true
          },
          "password": {
            "maxLength": 36,
            "minLength": 6,
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "TestModel": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Gets or sets the name. This is used for greeting purposes.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a simple test model."
      },
      "TooManyRequestsResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "nullable": true
          },
          "details": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TransferBandwidthModel": {
        "required": [
          "amountInBytes",
          "proxySource"
        ],
        "type": "object",
        "properties": {
          "amountInBytes": {
            "maximum": 1.8446744073709552E+19,
            "minimum": 52428799,
            "type": "integer",
            "format": "int64"
          },
          "proxySource": {
            "$ref": "#/components/schemas/ProxySource"
          },
          "expiration": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateProxyUserModel": {
        "type": "object",
        "properties": {
          "userName": {
            "maxLength": 30,
            "minLength": 5,
            "type": "string",
            "nullable": true
          },
          "password": {
            "maxLength": 36,
            "minLength": 6,
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Wallet": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Balance"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "Put **_ONLY_** your JWT Bearer token on textbox below!",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    { }
  ],
  "tags": [
    {
      "name": "Accounts",
      "description": "All endpoints related to the management of your account"
    },
    {
      "name": "Orders",
      "description": "All endpoints related to your Databay orders."
    },
    {
      "name": "ProxyServer",
      "description": "All endpoints related to our proxy servers."
    },
    {
      "name": "Tests",
      "description": "Tests endpoints."
    }
  ]
}