---
title: "Create user group"
method: POST
path: "/v1/user-groups"
tags: ["User Groups"]
---

# Create user group

`POST /v1/user-groups`

Create a new user group. Requires MANAGE_USERS access right.

## Request body

- UserCreateInput — User or group creation request
  - `name` string, required — Login name (must be a valid object name)

## Response `201`

User group created successfully

- UserGroup — User group
  - `id` integer — Group ID (includes GROUP_FLAG bit 0x40000000)
  - `guid` string, uuid — Group GUID
  - `name` string — Group name
  - `description` string — Group description
  - `systemRights` integer — System access rights bitmask
  - `uiAccessRules` string — UI access rules
  - `flags` UserFlags — User or group flags. When used in update requests, only the specified boolean fields are modified (PATCH semantics).
    - `disabled` boolean — Whether the account is disabled
    - `changePassword` boolean — Must change password at next login
    - `cannotChangePassword` boolean — Cannot change own password
    - `intruderLockout` boolean — Account locked out due to repeated authentication failures
    - `passwordNeverExpires` boolean — Password never expires
    - `ldapUser` boolean — Synchronized from LDAP
    - `syncException` boolean — Excluded from LDAP synchronization
    - `closeOtherSessions` boolean — Close other sessions on login
    - `tokenAuthOnly` boolean — Can only authenticate using API tokens
    - `twoFAExempt` boolean — Exempt from two-factor authentication
    - `twoFAEnforce` boolean — Two-factor authentication is enforced
    - `serviceAccount` boolean — Service account (can only authenticate via API tokens, interactive login rejected)
  - `attributes` object — Custom attributes
  - `ldapDn` string, nullable — LDAP distinguished name
  - `ldapId` string, nullable — LDAP unique ID
  - `created` integer — Group creation time (Unix timestamp)
  - `members` integer[] — List of member user IDs

## Other responses

- `400` — Invalid or missing name
- `401` — Unauthorized
- `403` — User does not have MANAGE_USERS access right
- `409` — Group with this name already exists
- `500` — Database failure

---

[API](https://skmtc.net/netxms/apis/netxms-api.md) · [All operations](https://skmtc.net/netxms/apis/netxms-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/netxms/netxms-api/versions/14d93e5115dd/schema)
