# 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/faq/general-questions/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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.goproxies.com/proxies/faq/general-questions/how-to-create-a-sub-user-via-goproxies-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
