Get user groups
GET https://zulip.in.tum.de/api/v1/user_groups
Fetches all of the user groups in the organization.
Usage examples
#!/usr/bin/env python3
import zulip
# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")
# Get all user groups of the organization.
result = client.get_user_groups()
print(result)
curl -sSX GET -G https://zulip.in.tum.de/api/v1/user_groups \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
--data-urlencode allow_deactivated=true
Parameters
allow_deactivated boolean optional
Example: true
Whether to include deactivated user groups in the response.
Changes: New in Zulip 10.0 (feature level 290). Previously,
deactivated user groups did not exist and thus would never be
included in the response.
Defaults to false
.
Response
Return values
Example response(s)
Changes: As of Zulip 7.0 (feature level 167), if any
parameters sent in the request are not supported by this
endpoint, a successful JSON response will include an
ignored_parameters_unsupported
array.
A typical successful JSON response may look like:
{
"msg": "",
"result": "success",
"user_groups": [
{
"can_manage_group": 16,
"can_mention_group": 11,
"creator_id": null,
"date_created": null,
"description": "Owners of this organization",
"direct_subgroup_ids": [],
"id": 1,
"is_system_group": true,
"members": [
1
],
"name": "role:owners"
},
{
"can_manage_group": 17,
"can_mention_group": 12,
"creator_id": null,
"date_created": null,
"description": "Administrators of this organization, including owners",
"direct_subgroup_ids": [
1
],
"id": 2,
"is_system_group": true,
"members": [
2
],
"name": "role:administrators"
},
{
"can_manage_group": 20,
"can_mention_group": 13,
"creator_id": null,
"date_created": 1717484476,
"description": "Characters of Hamlet",
"direct_subgroup_ids": [],
"id": 3,
"is_system_group": false,
"members": [
3,
4
],
"name": "hamletcharacters"
}
]
}