/api/reseller/users/{userId}/edit
const url = 'https://dashboard.residential.rayobyte.com/api/reseller/users/9ee3d294-6f1e-489c-9b9b-e25e9a4e37a8/edit';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"status":"ACTIVE","description":"SERP scraping"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://dashboard.residential.rayobyte.com/api/reseller/users/9ee3d294-6f1e-489c-9b9b-e25e9a4e37a8/edit \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "status": "ACTIVE", "description": "SERP scraping" }'Edit Sub-user details
The API allows you to change some Sub-user data such as status, balance and description in a single API request. In the future, the API will also allow Sub-user passwords to be changed. The call accepts a JSON object with the fields status (available values are “ACTIVE” and “SUSPENDED”), balance (the value is set in kilobytes) and description. All fields are optional.
Note! In this API call, the “balance” field specifies the user’s final balance to be set, not the amount of traffic to be added.
Important! To activate/deactivate Sub-users, as well as to change their balances, it is recommended to use separate available API calls.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Proxy User ID
Example
9ee3d294-6f1e-489c-9b9b-e25e9a4e37a8Request Bodyrequired
Section titled “Request Bodyrequired”object
Sub-user status to be set.
Traffic balance ib Kb
Short description of the account.
Examples
Valid input example
{ "status": "ACTIVE", "description": "SERP scraping"}Passed status is invalid
{ "status": "ban"}Invalid authorization data (account does not exist or access token is expired)
Not authorized.Responses
Section titled “Responses”Proxy User account is successfully updated
object
Examples
Proxy User is successfully updated
{ "status": "SUCCESS", "date": "Mon, 1 Jan 2022 12:00:00 GMT"}Not authorized
Examples
Not authorized
Not authorized.API call failed
object
Examples
An unexpected error occurred while processing the request.
{ "status": "FAIL", "date": "Mon, 1 Jan 2022 12:00:00 GMT", "error": "Internal server error"}Was this page helpful?
Thanks — that helps us fix it.