Skip to content

Users

SDK Reference · Resource

Users

Manage users and sub-users that belong to the current account.

method

list()

List users in the current account

Returns users visible to the caller. Resellers see their sub-users, regular customers see only themselves, and administrators can see all users.

Signature

Promiseclient.users.list(options: UsersListOptions = {}): Promise<UsersListResponse>

Parameters

NameTypeRequirementDescription
emailstringOptional—
idstringOptional—
limitnumberOptionalNumber of results to return per page.
offsetnumberOptionalThe initial index from which to return the results.
orderingstringOptionalWhich field to use when ordering the results.
packageIdstringOptionalFilters the visible user list to accounts that have at least one stored order for this package UUID. Orders are matched regardless of whether they are active or expired; this filter never expands the caller's normal account scope.
searchstringOptionalCase-insensitive partial search across user fields: `email`, `username`, `first_name`, and `last_name`. Separate multiple terms with spaces or commas; every term must match at least one listed field.
usernamestringOptional—
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.users.list();

Returns

PaginatedUserList

The operation completed successfully.

typePaginatedUserList4fields
count
number
Required
—
next
string
Optional
—
previous
string
Optional
—
results
User[]
Required
—
typeUser43fields

Customer account with contact details, security settings, package data, referral information, and managed sub-users visible to the caller.

id
string
Required
—
username
string
Required
Value must contain only letters, numbers, and underscores. It must not start or end with an underscore.
email
string
Required
—
is_reseller
boolean
Optional
Reseller can create sub-users and manage their data.
is_marketer
boolean
Optional
Marketer can manage marketing campaigns and view analytics.
is_superuser
boolean
Optional
Designates that this user has all permissions without explicitly assigning them.
date_joined
string
Required
—
date_joined_ts
number
Required
Timestamp of when the user joined
first_name
string
Optional
—
last_name
string
Optional
—
balance
number
Optional
—
language
LanguageEnum
Optional
—
enumLanguageEnum0fields

* `en` - EN * `de` - DE * `fr` - FR * `it` - IT * `ru` - RU

No fields.

country
string
Optional
—
state
string
Optional
—
city
string
Optional
—
address
string
Optional
—
zip
string
Optional
—
company_name
string
Optional
—
company_address
string
Optional
—
company_city
string
Optional
—
company_postal_code
string
Optional
—
company_country
string
Optional
—
company_vat_number
string
Optional
—
allowed_ips
string[]
Required
List of IP addresses allowed for this user
blocked_domains
string[]
Required
List of domains blocked for this user
connection_limit
number
Optional
The maximum number of concurrent connections allowed for this package.
parent_id
string
Required
ID of the parent user (for sub-accounts)
sub_users
number
Required
Number of sub-users managed by this reseller
referrals
number
Required
Number of users referred by this user
referral_id
string
Optional
—
referral_code
string
Required
—
referral_data_earned
number
Required
—
referral_data_pending
number
Required
—
referral_balance_pending
number
Required
—
referral_balance_earned
number
Required
—
currency
UserCurrency
Required
Currency information for the user's transactions
typeUserCurrency2fields
code
string
Required
—
symbol
string
Required
—
coupons
CouponShort[]
Required
Available coupons for this user
typeCouponShort14fields
id
string
Optional
—
is_expired
boolean
Required
—
is_redeemed
boolean
Required
—
packages
PackageShort[]
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
created
string
Required
—
value
number
Required
Arbitrary coupon value
code
string
Required
Leaving this field empty will generate a random code.
is_multi_use
boolean
Optional
If true, coupon can be used multiple times.
is_available_to_one_time
boolean
Optional
If true, coupon can not be used for one-time package tiers.
type
CouponTypeEnum
Required
—
enumCouponTypeEnum0fields

* `free_data` - Free Data * `monetary` - Money * `percentage` - Percentage

No fields.

limit
number
Optional
Number of times coupon can be used
valid_until
string
Optional
Leave empty for coupons that never expire
marketer
string
Optional
The marketer who owns this coupon. Required if is_marketer is true.
user
string
Required
The user who created this coupon.
data
number
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
data_spent
number
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
data_updated
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
proxy_password
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
proxy_password_reset
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
orders
Order[]
Optional
The user's package orders, including inactive orders. Each order contains its own data allowance, usage, ledgers, and proxy credentials. An empty list means the user has no orders.
typeOrder17fields
id
string
Optional
—
is_auto_renewal
boolean
Required
—
auto_renewal_percentage
number
Optional
When this percentage of the data allowance has been consumed, the order is automatically renewed if the user has sufficient balance. Set to 0 to disable auto-renewal. 80 → renew when 80% of data is used
auto_renewal_data
number
Optional
Amount of data in GB to add when auto-renewal is triggered. Set to 0 to use the package default.
package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
proxy_password
string
Optional
Password used by the customer to authenticate proxy connections. Auto-generated by default — change only if a custom value is needed. Must be between 4 and 64 characters.
proxy_password_reset
string
Optional
Timestamp of the last proxy password change. Read-only — updated automatically whenever the password is rotated.
pools
string[]
Optional
Private proxy pools assigned to this order. Pools restrict which proxy IPs are available to this customer. Leave blank to use the full provider pool.
data
number
Optional
Total data allowance for this order in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Integer bytes. Root order: sum of usable ledger balances, not data minus data_spent. Virtual child order: max(data - data_spent, 0), a personal quota that does not guarantee the parent still has usable data.
data_spent
number
Optional
Total bytes consumed from this order's data allowance so far. Updated in real time as the customer uses the proxy.
ledgers
DataLedger[]
Required
Usable, non-expired ledger balances for a purchased root order; empty for a virtual child order using its parent's pool. Not a complete history. Array position does not identify the active ledger or spending order.
typeDataLedger6fields

