> For the complete documentation index, see [llms.txt](https://docs.goproxies.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goproxies.com/proxies/resellers-api/getting-started/how-to-create-a-sub-user-via-goproxies-api.md).

# How to create a sub-user via GoProxies API?

To add an additional sub-user under your main user, you would need to use the auth token that you received from [login step](/proxies/resellers-api/getting-started/how-to-login-into-goproxies-api-and-list-your-current-sub-users.md#how-to-login-into-goproxies-api) and add it into this request. Example below:

```shellscript
curl -X POST https://api.goproxies.com/api/v1/reseller/subusers \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer {YOUR_TOKEN_FROM_LOGIN}" \
     -d '{"username": "MY_USER", "enabled": true, "traffic_limit_amount": 10, "period_seconds": 99999, "recurring": true}'
```

In this request these are variable options:

* `username` - replace `MY_USER` with the username that you want to give to your sub-user.
* `enabled` - `true/false`, if you want to the sub-user to be enabled to get traffic set to true if not - false.
* `traffic_limit_amount` - amount of traffic in GBs that the sub-user is allowed to use.
* `period_seconds` - how long the sub-user will be active in seconds.
* `recurring` - `true/false`, if you want sub-user to automatically renew once it expires due to `"period_seconds"` set it to true, otherwise to false.

Once a sub-user is created you will receive a similar output, which means the sub-user was successfully created:\
`{"enabled":true,"period_seconds":99999,"period_started_at":"2025-01-01T00:00:00.0Z","recurring":true,"secret":"b09bac352778f29sb1cb55ab255c6def","traffic_limit_amount":10,"traffic_limit_unit":"GB","traffic_used":0,"username":"MY_USER"}`

**Note:** Remember the "secret" provided, as it will serve as the password for directing proxy traffic via the sub-user.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.goproxies.com/proxies/resellers-api/getting-started/how-to-create-a-sub-user-via-goproxies-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
