> For the complete documentation index, see [llms.txt](https://help.netnut.io/netnut-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.netnut.io/netnut-documentation/resources/customers-api/sub-users.md).

# Sub users

(For resellers only)

## GET /customer/sub-user/{id}

> Get sub-user by ID

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Sub users","description":"(For resellers only)"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"SubUsersSuccess":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","description":"Data of sub users","items":{"type":"object"}}},"description":"SubUsers"},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/sub-user/{id}":{"get":{"tags":["Sub users"],"summary":"Get sub-user by ID","operationId":"getById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Data of the sub users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubUsersSuccess"}}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## PATCH /customer/sub-user/{id}/password

> Set sub-user proxy password

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Sub users","description":"(For resellers only)"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"UpdatePasswordProps":{"required":["new_login_pwd"],"type":"object","properties":{"new_login_pwd":{"type":"string","description":"new_login_pwd"}}},"UpdatePasswordSuccess":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","description":"Data of sub users","items":{"type":"object"}}},"description":"Update Password"},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/sub-user/{id}/password":{"patch":{"tags":["Sub users"],"summary":"Set sub-user proxy password","operationId":"patchSubUserPassword","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePasswordProps"}}},"required":false},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePasswordSuccess"}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## GET /customer/sub-user/

> Get sub-users

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Sub users","description":"(For resellers only)"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"SubUsersSuccess":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","description":"Data of sub users","items":{"type":"object"}}},"description":"SubUsers"},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/sub-user/":{"get":{"tags":["Sub users"],"summary":"Get sub-users","operationId":"getSubUsers","parameters":[{"name":"is_active","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Data of the sub users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubUsersSuccess"}}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /customer/sub-user/

> Create sub-user

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Sub users","description":"(For resellers only)"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"SubUser":{"required":["customer_dashboard_email","customer_dashboard_pwd","customer_login_name","customer_login_pwd","customer_name"],"type":"object","properties":{"customer_dashboard_email":{"type":"string","description":"customer_dashboard_email"},"customer_name":{"type":"string","description":"customer_name"},"customer_dashboard_pwd":{"type":"string","description":"customer_dashboard_pwd"},"customer_login_name":{"type":"string","description":"customer_login_name"},"customer_login_pwd":{"type":"string","description":"customer_login_pwd"},"snkrs_private_pool":{"type":"number","description":"snkrs_private_pool"}}},"PostSubUser":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"data":{"type":"array","description":"Data of sub users","items":{"type":"object"}}},"description":"SubUsers"},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/sub-user/":{"post":{"tags":["Sub users"],"summary":"Create sub-user","operationId":"postSubUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubUser"}}},"required":false},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSubUser"}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /customer/sub-user/{id}/allocate

> Allocate GB to sub-user

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Sub users","description":"(For resellers only)"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Allocate":{"required":["allocate"],"type":"object","properties":{"allocate":{"type":"number","description":"allocate gb"},"product_type":{"type":"string","description":"Product type (Options: '*', 'dc', 'res', 'stc', 'mob')"}}},"LoginSuccess":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"token":{"type":"string","description":"token"}},"description":"Login credentials"},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/sub-user/{id}/allocate":{"post":{"tags":["Sub users"],"summary":"Allocate GB to sub-user","operationId":"allocate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Allocate"}}},"required":false},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginSuccess"}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## POST /customer/sub-user/{id}/allocateIps

> Allocate IPs to sub-user

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Sub users","description":"(For resellers only)"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"AllocateIps":{"required":["access_point","bandwidth","country_code","ips"],"type":"object","properties":{"access_point":{"type":"string","description":"Access Point"},"country_code":{"type":"string","description":"Country Code"},"ips":{"type":"number","description":"IP's to allocate"},"bandwidth":{"type":"number","description":"bandwith you want to give to sub-user"}}},"AllocateIpsSuccess":{"required":["message","success"],"type":"object","properties":{"success":{"type":"boolean","description":"success flag"},"message":{"type":"string","description":"message"}},"description":"allocateIps success response"},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/sub-user/{id}/allocateIps":{"post":{"tags":["Sub users"],"summary":"Allocate IPs to sub-user","operationId":"allocateIps","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllocateIps"}}},"required":false},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllocateIpsSuccess"}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## PUT /customer/sub-user/{id}/disabled

> Disable sub-user

```json
{"openapi":"3.0.1","info":{"title":"Customers api","version":"1.0"},"tags":[{"name":"Sub users","description":"(For resellers only)"}],"servers":[{"url":"https://customers-api.netnut.io/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"UpdateSuccess":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}},"description":"success update"},"ErrorResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"is success"},"message":{"type":"string","description":"message"}}}}},"paths":{"/customer/sub-user/{id}/disabled":{"put":{"tags":["Sub users"],"summary":"Disable sub-user","operationId":"disabled","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSuccess"}}}},"400":{"description":"fail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# 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 dynamically by asking a question.

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

```
GET https://help.netnut.io/netnut-documentation/resources/customers-api/sub-users.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