A purchased data bucket, not a complete transaction history. Finite purchases with an expiration have separate buckets. Compatible non-expiring top-ups and unlimited packages may reuse an existing bucket.

id
string
Required
—
data
number
Required
Total data allocated to this ledger entry in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Bytes still available for consumption from this ledger entry. Decremented in FIFO order as the customer uses the proxy. When this reaches zero the entry is exhausted.
expires
string
Required
Date and time when this ledger entry expires and any remaining data is forfeited. Leave blank for entries that do not expire.
updated
string
Required
—
created
string
Required
—
latest_data_top_up
number
Optional
Amount of data added to this order in bytes during the most recent top-up.
latest_data_top_up_date
string
Optional
Timestamp of the most recent data top-up, set when an invoice is fulfilled.
data_updated
string
Required
—
updated
string
Required
—
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.users.listWithResponse(options): Promise<ApiResponse<UsersListResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

create()

Create a customer account

Creates a sub-user under the caller by default. A superuser can send is_top_level=true to create an independent customer account. A sub-user cannot create another generation of users. Omit package_id and data to create identity only, then provision the chosen accounting model separately. For shared-pool allocation, supply package_id and positive integer-byte data; the parent must already own a root order for that package. An independent paid purchase is provisioned through invoices, not a shared-pool quota.

Signature

Promiseclient.users.create(options: UsersCreateOptions): Promise<UsersCreateResponse>

Parameters

NameTypeRequirementDescription
idempotencyKeystringOptionalStable key for one logical mutation. Successful responses are replayable for 24 hours; reusing a key with a different request fails.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodyUserCreateRequestRequired—

Example

const result = await client.users.create({
body: {
"username": "{username}",
"password": "Correct-Horse-Battery-Staple-42"
}
});

Returns

User

The resource or action result was created successfully.

typeUser43fields

Customer account with contact details, security settings, package data, referral information, and managed sub-users visible to the caller.

id
string
Required
—
username
string
Required
Value must contain only letters, numbers, and underscores. It must not start or end with an underscore.
email
string
Required
—
is_reseller
boolean
Optional
Reseller can create sub-users and manage their data.
is_marketer
boolean
Optional
Marketer can manage marketing campaigns and view analytics.
is_superuser
boolean
Optional
Designates that this user has all permissions without explicitly assigning them.
date_joined
string
Required
—
date_joined_ts
number
Required
Timestamp of when the user joined
first_name
string
Optional
—
last_name
string
Optional
—
balance
number
Optional
—
language
LanguageEnum
Optional
—
enumLanguageEnum0fields

* `en` - EN * `de` - DE * `fr` - FR * `it` - IT * `ru` - RU

No fields.

country
string
Optional
—
state
string
Optional
—
city
string
Optional
—
address
string
Optional
—
zip
string
Optional
—
company_name
string
Optional
—
company_address
string
Optional
—
company_city
string
Optional
—
company_postal_code
string
Optional
—
company_country
string
Optional
—
company_vat_number
string
Optional
—
allowed_ips
string[]
Required
List of IP addresses allowed for this user
blocked_domains
string[]
Required
List of domains blocked for this user
connection_limit
number
Optional
The maximum number of concurrent connections allowed for this package.
parent_id
string
Required
ID of the parent user (for sub-accounts)
sub_users
number
Required
Number of sub-users managed by this reseller
referrals
number
Required
Number of users referred by this user
referral_id
string
Optional
—
referral_code
string
Required
—
referral_data_earned
number
Required
—
referral_data_pending
number
Required
—
referral_balance_pending
number
Required
—
referral_balance_earned
number
Required
—
currency
UserCurrency
Required
Currency information for the user's transactions
typeUserCurrency2fields
code
string
Required
—
symbol
string
Required
—
coupons
CouponShort[]
Required
Available coupons for this user
typeCouponShort14fields
id
string
Optional
—
is_expired
boolean
Required
—
is_redeemed
boolean
Required
—
packages
PackageShort[]
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
created
string
Required
—
value
number
Required
Arbitrary coupon value
code
string
Required
Leaving this field empty will generate a random code.
is_multi_use
boolean
Optional
If true, coupon can be used multiple times.
is_available_to_one_time
boolean
Optional
If true, coupon can not be used for one-time package tiers.
type
CouponTypeEnum
Required
—
enumCouponTypeEnum0fields

* `free_data` - Free Data * `monetary` - Money * `percentage` - Percentage

No fields.

limit
number
Optional
Number of times coupon can be used
valid_until
string
Optional
Leave empty for coupons that never expire
marketer
string
Optional
The marketer who owns this coupon. Required if is_marketer is true.
user
string
Required
The user who created this coupon.
data
number
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
data_spent
number
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
data_updated
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
proxy_password
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
proxy_password_reset
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
orders
Order[]
Optional
The user's package orders, including inactive orders. Each order contains its own data allowance, usage, ledgers, and proxy credentials. An empty list means the user has no orders.
typeOrder17fields
id
string
Optional
—
is_auto_renewal
boolean
Required
—
auto_renewal_percentage
number
Optional
When this percentage of the data allowance has been consumed, the order is automatically renewed if the user has sufficient balance. Set to 0 to disable auto-renewal. 80 → renew when 80% of data is used
auto_renewal_data
number
Optional
Amount of data in GB to add when auto-renewal is triggered. Set to 0 to use the package default.
package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
proxy_password
string
Optional
Password used by the customer to authenticate proxy connections. Auto-generated by default — change only if a custom value is needed. Must be between 4 and 64 characters.
proxy_password_reset
string
Optional
Timestamp of the last proxy password change. Read-only — updated automatically whenever the password is rotated.
pools
string[]
Optional
Private proxy pools assigned to this order. Pools restrict which proxy IPs are available to this customer. Leave blank to use the full provider pool.
data
number
Optional
Total data allowance for this order in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Integer bytes. Root order: sum of usable ledger balances, not data minus data_spent. Virtual child order: max(data - data_spent, 0), a personal quota that does not guarantee the parent still has usable data.
data_spent
number
Optional
Total bytes consumed from this order's data allowance so far. Updated in real time as the customer uses the proxy.
ledgers
DataLedger[]
Required
Usable, non-expired ledger balances for a purchased root order; empty for a virtual child order using its parent's pool. Not a complete history. Array position does not identify the active ledger or spending order.
typeDataLedger6fields

