Skip to content

Update a user

PATCH
/users/{id}
curl --request PATCH \
--url https://api.proxyrequest.com/api/v1/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "[email protected]", "first_name": "Dana", "last_name": "Morgan", "country": "us", "state": "state", "city": "los_angeles", "address": "address", "zip": "zip", "company_name": "company name", "company_country": "company country", "company_city": "company city", "company_address": "company address", "company_postal_code": "company postal code", "company_vat_number": "company vat number", "is_reseller": true, "blocked_domains": [ "blocked.example" ], "allowed_ips": [ "198.51.100.25" ], "connection_limit": 1, "new_password": "New-Secure-Password-43", "meta": {} }'

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

id
required
string format: uuid

A UUID string identifying this user.

Optional fields accepted when updating part of an existing customer account.

object
email

User’s email address. Must be unique across the system.

string format: email
>= 6 characters
first_name

User’s first name.

string
<= 128 characters
last_name

User’s last name.

string
<= 128 characters
country

User’s country of residence.

string
<= 128 characters
state

User’s state or province.

string
<= 128 characters
city

User’s city.

string
<= 128 characters
address

User’s street address.

string
<= 128 characters
zip

User’s postal/ZIP code.

string
<= 128 characters
company_name

Name of the user’s company.

string
<= 128 characters
company_country

Country where the company is located.

string
<= 128 characters
company_city

City where the company is located.

string
<= 128 characters
company_address

Company’s street address.

string
<= 128 characters
company_postal_code

Company’s postal code.

string
<= 128 characters
company_vat_number

Company’s VAT number.

string
<= 128 characters
is_reseller

Whether the user has reseller privileges. Only superusers can modify.

boolean
blocked_domains

List of domains to block for this user.

Array<string>
allowed_ips

List of IP addresses allowed for this user. Maximum 10 IPs.

Array<string>
connection_limit

Maximum number of concurrent connections allowed for the user.

integer
>= -1 <= 1000000
new_password

New password for the user. Must be 8-128 characters long.

string
>= 8 characters <= 128 characters
meta

Additional metadata for the user. Maximum 50 fields.

object
key
additional properties
Examples
Exampleexample

Example request

{
"email": "[email protected]",
"first_name": "Dana",
"last_name": "Morgan",
"country": "us",
"state": "state",
"city": "los_angeles",
"address": "address",
"zip": "zip",
"company_name": "company name",
"company_country": "company country",
"company_city": "company city",
"company_address": "company address",
"company_postal_code": "company postal code",
"company_vat_number": "company vat number",
"is_reseller": true,
"blocked_domains": [
"blocked.example"
],
"allowed_ips": [
"198.51.100.25"
],
"connection_limit": 1,
"new_password": "New-Secure-Password-43",
"meta": {}
}

The request was accepted and the updated resource is returned.

Media typeapplication/json

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

object
id
required
string format: uuid
username
required

Value must contain only letters, numbers, and underscores. It must not start or end with an underscore.

string
<= 150 characters
email
required
string format: email
<= 254 characters
is_reseller
Reseller

Reseller can create sub-users and manage their data.

boolean
is_marketer
Marketer

Marketer can manage marketing campaigns and view analytics.

boolean
is_superuser
Superuser status

Designates that this user has all permissions without explicitly assigning them.

boolean
date_joined
required
string format: date-time
date_joined_ts
required

Timestamp of when the user joined

integer
first_name
string
<= 150 characters
last_name
string
<= 150 characters
balance
integer
<= 2147483647
language
  • en - EN * de - DE * fr - FR * it - IT * ru - RU
string
Allowed values: en de fr it ru
country
string
<= 255 characters
state
string
<= 255 characters
city
string
<= 255 characters
address
string
<= 255 characters
zip
string
<= 255 characters
company_name
string
<= 255 characters
company_address
string
<= 255 characters
company_city
string
<= 255 characters
company_postal_code
string
<= 255 characters
company_country
string
<= 255 characters
company_vat_number
string
<= 255 characters
allowed_ips
required

List of IP addresses allowed for this user

Array<string>
blocked_domains
required

List of domains blocked for this user

Array<string>
connection_limit

The maximum number of concurrent connections allowed for this package.

integer
>= -1 <= 2147483647
parent_id
required

ID of the parent user (for sub-accounts)

string
sub_users
required

Number of sub-users managed by this reseller

integer
referrals
required

Number of users referred by this user

integer
referral_id
string
<= 255 characters
referral_code
required
string
referral_data_earned
required
integer
referral_data_pending
required
integer
referral_balance_pending
required
integer
referral_balance_earned
required
integer
currency
required

Currency information for the user’s transactions

object
key
additional properties
string
coupons
required

Available coupons for this user

Array<object>
object
key
additional properties
data
required

Available data allowance for the user

integer
nullable
data_spent
required

Amount of data consumed by the user

integer
nullable
data_updated
required

Last update timestamp for user’s data

string format: date-time
nullable
proxy_password
required

Proxy authentication password

string
nullable
proxy_password_reset
required

Last proxy password reset timestamp

string format: date-time
nullable
Examples
ExampleUpdatedUser

Updated user

{
"id": "550e8400-e29b-41d4-a716-446655440001",
"email": "[email protected]",
"username": "developer",
"first_name": "Dana",
"last_name": "Morgan",
"is_active": true,
"is_reseller": false,
"otp_enabled": true
}

The request is malformed or violates a business rule.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
translation

Stable translation key suitable for client localisation.

string
key
additional properties
One of:
string
Examples
ExampleValidationError

Validation error

{
"non_field_errors": [
"The request could not be processed."
],
"translation": "errors.request.invalid"
}

Authentication credentials are missing, expired, or invalid.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
translation

Stable translation key suitable for client localisation.

string
key
additional properties
One of:
string
Examples
ExampleAuthenticationRequired

Authentication required

{
"detail": "Authentication credentials were not provided."
}

The authenticated account cannot perform this operation.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
translation

Stable translation key suitable for client localisation.

string
key
additional properties
One of:
string
Examples
ExamplePermissionDenied

Permission denied

{
"detail": "You do not have permission to perform this action."
}

The requested resource does not exist in the current account scope.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
translation

Stable translation key suitable for client localisation.

string
key
additional properties
One of:
string
Examples
ExampleResourceNotFound

Resource not found

{
"detail": "Not found."
}