Reorder channel folders

This endpoint is only available to organization administrators.

PATCH https://chat.zulip.org/api/v1/channel_folders

Reorder the channel folders in the user's organization.

Channel folders are displayed in Zulip UI in order; this endpoint allows administrative settings UI to change the ordering of channel folders.

This endpoint is used to implement the dragging feature described in the manage channel folders documentation.

Changes: New in Zulip 11.0 (feature level 414).

Usage examples

curl -sSX PATCH https://chat.zulip.org/api/v1/channel_folders \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \
    --data-urlencode 'order=[2, 1]'

Parameters

order (integer)[] required

Example: [2, 1]

A list of channel folder IDs representing the new order.

This list must include the IDs of all the organization's channel folders, including archived folders.


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

An example JSON response when the order mapping is invalid:

{
    "code": "BAD_REQUEST",
    "msg": "Invalid order mapping",
    "result": "error"
}