A purchased data bucket, not a complete transaction history. Finite purchases with an expiration have separate buckets. Compatible non-expiring top-ups and unlimited packages may reuse an existing bucket.

id
string
Required
—
data
number
Required
Total data allocated to this ledger entry in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Bytes still available for consumption from this ledger entry. Decremented in FIFO order as the customer uses the proxy. When this reaches zero the entry is exhausted.
expires
string
Required
Date and time when this ledger entry expires and any remaining data is forfeited. Leave blank for entries that do not expire.
updated
string
Required
—
created
string
Required
—
latest_data_top_up
number
Optional
Amount of data added to this order in bytes during the most recent top-up.
latest_data_top_up_date
string
Optional
Timestamp of the most recent data top-up, set when an invoice is fulfilled.
data_updated
string
Required
—
updated
string
Required
—
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "conflict"The operation conflicts with the current resource or idempotency state.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.users.createWithResponse(options): Promise<ApiResponse<UsersCreateResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

get()

Get a user

Returns a user that is visible within the caller's account scope.

Signature

Promiseclient.users.get(options: UsersGetOptions): Promise<UsersGetResponse>

Parameters

NameTypeRequirementDescription
idstringRequiredA UUID string identifying this user.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.users.get({
id: "550e8400-e29b-41d4-a716-446655440000"
});

Returns

User

The operation completed successfully.

typeUser43fields

Customer account with contact details, security settings, package data, referral information, and managed sub-users visible to the caller.

id
string
Required
—
username
string
Required
Value must contain only letters, numbers, and underscores. It must not start or end with an underscore.
email
string
Required
—
is_reseller
boolean
Optional
Reseller can create sub-users and manage their data.
is_marketer
boolean
Optional
Marketer can manage marketing campaigns and view analytics.
is_superuser
boolean
Optional
Designates that this user has all permissions without explicitly assigning them.
date_joined
string
Required
—
date_joined_ts
number
Required
Timestamp of when the user joined
first_name
string
Optional
—
last_name
string
Optional
—
balance
number
Optional
—
language
LanguageEnum
Optional
—
enumLanguageEnum0fields

* `en` - EN * `de` - DE * `fr` - FR * `it` - IT * `ru` - RU

No fields.

country
string
Optional
—
state
string
Optional
—
city
string
Optional
—
address
string
Optional
—
zip
string
Optional
—
company_name
string
Optional
—
company_address
string
Optional
—
company_city
string
Optional
—
company_postal_code
string
Optional
—
company_country
string
Optional
—
company_vat_number
string
Optional
—
allowed_ips
string[]
Required
List of IP addresses allowed for this user
blocked_domains
string[]
Required
List of domains blocked for this user
connection_limit
number
Optional
The maximum number of concurrent connections allowed for this package.
parent_id
string
Required
ID of the parent user (for sub-accounts)
sub_users
number
Required
Number of sub-users managed by this reseller
referrals
number
Required
Number of users referred by this user
referral_id
string
Optional
—
referral_code
string
Required
—
referral_data_earned
number
Required
—
referral_data_pending
number
Required
—
referral_balance_pending
number
Required
—
referral_balance_earned
number
Required
—
currency
UserCurrency
Required
Currency information for the user's transactions
typeUserCurrency2fields
code
string
Required
—
symbol
string
Required
—
coupons
CouponShort[]
Required
Available coupons for this user
typeCouponShort14fields
id
string
Optional
—
is_expired
boolean
Required
—
is_redeemed
boolean
Required
—
packages
PackageShort[]
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
created
string
Required
—
value
number
Required
Arbitrary coupon value
code
string
Required
Leaving this field empty will generate a random code.
is_multi_use
boolean
Optional
If true, coupon can be used multiple times.
is_available_to_one_time
boolean
Optional
If true, coupon can not be used for one-time package tiers.
type
CouponTypeEnum
Required
—
enumCouponTypeEnum0fields

* `free_data` - Free Data * `monetary` - Money * `percentage` - Percentage

No fields.

limit
number
Optional
Number of times coupon can be used
valid_until
string
Optional
Leave empty for coupons that never expire
marketer
string
Optional
The marketer who owns this coupon. Required if is_marketer is true.
user
string
Required
The user who created this coupon.
data
number
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
data_spent
number
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
data_updated
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
proxy_password
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
proxy_password_reset
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
orders
Order[]
Optional
The user's package orders, including inactive orders. Each order contains its own data allowance, usage, ledgers, and proxy credentials. An empty list means the user has no orders.
typeOrder17fields
id
string
Optional
—
is_auto_renewal
boolean
Required
—
auto_renewal_percentage
number
Optional
When this percentage of the data allowance has been consumed, the order is automatically renewed if the user has sufficient balance. Set to 0 to disable auto-renewal. 80 → renew when 80% of data is used
auto_renewal_data
number
Optional
Amount of data in GB to add when auto-renewal is triggered. Set to 0 to use the package default.
package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
proxy_password
string
Optional
Password used by the customer to authenticate proxy connections. Auto-generated by default — change only if a custom value is needed. Must be between 4 and 64 characters.
proxy_password_reset
string
Optional
Timestamp of the last proxy password change. Read-only — updated automatically whenever the password is rotated.
pools
string[]
Optional
Private proxy pools assigned to this order. Pools restrict which proxy IPs are available to this customer. Leave blank to use the full provider pool.
data
number
Optional
Total data allowance for this order in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Integer bytes. Root order: sum of usable ledger balances, not data minus data_spent. Virtual child order: max(data - data_spent, 0), a personal quota that does not guarantee the parent still has usable data.
data_spent
number
Optional
Total bytes consumed from this order's data allowance so far. Updated in real time as the customer uses the proxy.
ledgers
DataLedger[]
Required
Usable, non-expired ledger balances for a purchased root order; empty for a virtual child order using its parent's pool. Not a complete history. Array position does not identify the active ledger or spending order.
typeDataLedger6fields

