usergroups.create
method
Welcome to the new home of Slack developer docs!
We're still building and not all features are available quite yet. Enjoy this peek into the future!
Not ready for the future? Return to the past at api.slack.com.
Usage info
This method is used to create a User Group.
In order to call this method successfully, you'll need to ensure that your workspace settings allow you to manage user groups; otherwise you will receive a
permission_denied
error.To update this setting, navigate to Tools & settings > Workspace settings > Permissions > User Groups within your workspace and update who can create, disable, or modify user groups from the drop-down menus.
The team_id
is only relevant when using an org-level token. This field will be ignored if the API call is sent using a workspace-level token.
Response
If successful, the command returns a usergroup object, including preferences:
{
"ok": true,
"usergroup": {
"id": "S0615G0KT",
"team_id": "T060RNRCH",
"is_usergroup": true,
"name": "Marketing Team",
"description": "Marketing gurus, PR experts and product advocates.",
"handle": "marketing-team",
"is_external": false,
"date_create": 1446746793,
"date_update": 1446746793,
"date_delete": 0,
"auto_type": null,
"created_by": "U060RNRCZ",
"updated_by": "U060RNRCZ",
"deleted_by": null,
"prefs": {
"channels": [
],
"groups": [
]
},
"user_count": "0"
}
}