# Resellers

## List subusers

> Get a list of all subusers. Optionally filter by name to select a username.

````json
{"openapi":"3.0.3","info":{"title":"Resellers API specification","version":"1.0.0"},"servers":[{"url":"/"}],"security":[{"userBearerAuth":[]}],"components":{"securitySchemes":{"userBearerAuth":{"description":"Bearer authentication with sentinel token for users.\n\nYou can use the following command to get the bearer token:\n\n```\ncurl -d '{\"username\":\"<username>\", \"password\":\"<password>\"}' -H \"Content-Type: application/json\" -X POST -s https://api.goproxies.com/api/v1/login | jq -r '.token'\n```\n\nSubstitute `<username>` and `<password>` with your credentials.\n","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ResellerSubusers":{"properties":{"subusers":{"type":"array","items":{"$ref":"#/components/schemas/ResellerSubuser"}},"paging":{"$ref":"#/components/schemas/Paging"}},"required":["subusers","paging"]},"ResellerSubuser":{"properties":{"username":{"type":"string"},"enabled":{"type":"boolean"},"traffic_limit_amount":{"type":"number"},"traffic_limit_unit":{"type":"string"},"period_seconds":{"type":"integer"},"period_started_at":{"type":"string","format":"date-time"},"recurring":{"type":"boolean"},"traffic_used":{"type":"number"}},"required":["username","enabled","traffic_limit_amount","traffic_limit_unit","period_seconds","recurring","traffic_used"]},"Paging":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}},"required":["limit","offset"]},"Error":{"properties":{"error":{"$ref":"#/components/schemas/Err"},"status":{"type":"integer"},"path":{"type":"string"}}},"Err":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"detail":{"type":"string"},"fields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FieldError"}}}},"FieldError":{"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/reseller/subusers":{"get":{"summary":"List subusers","description":"Get a list of all subusers. Optionally filter by name to select a username.","operationId":"resellerGetSubusers","tags":["Resellers"],"parameters":[{"name":"username","in":"query","description":"Filter by username","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Limit the number of results","required":false,"schema":{"type":"integer","default":1000}},{"name":"offset","in":"query","description":"Offset the results","required":false,"schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResellerSubusers"}}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## Create a new subuser

> Create a subuser with optional limits. If limits are set the period starts at the time of the call.

````json
{"openapi":"3.0.3","info":{"title":"Resellers API specification","version":"1.0.0"},"servers":[{"url":"/"}],"security":[{"userBearerAuth":[]}],"components":{"securitySchemes":{"userBearerAuth":{"description":"Bearer authentication with sentinel token for users.\n\nYou can use the following command to get the bearer token:\n\n```\ncurl -d '{\"username\":\"<username>\", \"password\":\"<password>\"}' -H \"Content-Type: application/json\" -X POST -s https://api.goproxies.com/api/v1/login | jq -r '.token'\n```\n\nSubstitute `<username>` and `<password>` with your credentials.\n","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"NewResellerSubuser":{"properties":{"username":{"type":"string"},"enabled":{"type":"boolean"},"traffic_limit_amount":{"type":"number","description":"Traffic limit amount in GB"},"traffic_limit_unit":{"type":"string","description":"Traffic limit unit","deprecated":true},"period_seconds":{"type":"integer","description":"Traffic limit period in seconds"},"recurring":{"type":"boolean","description":"Whether the traffic limit is recurring"}},"required":["username"]},"ResellerSubuserWithSecret":{"properties":{"username":{"type":"string"},"enabled":{"type":"boolean"},"traffic_limit_amount":{"type":"number"},"traffic_limit_unit":{"type":"string"},"period_seconds":{"type":"integer"},"period_started_at":{"type":"string","format":"date-time"},"recurring":{"type":"boolean"},"traffic_used":{"type":"number"},"secret":{"type":"string"}},"required":["username","enabled","traffic_limit_amount","traffic_limit_unit","period_seconds","recurring","traffic_used","secret"]},"Error":{"properties":{"error":{"$ref":"#/components/schemas/Err"},"status":{"type":"integer"},"path":{"type":"string"}}},"Err":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"detail":{"type":"string"},"fields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FieldError"}}}},"FieldError":{"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/reseller/subusers":{"post":{"summary":"Create a new subuser","description":"Create a subuser with optional limits. If limits are set the period starts at the time of the call.","operationId":"resellerCreateSubuser","tags":["Resellers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewResellerSubuser"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResellerSubuserWithSecret"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## Get details for a subuser

> Get a details of a subuser e.g. statistics of traffic usage.

````json
{"openapi":"3.0.3","info":{"title":"Resellers API specification","version":"1.0.0"},"servers":[{"url":"/"}],"security":[{"userBearerAuth":[]}],"components":{"securitySchemes":{"userBearerAuth":{"description":"Bearer authentication with sentinel token for users.\n\nYou can use the following command to get the bearer token:\n\n```\ncurl -d '{\"username\":\"<username>\", \"password\":\"<password>\"}' -H \"Content-Type: application/json\" -X POST -s https://api.goproxies.com/api/v1/login | jq -r '.token'\n```\n\nSubstitute `<username>` and `<password>` with your credentials.\n","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ResellerSubuser":{"properties":{"username":{"type":"string"},"enabled":{"type":"boolean"},"traffic_limit_amount":{"type":"number"},"traffic_limit_unit":{"type":"string"},"period_seconds":{"type":"integer"},"period_started_at":{"type":"string","format":"date-time"},"recurring":{"type":"boolean"},"traffic_used":{"type":"number"}},"required":["username","enabled","traffic_limit_amount","traffic_limit_unit","period_seconds","recurring","traffic_used"]},"Error":{"properties":{"error":{"$ref":"#/components/schemas/Err"},"status":{"type":"integer"},"path":{"type":"string"}}},"Err":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"detail":{"type":"string"},"fields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FieldError"}}}},"FieldError":{"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/reseller/subusers/{username}":{"get":{"summary":"Get details for a subuser","description":"Get a details of a subuser e.g. statistics of traffic usage.","operationId":"resellerGetSubuser","tags":["Resellers"],"parameters":[{"name":"username","in":"path","description":"Subuser's username","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResellerSubuser"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## Update a subuser

> Update a subuser limits. Set all to 0 to remove them. If the user already has limits set, the period start time stays the same, otherwise it is set to the time of the call.

````json
{"openapi":"3.0.3","info":{"title":"Resellers API specification","version":"1.0.0"},"servers":[{"url":"/"}],"security":[{"userBearerAuth":[]}],"components":{"securitySchemes":{"userBearerAuth":{"description":"Bearer authentication with sentinel token for users.\n\nYou can use the following command to get the bearer token:\n\n```\ncurl -d '{\"username\":\"<username>\", \"password\":\"<password>\"}' -H \"Content-Type: application/json\" -X POST -s https://api.goproxies.com/api/v1/login | jq -r '.token'\n```\n\nSubstitute `<username>` and `<password>` with your credentials.\n","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ResellerSubuserUpdate":{"properties":{"traffic_limit_amount":{"type":"number","description":"Traffic limit amount in GB"},"traffic_limit_unit":{"type":"string","description":"Traffic limit unit","deprecated":true},"period_seconds":{"type":"integer","description":"Traffic limit period in seconds"},"recurring":{"type":"boolean","description":"Whether the traffic limit is recurring"}}},"ResellerSubuser":{"properties":{"username":{"type":"string"},"enabled":{"type":"boolean"},"traffic_limit_amount":{"type":"number"},"traffic_limit_unit":{"type":"string"},"period_seconds":{"type":"integer"},"period_started_at":{"type":"string","format":"date-time"},"recurring":{"type":"boolean"},"traffic_used":{"type":"number"}},"required":["username","enabled","traffic_limit_amount","traffic_limit_unit","period_seconds","recurring","traffic_used"]},"Error":{"properties":{"error":{"$ref":"#/components/schemas/Err"},"status":{"type":"integer"},"path":{"type":"string"}}},"Err":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"detail":{"type":"string"},"fields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FieldError"}}}},"FieldError":{"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/reseller/subusers/{username}":{"put":{"summary":"Update a subuser","description":"Update a subuser limits. Set all to 0 to remove them. If the user already has limits set, the period start time stays the same, otherwise it is set to the time of the call.","operationId":"resellerUpdateSubuser","tags":["Resellers"],"parameters":[{"name":"username","in":"path","description":"Subuser's username","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResellerSubuserUpdate"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResellerSubuser"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## DELETE /api/v1/reseller/subusers/{username}

> Delete a subuser

````json
{"openapi":"3.0.3","info":{"title":"Resellers API specification","version":"1.0.0"},"servers":[{"url":"/"}],"security":[{"userBearerAuth":[]}],"components":{"securitySchemes":{"userBearerAuth":{"description":"Bearer authentication with sentinel token for users.\n\nYou can use the following command to get the bearer token:\n\n```\ncurl -d '{\"username\":\"<username>\", \"password\":\"<password>\"}' -H \"Content-Type: application/json\" -X POST -s https://api.goproxies.com/api/v1/login | jq -r '.token'\n```\n\nSubstitute `<username>` and `<password>` with your credentials.\n","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Error":{"properties":{"error":{"$ref":"#/components/schemas/Err"},"status":{"type":"integer"},"path":{"type":"string"}}},"Err":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"detail":{"type":"string"},"fields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FieldError"}}}},"FieldError":{"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/reseller/subusers/{username}":{"delete":{"summary":"Delete a subuser","operationId":"resellerDeleteSubuser","tags":["Resellers"],"parameters":[{"name":"username","in":"path","description":"Subuser's username","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## Reset a subuser's limits

> Resets the current limit for an subuser, starting a new period. If a subuser has no limit this call will fail.

````json
{"openapi":"3.0.3","info":{"title":"Resellers API specification","version":"1.0.0"},"servers":[{"url":"/"}],"security":[{"userBearerAuth":[]}],"components":{"securitySchemes":{"userBearerAuth":{"description":"Bearer authentication with sentinel token for users.\n\nYou can use the following command to get the bearer token:\n\n```\ncurl -d '{\"username\":\"<username>\", \"password\":\"<password>\"}' -H \"Content-Type: application/json\" -X POST -s https://api.goproxies.com/api/v1/login | jq -r '.token'\n```\n\nSubstitute `<username>` and `<password>` with your credentials.\n","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ResellerSubuser":{"properties":{"username":{"type":"string"},"enabled":{"type":"boolean"},"traffic_limit_amount":{"type":"number"},"traffic_limit_unit":{"type":"string"},"period_seconds":{"type":"integer"},"period_started_at":{"type":"string","format":"date-time"},"recurring":{"type":"boolean"},"traffic_used":{"type":"number"}},"required":["username","enabled","traffic_limit_amount","traffic_limit_unit","period_seconds","recurring","traffic_used"]},"Error":{"properties":{"error":{"$ref":"#/components/schemas/Err"},"status":{"type":"integer"},"path":{"type":"string"}}},"Err":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"detail":{"type":"string"},"fields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FieldError"}}}},"FieldError":{"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/reseller/subusers/{username}/reset-limits":{"put":{"summary":"Reset a subuser's limits","description":"Resets the current limit for an subuser, starting a new period. If a subuser has no limit this call will fail.","operationId":"resellerResetSubuserLimits","tags":["Resellers"],"parameters":[{"name":"username","in":"path","description":"Subuser's username","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResellerSubuser"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## Reset a subuser's secret

> Reset a subuser's secret with a randomly generated password.

````json
{"openapi":"3.0.3","info":{"title":"Resellers API specification","version":"1.0.0"},"servers":[{"url":"/"}],"security":[{"userBearerAuth":[]}],"components":{"securitySchemes":{"userBearerAuth":{"description":"Bearer authentication with sentinel token for users.\n\nYou can use the following command to get the bearer token:\n\n```\ncurl -d '{\"username\":\"<username>\", \"password\":\"<password>\"}' -H \"Content-Type: application/json\" -X POST -s https://api.goproxies.com/api/v1/login | jq -r '.token'\n```\n\nSubstitute `<username>` and `<password>` with your credentials.\n","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ResellerSubuserWithSecret":{"properties":{"username":{"type":"string"},"enabled":{"type":"boolean"},"traffic_limit_amount":{"type":"number"},"traffic_limit_unit":{"type":"string"},"period_seconds":{"type":"integer"},"period_started_at":{"type":"string","format":"date-time"},"recurring":{"type":"boolean"},"traffic_used":{"type":"number"},"secret":{"type":"string"}},"required":["username","enabled","traffic_limit_amount","traffic_limit_unit","period_seconds","recurring","traffic_used","secret"]},"Error":{"properties":{"error":{"$ref":"#/components/schemas/Err"},"status":{"type":"integer"},"path":{"type":"string"}}},"Err":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"detail":{"type":"string"},"fields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FieldError"}}}},"FieldError":{"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/reseller/subusers/{username}/reset-secret":{"put":{"summary":"Reset a subuser's secret","description":"Reset a subuser's secret with a randomly generated password.","operationId":"resellerResetSubuserSecret","tags":["Resellers"],"parameters":[{"name":"username","in":"path","description":"Subuser's username","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResellerSubuserWithSecret"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## PUT /api/v1/reseller/subusers/{username}/enable

> Enable a subuser

````json
{"openapi":"3.0.3","info":{"title":"Resellers API specification","version":"1.0.0"},"servers":[{"url":"/"}],"security":[{"userBearerAuth":[]}],"components":{"securitySchemes":{"userBearerAuth":{"description":"Bearer authentication with sentinel token for users.\n\nYou can use the following command to get the bearer token:\n\n```\ncurl -d '{\"username\":\"<username>\", \"password\":\"<password>\"}' -H \"Content-Type: application/json\" -X POST -s https://api.goproxies.com/api/v1/login | jq -r '.token'\n```\n\nSubstitute `<username>` and `<password>` with your credentials.\n","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ResellerSubuser":{"properties":{"username":{"type":"string"},"enabled":{"type":"boolean"},"traffic_limit_amount":{"type":"number"},"traffic_limit_unit":{"type":"string"},"period_seconds":{"type":"integer"},"period_started_at":{"type":"string","format":"date-time"},"recurring":{"type":"boolean"},"traffic_used":{"type":"number"}},"required":["username","enabled","traffic_limit_amount","traffic_limit_unit","period_seconds","recurring","traffic_used"]},"Error":{"properties":{"error":{"$ref":"#/components/schemas/Err"},"status":{"type":"integer"},"path":{"type":"string"}}},"Err":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"detail":{"type":"string"},"fields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FieldError"}}}},"FieldError":{"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/reseller/subusers/{username}/enable":{"put":{"summary":"Enable a subuser","operationId":"resellerEnableSubuser","tags":["Resellers"],"parameters":[{"name":"username","in":"path","description":"Subuser's username","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResellerSubuser"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````

## PUT /api/v1/reseller/subusers/{username}/disable

> Disable a subuser

````json
{"openapi":"3.0.3","info":{"title":"Resellers API specification","version":"1.0.0"},"servers":[{"url":"/"}],"security":[{"userBearerAuth":[]}],"components":{"securitySchemes":{"userBearerAuth":{"description":"Bearer authentication with sentinel token for users.\n\nYou can use the following command to get the bearer token:\n\n```\ncurl -d '{\"username\":\"<username>\", \"password\":\"<password>\"}' -H \"Content-Type: application/json\" -X POST -s https://api.goproxies.com/api/v1/login | jq -r '.token'\n```\n\nSubstitute `<username>` and `<password>` with your credentials.\n","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"ResellerSubuser":{"properties":{"username":{"type":"string"},"enabled":{"type":"boolean"},"traffic_limit_amount":{"type":"number"},"traffic_limit_unit":{"type":"string"},"period_seconds":{"type":"integer"},"period_started_at":{"type":"string","format":"date-time"},"recurring":{"type":"boolean"},"traffic_used":{"type":"number"}},"required":["username","enabled","traffic_limit_amount","traffic_limit_unit","period_seconds","recurring","traffic_used"]},"Error":{"properties":{"error":{"$ref":"#/components/schemas/Err"},"status":{"type":"integer"},"path":{"type":"string"}}},"Err":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"detail":{"type":"string"},"fields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FieldError"}}}},"FieldError":{"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"paths":{"/api/v1/reseller/subusers/{username}/disable":{"put":{"summary":"Disable a subuser","operationId":"resellerDisableSubuser","tags":["Resellers"],"parameters":[{"name":"username","in":"path","description":"Subuser's username","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResellerSubuser"}}}},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
````


---

# 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/resellers-api/resellers.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.