A purchased data bucket, not a complete transaction history. Finite purchases with an expiration have separate buckets. Compatible non-expiring top-ups and unlimited packages may reuse an existing bucket.

id
string
Required
—
data
number
Required
Total data allocated to this ledger entry in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Bytes still available for consumption from this ledger entry. Decremented in FIFO order as the customer uses the proxy. When this reaches zero the entry is exhausted.
expires
string
Required
Date and time when this ledger entry expires and any remaining data is forfeited. Leave blank for entries that do not expire.
updated
string
Required
—
created
string
Required
—
latest_data_top_up
number
Optional
Amount of data added to this order in bytes during the most recent top-up.
latest_data_top_up_date
string
Optional
Timestamp of the most recent data top-up, set when an invoice is fulfilled.
data_updated
string
Required
—
updated
string
Required
—
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.users.getWithResponse(options): Promise<ApiResponse<UsersGetResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

update()

Update a user

Updates selected fields for a visible user and returns the latest account state.

Signature

Promiseclient.users.update(options: UsersUpdateOptions): Promise<UsersUpdateResponse>

Parameters

NameTypeRequirementDescription
idstringRequiredA UUID string identifying this user.
ifMatchstringOptionalStrong ETag from the latest representation of this resource.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodyPatchedUserUpdateRequestOptional—

Example

const result = await client.users.update({
id: "550e8400-e29b-41d4-a716-446655440000",
body: {}
});

Returns

User

The request was accepted and the updated resource is returned.

typeUser43fields

Customer account with contact details, security settings, package data, referral information, and managed sub-users visible to the caller.

id
string
Required
—
username
string
Required
Value must contain only letters, numbers, and underscores. It must not start or end with an underscore.
email
string
Required
—
is_reseller
boolean
Optional
Reseller can create sub-users and manage their data.
is_marketer
boolean
Optional
Marketer can manage marketing campaigns and view analytics.
is_superuser
boolean
Optional
Designates that this user has all permissions without explicitly assigning them.
date_joined
string
Required
—
date_joined_ts
number
Required
Timestamp of when the user joined
first_name
string
Optional
—
last_name
string
Optional
—
balance
number
Optional
—
language
LanguageEnum
Optional
—
enumLanguageEnum0fields

* `en` - EN * `de` - DE * `fr` - FR * `it` - IT * `ru` - RU

No fields.

country
string
Optional
—
state
string
Optional
—
city
string
Optional
—
address
string
Optional
—
zip
string
Optional
—
company_name
string
Optional
—
company_address
string
Optional
—
company_city
string
Optional
—
company_postal_code
string
Optional
—
company_country
string
Optional
—
company_vat_number
string
Optional
—
allowed_ips
string[]
Required
List of IP addresses allowed for this user
blocked_domains
string[]
Required
List of domains blocked for this user
connection_limit
number
Optional
The maximum number of concurrent connections allowed for this package.
parent_id
string
Required
ID of the parent user (for sub-accounts)
sub_users
number
Required
Number of sub-users managed by this reseller
referrals
number
Required
Number of users referred by this user
referral_id
string
Optional
—
referral_code
string
Required
—
referral_data_earned
number
Required
—
referral_data_pending
number
Required
—
referral_balance_pending
number
Required
—
referral_balance_earned
number
Required
—
currency
UserCurrency
Required
Currency information for the user's transactions
typeUserCurrency2fields
code
string
Required
—
symbol
string
Required
—
coupons
CouponShort[]
Required
Available coupons for this user
typeCouponShort14fields
id
string
Optional
—
is_expired
boolean
Required
—
is_redeemed
boolean
Required
—
packages
PackageShort[]
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
created
string
Required
—
value
number
Required
Arbitrary coupon value
code
string
Required
Leaving this field empty will generate a random code.
is_multi_use
boolean
Optional
If true, coupon can be used multiple times.
is_available_to_one_time
boolean
Optional
If true, coupon can not be used for one-time package tiers.
type
CouponTypeEnum
Required
—
enumCouponTypeEnum0fields

* `free_data` - Free Data * `monetary` - Money * `percentage` - Percentage

No fields.

