# createGroup {#creategroup}

## Syntax {#syntax}

`createGroup(groupId, [userIds])`

## Arguments {#arguments}

**groupId** is a string indicating a group name.

**userId** \(optional\) is a STRING scalar/vector indicating the user names of the group members.

## Details {#details}

Create a group of users. It can only be executed by an administrator.

The users specified by *userIds* must have been created with [createUser](createUser.md).

## Examples {#examples}

Create a group "production", and add a user with user name "JohnSmith".

```
createGroup(`production, `JohnSmith);
```

