Subusers
Subusers, or customers, are where your users live in InfiniteProxies — they are a collection of users that take your InfiniteProxies balance and consume them. On this page, we'll dive into the different customer endpoints you can use to manage them programmatically. We'll look at how to query, create, update, and delete subusers.
Create subuser
This endpoint allows you to create a new customer. Keep in mind that creating a customer will subtract 100 MB from your residential balance to prevent abuse.
Required Body "Raw" Items
- Name
username
- Type
- string
- Description
The username of the customer.
- Name
email
- Type
- string
- Description
The email address of the customer.
Returned Properties
- Name
data
- Type
- object
- Description
The account data of the customer.
- Name
message
- Type
- string
- Description
The message of the response.
- Name
status
- Type
- number
- Description
The status code of the response.
- Name
timestamp
- Type
- number
- Description
The timestamp in milliseconds of the response.
Request
curl --location --request PUT 'https://api.infiniteproxies.com/v1/reseller/sub_users/create' \
--header 'X-API-KEY: [API KEY]' \
--data '{"username":"infproxy_customer","email":"[email protected]"}'
Response
{
"data": {
"email": "[email protected]",
"username": "infproxy_customer",
"balance": 0,
"proxy_authkey": "K95613FBT6322Gz1DpQw",
"created_at": "2023-05-24T09:27:09.816933Z",
"updated_at": "2023-05-24T09:27:09.816933Z",
"msg": "on creating new user we deduct 100MB from your balance"
},
"message": "",
"status": 201,
"timestamp": 1684920429837
}
List all subusers
This endpoint allows you to retrieve a list of all your subusers.
Returned Properties
- Name
data
- Type
- object
- Description
The list of your subusers.
- Name
message
- Type
- string
- Description
The message of the response.
- Name
status
- Type
- number
- Description
The status code of the response.
- Name
timestamp
- Type
- number
- Description
The timestamp in milliseconds of the response.
Request
curl -G 'https://api.infiniteproxies.com/v1/reseller/sub_users/view_all' \
--header 'X-API-KEY: [API KEY]'
Response
{
"data": [
{
"email": "[email protected]",
"username": "infproxy_customer",
"balance": 0,
"proxy_authkey": "K95613FBT6322Gz1DpQw",
"created_at": "2023-05-24T09:27:09.816933Z",
"updated_at": "2023-05-24T09:27:09.816933Z",
}
],
"message": "",
"status": 200,
"timestamp": 1684920877632
}
Get single subuser
This endpoint allows you to retrieve a single subuser by providing the subuser's username. Refer to the list at the top of this page to see which properties are included with customer objects.
Required query parameters
- Name
username
- Type
- string
- Description
The username of the customer you want to retrieve.
Returned Properties
- Name
data
- Type
- object
- Description
The account data of the subuser.
- Name
message
- Type
- string
- Description
The message of the response.
- Name
status
- Type
- number
- Description
The status code of the response.
- Name
timestamp
- Type
- number
- Description
The timestamp in milliseconds of the response.
Request
curl -G 'https://api.infiniteproxies.com/v1/reseller/sub_users/view_single?username=infproxy_customer' \
--header 'X-API-KEY: [API KEY]'
Response
{
"data": {
"email": "[email protected]",
"username": "infproxy_customer",
"balance": 0,
"proxy_authkey": "K95613FBT6322Gz1DpQw",
"created_at": "2023-05-24T09:27:09.816933Z",
"updated_at": "2023-05-24T09:27:09.816933Z",
},
"message": "",
"status": 200,
"timestamp": 1684921085786
}
Get subuser transactions
This endpoint allows you to retrieve the consumptions of a subuser.
Required parameters
- Name
username
- Type
- string
- Description
The username of the customer you want to retrieve.
- Name
duration
- Type
- string
- Description
The duration of the consumptions you want to retrieve.
Can be ind
orh
(days or hours).
- Name
granularity
- Type
- string
- Description
The granularity of the consumptions you want to retrieve.
Can beminute
,hour
orday
.
Returned Properties
- Name
data
- Type
- object
- Description
The data of consumptions based on the duration and granularity you provided.
- Name
message
- Type
- string
- Description
The message of the response.
- Name
status
- Type
- number
- Description
The status code of the response.
- Name
timestamp
- Type
- number
- Description
The timestamp in milliseconds of the response.
Request
curl -G 'https://api.infiniteproxies.com/v1/reseller/sub_users/view_txs?username=infproxy_customer&duration=24h&granularity=hour' \
--header 'X-API-KEY: [API KEY]'
Response
{
"data": {
"stats": {
"2023-05-23 09:00": 0,
"2023-05-23 10:00": 0,
"2023-05-23 11:00": 0,
"2023-05-23 12:00": 0,
"2023-05-23 13:00": 0,
"2023-05-23 14:00": 0,
"2023-05-23 14:55": 2.977805,
"2023-05-23 15:00": 0,
"2023-05-23 15:55": 0.00589,
"2023-05-23 16:00": 0,
"2023-05-23 17:00": 0,
"2023-05-23 18:00": 0,
"2023-05-23 19:00": 0,
"2023-05-23 20:00": 0,
"2023-05-23 21:00": 0,
"2023-05-23 22:00": 0,
"2023-05-23 23:00": 0,
"2023-05-24 00:00": 0,
"2023-05-24 01:00": 0,
"2023-05-24 02:00": 0,
"2023-05-24 03:00": 0,
"2023-05-24 04:00": 0,
"2023-05-24 05:00": 0,
"2023-05-24 06:00": 0,
"2023-05-24 07:00": 0,
"2023-05-24 08:00": 0
},
"total_bandwidth": 2.983695
},
"message": "",
"status": 200,
"timestamp": 1684922124142
}
Add subuser balance
This endpoint allows you to add balance in MB (megabytes) to a subuser.
Required Body "Raw" Items
- Name
username
- Type
- string
- Description
The username of the customer.
- Name
balance
- Type
- number
- Description
The amount of MB (megabytes) you want to give to the customer.
Returned Properties
- Name
data
- Type
- object
- Description
The account data of the subuser.
- Name
message
- Type
- string
- Description
The message of the response.
- Name
status
- Type
- number
- Description
The status code of the response.
- Name
timestamp
- Type
- number
- Description
The timestamp in milliseconds of the response.
Request
curl --location --request POST 'https://api.infiniteproxies.com/v1/reseller/sub_users/give_balance' \
--header 'X-API-KEY: [API KEY]' \
--data '{"username":"infproxy_customer","balance": 10}'
Response
{
"data": {
"email": "[email protected]",
"username": "infproxy_customer",
"balance": 10,
"proxy_authkey": "K95613FBT6322Gz1DpQw",
"created_at": "2023-05-24T09:27:09.816933Z",
"updated_at": "2023-05-24T09:27:09.816933Z",
},
"message": "",
"status": 200,
"timestamp": 1684921085786
}
Remove subuser balance
This endpoint allows you to remove balance in MB (megabytes) to a customer.
Required Body "Raw" Items
- Name
username
- Type
- string
- Description
The username of the customer.
- Name
balance
- Type
- number
- Description
The amount of MB (megabytes) you want to remove from the customer.
Returned Properties
- Name
data
- Type
- object
- Description
The account data of the subuser.
- Name
message
- Type
- string
- Description
The message of the response.
- Name
status
- Type
- number
- Description
The status code of the response.
- Name
timestamp
- Type
- number
- Description
The timestamp in milliseconds of the response.
Request
curl --location --request POST 'https://api.infiniteproxies.com/v1/reseller/sub_users/take_balance' \
--header 'X-API-KEY: [API KEY]' \
--data '{"username":"infproxy_customer","balance": 10}'
Response
{
"data": {
"email": "[email protected]",
"username": "infproxy_customer",
"balance": 0,
"proxy_authkey": "K95613FBT6322Gz1DpQw",
"created_at": "2023-05-24T09:27:09.816933Z",
"updated_at": "2023-05-24T09:27:09.816933Z",
},
"message": "",
"status": 200,
"timestamp": 1684921085786
}
Reset subuser password
This endpoint allows you to reset the proxy password of a subuser.
Required Body "Raw" Items
- Name
username
- Type
- string
- Description
The username of the customer.
Returned Properties
- Name
data
- Type
- object
- Description
The account data of the subuser.
- Name
message
- Type
- string
- Description
The message of the response.
- Name
status
- Type
- number
- Description
The status code of the response.
- Name
timestamp
- Type
- number
- Description
The timestamp in milliseconds of the response.
Request
curl --location --request POST 'https://api.infiniteproxies.com/v1/reseller/sub_users/reset_auth_key' \
--header 'X-API-KEY: [API KEY]' \
--data '{"username":"infproxy_customer"}'
Response
{
"data": {
"email": "[email protected]",
"username": "infproxy_customer",
"balance": 0,
"proxy_authkey": "JTJo6VCCBMlJFpTIzsjV",
"created_at": "2023-05-24T09:27:09.816933Z",
"updated_at": "2023-05-24T09:27:09.816933Z",
},
"message": "",
"status": 200,
"timestamp": 1684921085786
}