limit
number
Optional
Number of times coupon can be used
valid_until
string
Optional
Leave empty for coupons that never expire
marketer
string
Optional
The marketer who owns this coupon. Required if is_marketer is true.
user
string
Required
The user who created this coupon.
data
number
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
data_spent
number
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
data_updated
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
proxy_password
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
proxy_password_reset
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
orders
Order[]
Optional
The user's package orders, including inactive orders. Each order contains its own data allowance, usage, ledgers, and proxy credentials. An empty list means the user has no orders.
typeOrder17fields
id
string
Optional
—
is_auto_renewal
boolean
Required
—
auto_renewal_percentage
number
Optional
When this percentage of the data allowance has been consumed, the order is automatically renewed if the user has sufficient balance. Set to 0 to disable auto-renewal. 80 → renew when 80% of data is used
auto_renewal_data
number
Optional
Amount of data in GB to add when auto-renewal is triggered. Set to 0 to use the package default.
package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
proxy_password
string
Optional
Password used by the customer to authenticate proxy connections. Auto-generated by default — change only if a custom value is needed. Must be between 4 and 64 characters.
proxy_password_reset
string
Optional
Timestamp of the last proxy password change. Read-only — updated automatically whenever the password is rotated.
pools
string[]
Optional
Private proxy pools assigned to this order. Pools restrict which proxy IPs are available to this customer. Leave blank to use the full provider pool.
data
number
Optional
Total data allowance for this order in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Integer bytes. Root order: sum of usable ledger balances, not data minus data_spent. Virtual child order: max(data - data_spent, 0), a personal quota that does not guarantee the parent still has usable data.
data_spent
number
Optional
Total bytes consumed from this order's data allowance so far. Updated in real time as the customer uses the proxy.
ledgers
DataLedger[]
Required
Usable, non-expired ledger balances for a purchased root order; empty for a virtual child order using its parent's pool. Not a complete history. Array position does not identify the active ledger or spending order.
typeDataLedger6fields

A purchased data bucket, not a complete transaction history. Finite purchases with an expiration have separate buckets. Compatible non-expiring top-ups and unlimited packages may reuse an existing bucket.

id
string
Required
—
data
number
Required
Total data allocated to this ledger entry in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Bytes still available for consumption from this ledger entry. Decremented in FIFO order as the customer uses the proxy. When this reaches zero the entry is exhausted.
expires
string
Required
Date and time when this ledger entry expires and any remaining data is forfeited. Leave blank for entries that do not expire.
updated
string
Required
—
created
string
Required
—
latest_data_top_up
number
Optional
Amount of data added to this order in bytes during the most recent top-up.
latest_data_top_up_date
string
Optional
Timestamp of the most recent data top-up, set when an invoice is fulfilled.
data_updated
string
Required
—
updated
string
Required
—
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "precondition"A required resource precondition is no longer satisfied.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.users.updateWithResponse(options): Promise<ApiResponse<UsersUpdateResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

delete()

Delete a user

Deletes a user that the authenticated account is allowed to manage.

Signature

Promiseclient.users.delete(options: UsersDeleteOptions): Promise<UsersDeleteResponse>

Parameters

NameTypeRequirementDescription
idstringRequiredA UUID string identifying this user.
idempotencyKeystringOptionalStable key for one logical mutation. Successful responses are replayable for 24 hours; reusing a key with a different request fails.
ifMatchstringOptionalStrong ETag from the latest representation of this resource.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.users.delete({
id: "550e8400-e29b-41d4-a716-446655440000"
});

Returns

void

No response body

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "conflict"The operation conflicts with the current resource or idempotency state.
  • kind: "precondition"A required resource precondition is no longer satisfied.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.users.deleteWithResponse(options): Promise<ApiResponse<UsersDeleteResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

addData()

Add data to a sub-user order

Adds data integer bytes to a managed sub-user's virtual quota for package_id and returns the updated order. Both fields are required. The caller must own a root order for this package and the target sub-user. Creates the child order if absent; an existing independently purchased order cannot be converted by this operation. The allocation does not reserve or debit the parent's ledger, and may exceed its remaining data. Actual traffic needs both personal quota and a usable parent pool. Use Idempotency-Key to avoid granting the same quota twice.

Signature

Promiseclient.users.addData(options: UsersAddDataOptions): Promise<UsersAddDataResponse>

Parameters

NameTypeRequirementDescription
idstringRequiredA UUID string identifying this user.
idempotencyKeystringOptionalStable key for one logical mutation. Successful responses are replayable for 24 hours; reusing a key with a different request fails.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodyAddDataRequestRequired—

Example

const result = await client.users.addData({
id: "550e8400-e29b-41d4-a716-446655440000",
body: {
"package_id": "550e8400-e29b-41d4-a716-446655440000",
"data": 1073741824
}
});

Returns

Order

The request was accepted and the updated resource is returned.

typeOrder17fields
id
string
Optional
—
is_auto_renewal
boolean
Required
—
auto_renewal_percentage
number
Optional
When this percentage of the data allowance has been consumed, the order is automatically renewed if the user has sufficient balance. Set to 0 to disable auto-renewal. 80 → renew when 80% of data is used
auto_renewal_data
number
Optional
Amount of data in GB to add when auto-renewal is triggered. Set to 0 to use the package default.
package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
proxy_password
string
Optional
Password used by the customer to authenticate proxy connections. Auto-generated by default — change only if a custom value is needed. Must be between 4 and 64 characters.
proxy_password_reset
string
Optional
Timestamp of the last proxy password change. Read-only — updated automatically whenever the password is rotated.
pools
string[]
Optional
Private proxy pools assigned to this order. Pools restrict which proxy IPs are available to this customer. Leave blank to use the full provider pool.
data
number
Optional
Total data allowance for this order in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Integer bytes. Root order: sum of usable ledger balances, not data minus data_spent. Virtual child order: max(data - data_spent, 0), a personal quota that does not guarantee the parent still has usable data.
data_spent
number
Optional
Total bytes consumed from this order's data allowance so far. Updated in real time as the customer uses the proxy.
ledgers
DataLedger[]
Required
Usable, non-expired ledger balances for a purchased root order; empty for a virtual child order using its parent's pool. Not a complete history. Array position does not identify the active ledger or spending order.
typeDataLedger6fields

A purchased data bucket, not a complete transaction history. Finite purchases with an expiration have separate buckets. Compatible non-expiring top-ups and unlimited packages may reuse an existing bucket.

