Skip to main content

usergroups.list method

Facts

DescriptionList all User Groups for a team.
Method Access
GET https://slack.com/api/usergroups.list
Scopes
Bot token:
User token:
Content types
application/x-www-form-urlencoded
application/json

Arguments

Required arguments

tokenstringRequired
Example: xxxx-xxxxxxxxx-xxxx

Optional arguments

include_countbooleanOptional

Include the number of users in each User Group.

Example: true
include_disabledbooleanOptional

Include results for disabled User Groups.

Example: true
include_usersbooleanOptional

Include the list of users for each User Group.

Example: true
team_idstringOptional

The user group's encoded team ID. Required if org token is used.

Usage info

This method returns a list of all User Groups in the team. This can optionally include disabled User Groups.

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

Typical success response

{
"ok": true,
"usergroups": [
{
"id": "S0614TZR7",
"team_id": "T060RNRCH",
"is_usergroup": true,
"name": "Team Admins",
"description": "A group of all Administrators on your team.",
"handle": "admins",
"is_external": false,
"date_create": 1446598059,
"date_update": 1446670362,
"date_delete": 0,
"auto_type": "admin",
"created_by": "USLACKBOT",
"updated_by": "U060RNRCZ",
"deleted_by": null,
"prefs": {
"channels": [],
"groups": []
},
"user_count": "2"
},
{
"id": "S06158AV7",
"team_id": "T060RNRCH",
"is_usergroup": true,
"name": "Team Owners",
"description": "A group of all Owners on your team.",
"handle": "owners",
"is_external": false,
"date_create": 1446678371,
"date_update": 1446678371,
"date_delete": 0,
"auto_type": "owner",
"created_by": "USLACKBOT",
"updated_by": "USLACKBOT",
"deleted_by": null,
"prefs": {
"channels": [],
"groups": []
},
"user_count": "1"
},
{
"id": "S0615G0KT",
"team_id":