create_unit_group

To create a unit group, use the core/create_unit_group method.

Copied!
svc=core/create_unit_group&params={
  "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:

Copied!
{
  "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:
  • Failed to fetch the creator, or there is no Act on behalf of this user access right to the creator.
  • The current user doesn’t have the Can create items flag (see update_user_flags).
  • Failed to create the unit group.
7 The creator is a top account user or failed to check the create_unit_groups billing transaction.

If you find a mistake in the text, please select it and press Ctrl+Enter.