id
string
Required
—
data
number
Required
Total data allocated to this ledger entry in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Bytes still available for consumption from this ledger entry. Decremented in FIFO order as the customer uses the proxy. When this reaches zero the entry is exhausted.
expires
string
Required
Date and time when this ledger entry expires and any remaining data is forfeited. Leave blank for entries that do not expire.
updated
string
Required
—
created
string
Required
—
latest_data_top_up
number
Optional
Amount of data added to this order in bytes during the most recent top-up.
latest_data_top_up_date
string
Optional
Timestamp of the most recent data top-up, set when an invoice is fulfilled.
data_updated
string
Required
—
updated
string
Required
—
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "conflict"The operation conflicts with the current resource or idempotency state.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.users.addDataWithResponse(options): Promise<ApiResponse<UsersAddDataResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

resetData()

Reset a user's remaining data

Atomically resets remaining data to zero for package_id, including zero or negative balances. Supply package_id only; data is not accepted. System administrators may reset any user; other accounts may reset only their direct children. Purchased root orders have their ledger balances cleared; virtual child orders have their quota set to usage without changing the parent's pool. Usage history and invoices are preserved. Unlimited packages are rejected. Use Idempotency-Key for safe retries so a repeated request cannot clear a subsequent top-up.

Signature

Promiseclient.users.resetData(options: UsersResetDataOptions): Promise<UsersResetDataResponse>

Parameters

NameTypeRequirementDescription
idstringRequiredA UUID string identifying this user.
idempotencyKeystringOptionalStable key for one logical mutation. Successful responses are replayable for 24 hours; reusing a key with a different request fails.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodyResetDataRequestRequired—

Example

const result = await client.users.resetData({
id: "550e8400-e29b-41d4-a716-446655440000",
body: {
"package_id": "550e8400-e29b-41d4-a716-446655440000"
}
});

Returns

Order

The request was accepted and the updated resource is returned.

typeOrder17fields
id
string
Optional
—
is_auto_renewal
boolean
Required
—
auto_renewal_percentage
number
Optional
When this percentage of the data allowance has been consumed, the order is automatically renewed if the user has sufficient balance. Set to 0 to disable auto-renewal. 80 → renew when 80% of data is used
auto_renewal_data
number
Optional
Amount of data in GB to add when auto-renewal is triggered. Set to 0 to use the package default.
package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
proxy_password
string
Optional
Password used by the customer to authenticate proxy connections. Auto-generated by default — change only if a custom value is needed. Must be between 4 and 64 characters.
proxy_password_reset
string
Optional
Timestamp of the last proxy password change. Read-only — updated automatically whenever the password is rotated.
pools
string[]
Optional
Private proxy pools assigned to this order. Pools restrict which proxy IPs are available to this customer. Leave blank to use the full provider pool.
data
number
Optional
Total data allowance for this order in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Integer bytes. Root order: sum of usable ledger balances, not data minus data_spent. Virtual child order: max(data - data_spent, 0), a personal quota that does not guarantee the parent still has usable data.
data_spent
number
Optional
Total bytes consumed from this order's data allowance so far. Updated in real time as the customer uses the proxy.
ledgers
DataLedger[]
Required
Usable, non-expired ledger balances for a purchased root order; empty for a virtual child order using its parent's pool. Not a complete history. Array position does not identify the active ledger or spending order.
typeDataLedger6fields

A purchased data bucket, not a complete transaction history. Finite purchases with an expiration have separate buckets. Compatible non-expiring top-ups and unlimited packages may reuse an existing bucket.

id
string
Required
—
data
number
Required
Total data allocated to this ledger entry in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Bytes still available for consumption from this ledger entry. Decremented in FIFO order as the customer uses the proxy. When this reaches zero the entry is exhausted.
expires
string
Required
Date and time when this ledger entry expires and any remaining data is forfeited. Leave blank for entries that do not expire.
updated
string
Required
—
created
string
Required
—
latest_data_top_up
number
Optional
Amount of data added to this order in bytes during the most recent top-up.
latest_data_top_up_date
string
Optional
Timestamp of the most recent data top-up, set when an invoice is fulfilled.
data_updated
string
Required
—
updated
string
Required
—
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "conflict"The operation conflicts with the current resource or idempotency state.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.users.resetDataWithResponse(options): Promise<ApiResponse<UsersResetDataResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

subtractData()

Subtract data from a sub-user order

Subtracts data from the assigned quota of a managed virtual child order in integer bytes for package_id. Both fields are required. This is not a refund or a transfer back into the parent's ledger, and does not erase data_spent. The amount cannot exceed the total assigned data; reducing the quota below usage can stop the child's access. An independently purchased order is not managed through this allocation endpoint. Use Idempotency-Key for safe retries.

Signature

Promiseclient.users.subtractData(options: UsersSubtractDataOptions): Promise<UsersSubtractDataResponse>

Parameters

NameTypeRequirementDescription
idstringRequiredA UUID string identifying this user.
idempotencyKeystringOptionalStable key for one logical mutation. Successful responses are replayable for 24 hours; reusing a key with a different request fails.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodySubtractDataRequestRequired—

Example

const result = await client.users.subtractData({
id: "550e8400-e29b-41d4-a716-446655440000",
body: {
"package_id": "550e8400-e29b-41d4-a716-446655440000",
"data": 1073741824
}
});

Returns

Order

The request was accepted and the updated resource is returned.

