> For the complete documentation index, see [llms.txt](https://navixy.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://navixy.com/docs/navixy-api/user-api/resources/commons/subuser/security_group.md).

# Sub-user security group

Named sets of rights assigned to sub-users, deciding what each of them may change.

A security group is a named set of rights. Assigning one to a [sub-user](/docs/navixy-api/user-api/resources/commons/subuser.md) decides what that sub-user may change, which is the half of their limits that scoping does not cover: scoping decides what they can see, rights decide what they can do to it.

## Security group object

## The SecurityGroup object

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"components":{"schemas":{"SecurityGroup":{"type":"object","description":"A named set of rights that can be given to sub-users.\n\nMost read operations need no right at all, so a sub-user in the default group can still read, subject to scoping. Most data-changing operations do need one.","properties":{"id":{"type":["integer","null"],"description":"Group ID. May be null when creating."},"label":{"type":"string","description":"Group label."},"privileges":{"type":"object","description":"What the group allows.","properties":{"rights":{"type":"array","description":"Rights granted to the group. **`admin` cannot be granted**: it belongs to master users only.","items":{"type":"string","enum":["tracker_update","tracker_configure","tracker_set_output","tracker_register","tracker_rule_update","tag_update","task_update","form_template_update","zone_update","place_update","places_custom_fields_update","employee_update","vehicle_update","video_monitoring"]}},"store_period":{"type":"string","description":"Optional. How far back the group may view history, in the legacy duration format: `2h` for two hours, `3d` for three days, `5m` for five months, `1y` for one year."}}}}}}}}
```

### Default security group

The default, or empty, security group applies when a sub-user's `security_group_id` is null. Its `rights` array is empty, so such a sub-user can change nothing.

### Master user's rights

A master user always holds every right, including the `admin` right, which cannot be assigned to a security group.

### Security group rights

Almost every read operation requires no rights at all, so it is available to any sub-user, even one in the default group. Entities can still be hidden from such a sub-user, because they are associated with trackers outside that sub-user's scope. Most operations that change data, by contrast, do require a right.

These are the rights a security group can grant:

| name                          | description                                                                                                                                                                                                                                                                                                                                                  |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `admin`                       | Available for master user-only. Cannot be assigned to security groups.                                                                                                                                                                                                                                                                                       |
| `tracker_update`              | Allows adjustments to platform-related tracker settings, including labeling, tagging, changing phone numbers, LBS location settings, parking detection settings, odometer settings, engine hours settings, working statuses, data forwarding, connection timeout settings, inputs and sensors management, and BLE sensors management for some device models. |
| `tracker_configure`           | Allows adjustments to hardware-related tracker settings that require sending device configuration commands. This includes tracking mode settings, ignition input settings, timezone settings, harsh driving settings, etc.                                                                                                                                   |
| `tracker_set_output`          | Allows changing the output state.                                                                                                                                                                                                                                                                                                                            |
| `tracker_register`            | Allows activating new trackers.                                                                                                                                                                                                                                                                                                                              |
| `tracker_rule_update`         | Allows creating and updating rules.                                                                                                                                                                                                                                                                                                                          |
| `tag_update`                  | Allows creating and updating tags.                                                                                                                                                                                                                                                                                                                           |
| `task_update`                 | Allows creating and updating tasks.                                                                                                                                                                                                                                                                                                                          |
| `form_template_update`        | Allows creating and updating forms.                                                                                                                                                                                                                                                                                                                          |
| `zone_update`                 | Allows creating and updating geofences.                                                                                                                                                                                                                                                                                                                      |
| `place_update`                | Allows creating and updating places.                                                                                                                                                                                                                                                                                                                         |
| `places_custom_fields_update` | Allows creating and updating custom fields for places.                                                                                                                                                                                                                                                                                                       |
| `employee_update`             | Allows creating and updating employees and drivers.                                                                                                                                                                                                                                                                                                          |
| `vehicle_update`              | Allows creating and updating vehicles, garages, and adding avatars to vehicles.                                                                                                                                                                                                                                                                              |
| `video_monitoring`            | Allows requesting real-time video, playback video, and video events.                                                                                                                                                                                                                                                                                         |
| `payment_create`              | Allows interacting with the payment system assigned to a user.                                                                                                                                                                                                                                                                                               |
| `reports`                     | Allows generating all types of reports.                                                                                                                                                                                                                                                                                                                      |
| `weblocator_session_create`   | Allows creating geo-links.                                                                                                                                                                                                                                                                                                                                   |
| `delivery_session_create`     | Allows using the delivery tracking functionality.                                                                                                                                                                                                                                                                                                            |
| `checkin_update`              | Allows creating check-ins.                                                                                                                                                                                                                                                                                                                                   |

## API actions

API base path: `/subuser/security_group`.

Every operation on this page needs the `multilevel_access` tariff feature on **all** trackers, and the `admin` right, which is available only to master users. Failing either returns error 13 for the right and error 236 for the feature, so those two are not repeated per operation below.

***

## Create security group

> Create a security group, and return its ID.\
> \
> \*\*Master users only\*\*, and the account needs the \`multilevel\_access\` plan feature on \*\*all\*\* trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.\
> \
> Requires the \`admin\` right.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Sub-users","description":"Additional users under a master account: their security groups, and the trackers, places and geofences each one can see. All resources under the /subuser/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"schemas":{"SecurityGroup":{"type":"object","description":"A named set of rights that can be given to sub-users.\n\nMost read operations need no right at all, so a sub-user in the default group can still read, subject to scoping. Most data-changing operations do need one.","properties":{"id":{"type":["integer","null"],"description":"Group ID. May be null when creating."},"label":{"type":"string","description":"Group label."},"privileges":{"type":"object","description":"What the group allows.","properties":{"rights":{"type":"array","description":"Rights granted to the group. **`admin` cannot be granted**: it belongs to master users only.","items":{"type":"string","enum":["tracker_update","tracker_configure","tracker_set_output","tracker_register","tracker_rule_update","tag_update","task_update","form_template_update","zone_update","place_update","places_custom_fields_update","employee_update","vehicle_update","video_monitoring"]}},"store_period":{"type":"string","description":"Optional. How far back the group may view history, in the legacy duration format: `2h` for two hours, `3d` for three days, `5m` for five months, `1y` for one year."}}}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/subuser/security_group/create":{"post":{"tags":["Sub-users"],"summary":"Create security group","description":"Create a security group, and return its ID.\n\n**Master users only**, and the account needs the `multilevel_access` plan feature on **all** trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.\n\nRequires the `admin` right.","operationId":"subuserSecurityGroupCreate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"group":{"allOf":[{"$ref":"#/components/schemas/SecurityGroup"}],"description":"The security group to create, without the `id` field."}},"required":["group"]}}}},"responses":{"200":{"description":"The created group","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"id":{"type":"integer","description":"ID of the new security group."}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"402":{"description":"Error 236: the account lacks the `multilevel_access` feature.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 13: the caller is a sub-user.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 13 - The caller is a sub-user.
* 236 - The account lacks the `multilevel_access` feature.

***

## Delete security group

> Delete a security group.\
> \
> Sub-users in it fall back to the default group, which has no rights.\
> \
> \*\*Master users only\*\*, and the account needs the \`multilevel\_access\` plan feature on \*\*all\*\* trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.\
> \
> Also accepts GET with the same parameters as query-string values.\
> \
> Requires the \`admin\` right.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Sub-users","description":"Additional users under a master account: their security groups, and the trackers, places and geofences each one can see. All resources under the /subuser/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/subuser/security_group/delete":{"post":{"tags":["Sub-users"],"summary":"Delete security group","description":"Delete a security group.\n\nSub-users in it fall back to the default group, which has no rights.\n\n**Master users only**, and the account needs the `multilevel_access` plan feature on **all** trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.\n\nAlso accepts GET with the same parameters as query-string values.\n\nRequires the `admin` right.","operationId":"subuserSecurityGroupDelete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"security_group_id":{"type":"integer","description":"ID of the security group to delete.","minimum":1}},"required":["security_group_id"]}}}},"responses":{"200":{"description":"Security group deleted","$ref":"#/components/responses/OK"},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"402":{"description":"Error 236: the account lacks the `multilevel_access` feature.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 13: the caller is a sub-user.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 201 - Not found in the database, when no group has the given `security_group_id`.

***

## List security groups

> List the security groups of the current master account.\
> \
> \*\*Master users only\*\*, and the account needs the \`multilevel\_access\` plan feature on \*\*all\*\* trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.\
> \
> Callable with an empty body. Also accepts GET.\
> \
> Requires the \`admin\` right.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Sub-users","description":"Additional users under a master account: their security groups, and the trackers, places and geofences each one can see. All resources under the /subuser/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"schemas":{"SecurityGroup":{"type":"object","description":"A named set of rights that can be given to sub-users.\n\nMost read operations need no right at all, so a sub-user in the default group can still read, subject to scoping. Most data-changing operations do need one.","properties":{"id":{"type":["integer","null"],"description":"Group ID. May be null when creating."},"label":{"type":"string","description":"Group label."},"privileges":{"type":"object","description":"What the group allows.","properties":{"rights":{"type":"array","description":"Rights granted to the group. **`admin` cannot be granted**: it belongs to master users only.","items":{"type":"string","enum":["tracker_update","tracker_configure","tracker_set_output","tracker_register","tracker_rule_update","tag_update","task_update","form_template_update","zone_update","place_update","places_custom_fields_update","employee_update","vehicle_update","video_monitoring"]}},"store_period":{"type":"string","description":"Optional. How far back the group may view history, in the legacy duration format: `2h` for two hours, `3d` for three days, `5m` for five months, `1y` for one year."}}}}}},"responses":{"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/subuser/security_group/list":{"post":{"tags":["Sub-users"],"summary":"List security groups","description":"List the security groups of the current master account.\n\n**Master users only**, and the account needs the `multilevel_access` plan feature on **all** trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.\n\nCallable with an empty body. Also accepts GET.\n\nRequires the `admin` right.","operationId":"subuserSecurityGroupList","responses":{"200":{"description":"The security groups","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true},"list":{"type":"array","items":{"$ref":"#/components/schemas/SecurityGroup"}}}}}}},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"402":{"description":"Error 236: the account lacks the `multilevel_access` feature.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 13: the caller is a sub-user.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 13 - The caller is a sub-user.
* 236 - The account lacks the `multilevel_access` feature.

***

## Update security group

> Update a security group. Pass a full group object including its \`id\`.\
> \
> \*\*The change takes effect for every sub-user in the group\*\*, including sessions already open.\
> \
> \*\*Master users only\*\*, and the account needs the \`multilevel\_access\` plan feature on \*\*all\*\* trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.\
> \
> Requires the \`admin\` right.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Sub-users","description":"Additional users under a master account: their security groups, and the trackers, places and geofences each one can see. All resources under the /subuser/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"schemas":{"SecurityGroup":{"type":"object","description":"A named set of rights that can be given to sub-users.\n\nMost read operations need no right at all, so a sub-user in the default group can still read, subject to scoping. Most data-changing operations do need one.","properties":{"id":{"type":["integer","null"],"description":"Group ID. May be null when creating."},"label":{"type":"string","description":"Group label."},"privileges":{"type":"object","description":"What the group allows.","properties":{"rights":{"type":"array","description":"Rights granted to the group. **`admin` cannot be granted**: it belongs to master users only.","items":{"type":"string","enum":["tracker_update","tracker_configure","tracker_set_output","tracker_register","tracker_rule_update","tag_update","task_update","form_template_update","zone_update","place_update","places_custom_fields_update","employee_update","vehicle_update","video_monitoring"]}},"store_period":{"type":"string","description":"Optional. How far back the group may view history, in the legacy duration format: `2h` for two hours, `3d` for three days, `5m` for five months, `1y` for one year."}}}}}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/subuser/security_group/update":{"post":{"tags":["Sub-users"],"summary":"Update security group","description":"Update a security group. Pass a full group object including its `id`.\n\n**The change takes effect for every sub-user in the group**, including sessions already open.\n\n**Master users only**, and the account needs the `multilevel_access` plan feature on **all** trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.\n\nRequires the `admin` right.","operationId":"subuserSecurityGroupUpdate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"group":{"allOf":[{"$ref":"#/components/schemas/SecurityGroup"}],"description":"The security group to update, including its `id`."}},"required":["group"]}}}},"responses":{"200":{"description":"Security group updated","$ref":"#/components/responses/OK"},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"402":{"description":"Error 236: the account lacks the `multilevel_access` feature.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 13: the caller is a sub-user.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 201 - Not found in the database, when the group does not exist.

***

## Assign security group

> Put one or more sub-users into a security group.\
> \
> \*\*Pass \`group\_id\` as null to move them to the default group\*\*, which has no rights. Only \`subuser\_ids\` is required.\
> \
> \*\*Master users only\*\*, and the account needs the \`multilevel\_access\` plan feature on \*\*all\*\* trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.\
> \
> Requires the \`admin\` right.

```json
{"openapi":"3.1.0","info":{"title":"Navixy Platform API","version":"1.0.0"},"tags":[{"name":"Sub-users","description":"Additional users under a master account: their security groups, and the trackers, places and geofences each one can see. All resources under the /subuser/ path."}],"servers":[{"url":"https://api.eu.navixy.com/v2","description":"Navixy production server on European platform"},{"url":"https://api.us.navixy.com/v2","description":"Navixy production server on American platform"},{"url":"https://api.me.navixy.com/v2","description":"Navixy production server on Middle East platform"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","description":"Either a user session hash or an API key, with the \"NVX \" prefix, for example \"NVX 22eac1c27af4be7b9d04da2ce1af111b\". Obtain a session hash from the userAuth operation, or create an API key from the API keys operations. A small number of operations accept a session hash only and reject an API key with error code 4; each says so in its description.","name":"Authorization","in":"header"}},"responses":{"OK":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"`true` if request finished successfully.","readOnly":true}}}}}},"ResponseError":{"description":"Error response object","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always false."},"status":{"type":"object","description":"Error status. Present only when an error occurred.","properties":{"code":{"type":"integer","description":"An error code in this API, not an HTTP code."},"description":{"type":"string","description":"An error description."}}},"errors":{"type":"array","description":"Per-parameter detail, returned with validation failures such as error code 7. A parameter name here may be an internal field name rather than the documented parameter name.","items":{"type":"object","properties":{"parameter":{"type":"string","description":"Name of the parameter that failed validation."},"error":{"type":"string","description":"What was wrong with it."}}}}}}}}}}},"paths":{"/subuser/security_group/assign":{"post":{"tags":["Sub-users"],"summary":"Assign security group","description":"Put one or more sub-users into a security group.\n\n**Pass `group_id` as null to move them to the default group**, which has no rights. Only `subuser_ids` is required.\n\n**Master users only**, and the account needs the `multilevel_access` plan feature on **all** trackers. A sub-user calling this gets error 13, and an account without the feature gets error 236.\n\nRequires the `admin` right.","operationId":"subuserSecurityGroupAssign","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"group_id":{"type":["integer","null"],"description":"ID of the security group. Null moves the sub-users to the default group."},"subuser_ids":{"type":"array","description":"IDs of the sub-users to assign. Must not be empty.","items":{"type":"integer"},"minItems":1}},"required":["subuser_ids"]}}}},"responses":{"200":{"description":"Security group assigned","$ref":"#/components/responses/OK"},"400":{"description":"Bad request. The response body carries the API-level error code in `status.code`. Validation failures also include an `errors` array naming each offending parameter.","$ref":"#/components/responses/ResponseError"},"402":{"description":"Error 236: the account lacks the `multilevel_access` feature.","$ref":"#/components/responses/ResponseError"},"403":{"description":"Error 13: the caller is a sub-user.","$ref":"#/components/responses/ResponseError"},"default":{"$ref":"#/components/responses/ResponseError"}}}}}}
```

#### Errors

These errors come in addition to the [general error codes](/docs/navixy-api/general/errors.md#error-codes):

* 201 - Not found in the database, when the group or the sub-user does not exist.


---

# 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://navixy.com/docs/navixy-api/user-api/resources/commons/subuser/security_group.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.
