Skip to main content
The sub-users endpoints let you create and manage sub-users programmatically: their proxy credentials, their traffic limits, and resetting their recorded usage. This is the API equivalent of managing sub-users in the dashboard. All requests go to https://api.nodemaven.com/api/v2/base/ and carry the header Authorization: x-api-key YOUR_API_KEY. See the NodeMaven API overview for the shared basics.

Endpoints

Creating a sub-user

SubUserCreateRequest:
The 9-character minimum applies to both the username and the password. An 8-character username is rejected. Only letters, digits and underscores are allowed in either field.

Traffic limits are in bytes, not GB

traffic_limit, used_traffic and traffic_limit_increment_bytes are all measured in bytes. Sending 10 does not mean 10 GB. It means 10 bytes. To save you the arithmetic:
A binary gigabyte is 1024³ bytes and a decimal gigabyte is 1000³ bytes.

Updating a sub-user

SubUserUpdateRequest:
traffic_limit and traffic_limit_increment_bytes are mutually exclusive. Send one or the other, never both in the same request. Use traffic_limit when you know the absolute figure you want, and traffic_limit_increment_bytes when you want to top up or claw back relative to whatever the limit is now.
For example, to raise a sub-user’s limit without needing to know what it currently is, send a positive traffic_limit_increment_bytes and omit traffic_limit entirely. To claw some back, send a negative value. Use the byte figures from the table above.

Deleting a sub-user

DELETE /sub-users/ takes the sub-user’s id as a query parameter, not in a body. The id is a uuid and it is required.
A successful delete returns 204, so no body comes back.
You cannot delete your own main account through this endpoint. Passing the main account’s ID returns a 400 with You can't delete your main user. The endpoint only removes sub-users.
Three things return a 400: A 404 means there is no sub-user with that ID.

Resetting usage

SubUserResetUsageRequest takes one field: Because ids is an array, one call resets several sub-users at once. You do not need to loop.
  • Sub-users covers what sub-users are for and how to manage them in the dashboard.