typeOrder17fields
id
string
Optional
—
is_auto_renewal
boolean
Required
—
auto_renewal_percentage
number
Optional
When this percentage of the data allowance has been consumed, the order is automatically renewed if the user has sufficient balance. Set to 0 to disable auto-renewal. 80 → renew when 80% of data is used
auto_renewal_data
number
Optional
Amount of data in GB to add when auto-renewal is triggered. Set to 0 to use the package default.
package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
proxy_password
string
Optional
Password used by the customer to authenticate proxy connections. Auto-generated by default — change only if a custom value is needed. Must be between 4 and 64 characters.
proxy_password_reset
string
Optional
Timestamp of the last proxy password change. Read-only — updated automatically whenever the password is rotated.
pools
string[]
Optional
Private proxy pools assigned to this order. Pools restrict which proxy IPs are available to this customer. Leave blank to use the full provider pool.
data
number
Optional
Total data allowance for this order in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Integer bytes. Root order: sum of usable ledger balances, not data minus data_spent. Virtual child order: max(data - data_spent, 0), a personal quota that does not guarantee the parent still has usable data.
data_spent
number
Optional
Total bytes consumed from this order's data allowance so far. Updated in real time as the customer uses the proxy.
ledgers
DataLedger[]
Required
Usable, non-expired ledger balances for a purchased root order; empty for a virtual child order using its parent's pool. Not a complete history. Array position does not identify the active ledger or spending order.
typeDataLedger6fields

A purchased data bucket, not a complete transaction history. Finite purchases with an expiration have separate buckets. Compatible non-expiring top-ups and unlimited packages may reuse an existing bucket.

id
string
Required
—
data
number
Required
Total data allocated to this ledger entry in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Bytes still available for consumption from this ledger entry. Decremented in FIFO order as the customer uses the proxy. When this reaches zero the entry is exhausted.
expires
string
Required
Date and time when this ledger entry expires and any remaining data is forfeited. Leave blank for entries that do not expire.
updated
string
Required
—
created
string
Required
—
latest_data_top_up
number
Optional
Amount of data added to this order in bytes during the most recent top-up.
latest_data_top_up_date
string
Optional
Timestamp of the most recent data top-up, set when an invoice is fulfilled.
data_updated
string
Required
—
updated
string
Required
—
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "conflict"The operation conflicts with the current resource or idempotency state.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.users.subtractDataWithResponse(options): Promise<ApiResponse<UsersSubtractDataResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

listOrders()

List a sub-user's orders

Returns the selected user's package orders, including inactive orders. A user may have a purchased root order with its own ledgers or a virtual child order whose quota uses its parent's pool. User ownership and order ownership are different: being a sub-user does not imply shared-pool accounting.

Signature

Promiseclient.users.listOrders(options: UsersListOrdersOptions): Promise<UsersListOrdersResponse>

Parameters

NameTypeRequirementDescription
emailstringOptional—
idPathstringRequiredA UUID string identifying this user.
idQuerystringOptional—
limitnumberOptionalNumber of results to return per page.
offsetnumberOptionalThe initial index from which to return the results.
orderingstringOptionalWhich field to use when ordering the results.
usernamestringOptional—
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.users.listOrders({
idPath: "550e8400-e29b-41d4-a716-446655440000"
});

Returns

PaginatedOrderList

The operation completed successfully.

typePaginatedOrderList4fields
count
number
Required
—
next
string
Optional
—
previous
string
Optional
—
results
Order[]
Required
—
typeOrder17fields
id
string
Optional
—
is_auto_renewal
boolean
Required
—
auto_renewal_percentage
number
Optional
When this percentage of the data allowance has been consumed, the order is automatically renewed if the user has sufficient balance. Set to 0 to disable auto-renewal. 80 → renew when 80% of data is used
auto_renewal_data
number
Optional
Amount of data in GB to add when auto-renewal is triggered. Set to 0 to use the package default.
package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
proxy_password
string
Optional
Password used by the customer to authenticate proxy connections. Auto-generated by default — change only if a custom value is needed. Must be between 4 and 64 characters.
proxy_password_reset
string
Optional
Timestamp of the last proxy password change. Read-only — updated automatically whenever the password is rotated.
pools
string[]
Optional
Private proxy pools assigned to this order. Pools restrict which proxy IPs are available to this customer. Leave blank to use the full provider pool.
data
number
Optional
Total data allowance for this order in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Integer bytes. Root order: sum of usable ledger balances, not data minus data_spent. Virtual child order: max(data - data_spent, 0), a personal quota that does not guarantee the parent still has usable data.
data_spent
number
Optional
Total bytes consumed from this order's data allowance so far. Updated in real time as the customer uses the proxy.
ledgers
DataLedger[]
Required
Usable, non-expired ledger balances for a purchased root order; empty for a virtual child order using its parent's pool. Not a complete history. Array position does not identify the active ledger or spending order.
typeDataLedger6fields

A purchased data bucket, not a complete transaction history. Finite purchases with an expiration have separate buckets. Compatible non-expiring top-ups and unlimited packages may reuse an existing bucket.

id
string
Required
—
data
number
Required
Total data allocated to this ledger entry in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Bytes still available for consumption from this ledger entry. Decremented in FIFO order as the customer uses the proxy. When this reaches zero the entry is exhausted.
expires
string
Required
Date and time when this ledger entry expires and any remaining data is forfeited. Leave blank for entries that do not expire.
updated
string
Required
—
created
string
Required
—
latest_data_top_up
number
Optional
Amount of data added to this order in bytes during the most recent top-up.
latest_data_top_up_date
string
Optional
Timestamp of the most recent data top-up, set when an invoice is fulfilled.
data_updated
string
Required
—
updated
string
Required
—
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.users.listOrdersWithResponse(options): Promise<ApiResponse<UsersListOrdersResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

resetPassword()

Rotate a sub-user proxy password

Rotates the proxy password for the selected user's package order. Send package_id to select the affected order.

Signature

Promiseclient.users.resetPassword(options: UsersResetPasswordOptions): Promise<UsersResetPasswordResponse>

Parameters

NameTypeRequirementDescription
idstringRequiredA UUID string identifying this user.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodyUserPasswordResetRequestRequestRequired—

Example

const result = await client.users.resetPassword({
id: "550e8400-e29b-41d4-a716-446655440000",
body: {}
});

