Sub-Users

The link provided below directs to a page that elaborates on the concept of a sub-user within our system.

Sub-Users


It's important to note that almost every endpoint related to sub-users, with the notable exceptions of the index and delete endpoints, will return a Subuser resource upon a successful call.

SubuserResource
{
    "id": 5,
    "hash": "01HQ5K3P97DY8EX9Y90YT1K6XA",
    "username": "subuser_231",
    "password": "asffqwv2f3w4214v",
    "traffic_available": 0.25,
    "traffic_used": 0
}

Note that you should not use the id field. It is a legacy field that will be removed in the future.


When adding traffic to a sub-user through creation or updating, the traffic will be taken from the main account. Likewise, when you delete a sub-user or take traffic from a sub-user - it will be returned to the main user.


Create Sub-User

POST /residential-subusers

Body Parameters

NameTypeDescription

username

String

username of the subuser

password

String

password of the subuser

traffic

Float

traffic (GB) that will be assigned to the subuser

Get Sub-User

GET /residential-subusers/{ hash }

Query Parameters

NameTypeDescription

hash

String

hash of the subuser

Get Sub-Users

GET /residential-subusers

Query Parameters

NameTypeDescription

page

Integer

Number of the page

per_page

Integer

Number of subusers per page

search

String

Search that will be used to filter subusers by username

Update Sub-User

UPDATE /residential-subusers/{ hash }

Query Parameters

NameTypeDescription

hash

String

hash of the subuser

Body Parameters

NameTypeDescription

username

String

username of the subuser

password

String

password of the subuser

traffic

Float

traffic (GB) that will be assigned to the subuser

Delete Sub-User

DELETE /residential-subusers/{ hash }

Query Parameters

NameTypeDescription

hash

String

hash of the subuser

Add Traffic to Sub-User

POST /residential-subusers/{ hash }/give-traffic

Query Parameters

NameTypeDescription

hash

String

hash of the subuser

Body Parameters

NameTypeDescription

amount

Float

amount of traffic (GB) to give

Take Traffic From Sub-User

POST /residential-subusers/{ hash }/take-traffic

Query Parameters

NameTypeDescription

hash

String

hash of the subuser

Body Parameters

NameTypeDescription

amount

Float

amount of traffic (GB) to give

Last updated