create_unit_group
To create a unit group, use the core/create_unit_group method.
svc=core/create_unit_group¶ms={
"creatorId": <long>,
"name": "<text>",
"dataFlags": <uint>
}
Parameters
| Parameter | Description |
|---|---|
| creatorId | The ID of the user that should be the creator of the unit group. |
| name | The name of the unit group (4–50 characters). |
| dataFlags | Flags with the unit group properties for the returned result (see the group page). |
Response
If the request is completed successfully, the response is returned in the following format:
{
"item": { /* Created unit group. */
...
},
"flags": <uint> /* Applied flags with properties. */
}
The format of the item parameter is described on the group page.
If the request fails, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 4 | Wrong input parameters. |
| 6 | One of the following errors:
|
| 7 | The creator is a top account user or failed to check the create_unit_groups billing transaction. |