Update subgroups of a user group

POST https://factslab.zulipchat.com/api/v1/user_groups/{user_group_id}/subgroups

Update the subgroups of a user group.

Changes: Prior to Zulip 12.0 (feature level 496), bot users were not permitted to call this endpoint.

Prior to Zulip 11.0 (feature level 391), subgroups could not be added or removed from a deactivated group.

New in Zulip 6.0 (feature level 127).

Usage examples

The -u line implements HTTP Basic authentication. See the Authorization header documentation for how to get those credentials for Zulip users and bots.

curl -sSX POST https://factslab.zulipchat.com/api/v1/user_groups/38/subgroups \
    -u EMAIL_ADDRESS:API_KEY \
    --data-urlencode 'add=[10]'

Parameters

user_group_id integer required in path

Example: 38

The ID of the target user group.


delete (integer)[] optional

Example: [10]

The list of user group IDs to be removed from the user group.


add (integer)[] optional

Example: [10]

The list of user group IDs to be added to the user group.


Response

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"
}