Returns

User

The request was accepted and the updated resource is returned.

typeUser43fields

Customer account with contact details, security settings, package data, referral information, and managed sub-users visible to the caller.

id
string
Required
—
username
string
Required
Value must contain only letters, numbers, and underscores. It must not start or end with an underscore.
email
string
Required
—
is_reseller
boolean
Optional
Reseller can create sub-users and manage their data.
is_marketer
boolean
Optional
Marketer can manage marketing campaigns and view analytics.
is_superuser
boolean
Optional
Designates that this user has all permissions without explicitly assigning them.
date_joined
string
Required
—
date_joined_ts
number
Required
Timestamp of when the user joined
first_name
string
Optional
—
last_name
string
Optional
—
balance
number
Optional
—
language
LanguageEnum
Optional
—
enumLanguageEnum0fields

* `en` - EN * `de` - DE * `fr` - FR * `it` - IT * `ru` - RU

No fields.

country
string
Optional
—
state
string
Optional
—
city
string
Optional
—
address
string
Optional
—
zip
string
Optional
—
company_name
string
Optional
—
company_address
string
Optional
—
company_city
string
Optional
—
company_postal_code
string
Optional
—
company_country
string
Optional
—
company_vat_number
string
Optional
—
allowed_ips
string[]
Required
List of IP addresses allowed for this user
blocked_domains
string[]
Required
List of domains blocked for this user
connection_limit
number
Optional
The maximum number of concurrent connections allowed for this package.
parent_id
string
Required
ID of the parent user (for sub-accounts)
sub_users
number
Required
Number of sub-users managed by this reseller
referrals
number
Required
Number of users referred by this user
referral_id
string
Optional
—
referral_code
string
Required
—
referral_data_earned
number
Required
—
referral_data_pending
number
Required
—
referral_balance_pending
number
Required
—
referral_balance_earned
number
Required
—
currency
UserCurrency
Required
Currency information for the user's transactions
typeUserCurrency2fields
code
string
Required
—
symbol
string
Required
—
coupons
CouponShort[]
Required
Available coupons for this user
typeCouponShort14fields
id
string
Optional
—
is_expired
boolean
Required
—
is_redeemed
boolean
Required
—
packages
PackageShort[]
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
created
string
Required
—
value
number
Required
Arbitrary coupon value
code
string
Required
Leaving this field empty will generate a random code.
is_multi_use
boolean
Optional
If true, coupon can be used multiple times.
is_available_to_one_time
boolean
Optional
If true, coupon can not be used for one-time package tiers.
type
CouponTypeEnum
Required
—
enumCouponTypeEnum0fields

* `free_data` - Free Data * `monetary` - Money * `percentage` - Percentage

No fields.

limit
number
Optional
Number of times coupon can be used
valid_until
string
Optional
Leave empty for coupons that never expire
marketer
string
Optional
The marketer who owns this coupon. Required if is_marketer is true.
user
string
Required
The user who created this coupon.
data
number
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
data_spent
number
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
data_updated
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
proxy_password
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
proxy_password_reset
string
Optional
Present only when SITE_PACKAGE_BASED_AUTH is disabled.
orders
Order[]
Optional
The user's package orders, including inactive orders. Each order contains its own data allowance, usage, ledgers, and proxy credentials. An empty list means the user has no orders.
typeOrder17fields
id
string
Optional
—
is_auto_renewal
boolean
Required
—
auto_renewal_percentage
number
Optional
When this percentage of the data allowance has been consumed, the order is automatically renewed if the user has sufficient balance. Set to 0 to disable auto-renewal. 80 → renew when 80% of data is used
auto_renewal_data
number
Optional
Amount of data in GB to add when auto-renewal is triggered. Set to 0 to use the package default.
package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
proxy_password
string
Optional
Password used by the customer to authenticate proxy connections. Auto-generated by default — change only if a custom value is needed. Must be between 4 and 64 characters.
proxy_password_reset
string
Optional
Timestamp of the last proxy password change. Read-only — updated automatically whenever the password is rotated.
pools
string[]
Optional
Private proxy pools assigned to this order. Pools restrict which proxy IPs are available to this customer. Leave blank to use the full provider pool.
data
number
Optional
Total data allowance for this order in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Integer bytes. Root order: sum of usable ledger balances, not data minus data_spent. Virtual child order: max(data - data_spent, 0), a personal quota that does not guarantee the parent still has usable data.
data_spent
number
Optional
Total bytes consumed from this order's data allowance so far. Updated in real time as the customer uses the proxy.
ledgers
DataLedger[]
Required
Usable, non-expired ledger balances for a purchased root order; empty for a virtual child order using its parent's pool. Not a complete history. Array position does not identify the active ledger or spending order.
typeDataLedger6fields

A purchased data bucket, not a complete transaction history. Finite purchases with an expiration have separate buckets. Compatible non-expiring top-ups and unlimited packages may reuse an existing bucket.

id
string
Required
—
data
number
Required
Total data allocated to this ledger entry in bytes. 1073741824 = 1 GiB 10737418240 = 10 GiB
data_remaining
number
Required
Bytes still available for consumption from this ledger entry. Decremented in FIFO order as the customer uses the proxy. When this reaches zero the entry is exhausted.
expires
string
Required
Date and time when this ledger entry expires and any remaining data is forfeited. Leave blank for entries that do not expire.
updated
string
Required
—
created
string
Required
—
latest_data_top_up
number
Optional
Amount of data added to this order in bytes during the most recent top-up.
latest_data_top_up_date
string
Optional
Timestamp of the most recent data top-up, set when an invoice is fulfilled.
data_updated
string
Required
—
updated
string
Required
—
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.users.resetPasswordWithResponse(options): Promise<ApiResponse<UsersResetPasswordResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.