Groups

Creates one or more groups for the account

POST
/v2.1/accounts/{accountId}/groups

Creates one or more groups for the account.

Groups help you manage users. For example, you can use groups to limit user access to templates.

You can associate a group with a permission profile, which sets the user permissions for users in that group without having to set the userSettings property for each user. You are not required to set permission profiles for a group, but it makes it easier to manage user permissions for a large number of users.

Example request:

{  "groups": [    { "groupName": "montagues" },    { "groupName": "capulets" },    { "groupName": "nobles",       "permissionProfileId": 1597 }  ]}

Use AccountPermissionProfiles: list to get a list of permission profiles and their IDs. It is an error if the permissionProfileId does not exist.

Related topics

Authorization

OAuth2
AuthorizationBearer <token>

OAuth 2.0 access token obtained via Authorization Code Grant or JWT Grant.

In: header

Path Parameters

accountId*string

The external account number (int) or account ID GUID.

Request Body

application/json

This object is used for both requests and responses. Some properties (such as endPosition) only apply to the response of Groups: list.

endPosition?string

The last index position in the result set.

groups?array<>

A collection group objects containing information about the groups.

nextUri?string

The URI for the next chunk of records based on the search request. It is null if this is the last set of results for the search.

previousUri?string

The URI for the prior chunk of records based on the search request. It is null if this is the first set of results for the search.

resultSetSize?string

The number of results in this response. Because you can filter which entries are included in the response, this value is always less than or equal to the totalSetSize.

startPosition?string

The starting index position of the current result set.

totalSetSize?string

The total number of items in the result set. This value is always greater than or equal to the value of resultSetSize.

Response Body

application/json

application/json

curl -X POST "https://example.com/v2.1/accounts/string/groups" \  -H "Content-Type: application/json" \  -d '{}'
{  "endPosition": "string",  "groups": [    {      "accessType": "string",      "dsGroupId": "string",      "errorDetails": {        "errorCode": "string",        "message": "string"      },      "groupId": "string",      "groupName": "string",      "groupType": "string",      "isManagedByScim": true,      "lastModifiedOn": "string",      "permissionProfileId": "string",      "userGroupType": "string",      "users": [        {          "accountId": "string",          "accountName": "string",          "activationAccessCode": "string",          "email": "string",          "errorDetails": {            "errorCode": "string",            "message": "string"          },          "ipAddress": "string",          "loginStatus": "string",          "membershipId": "string",          "sendActivationEmail": "string",          "uri": "string",          "userId": "string",          "userName": "string",          "userStatus": "string",          "userType": "string"        }      ],      "usersCount": "string"    }  ],  "nextUri": "string",  "previousUri": "string",  "resultSetSize": "string",  "startPosition": "string",  "totalSetSize": "string"}