Get channel folders

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

Fetches all of the channel folders in the organization, sorted by the order field.

Changes: Before Zulip 11.0 (feature level 414), the list of channel folders was sorted by ID as the order field didn't exist.

New in Zulip 11.0 (feature level 389).

Usage examples

curl -sSX GET -G https://chat.zulip.org/api/v1/channel_folders \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \
    --data-urlencode include_archived=true

Parameters

include_archived boolean optional

Example: true

Whether to include archived channel folders in the response.

Defaults to false.


Response

Return values

  • channel_folders: (object)[]

    A list of channel folder objects.

    • id: integer

      The unique ID of the channel folder.

    • name: string

      The name of the channel folder.

    • order: integer

      This value determines in which order the channel folder should be displayed in the UI. The value is 0 indexed, and a channel folder with a lower value should be displayed before channel folders with higher values.

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

    • date_created: integer | null

      The UNIX timestamp for when the channel folder was created, in UTC seconds.

    • creator_id: integer | null

      The ID of the user who created the channel folder.

    • description: string

      The description of the channel folder. Can be an empty string.

      See Markdown message formatting for details on Zulip's HTML format.

    • rendered_description: string

      The description of the channel folder rendered as HTML, intended to be used for UI that displays the channel folder description.

      Clients should use the standard Zulip rendered_markdown CSS when displaying this content so that emoji, LaTeX, and other syntax work correctly. And any client-side security logic for user-generated message content should be applied when displaying this HTML as though it were the body of a Zulip message.

    • is_archived: boolean

      Whether the channel folder is archived or not.

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:

{
    "channel_folders": [
        {
            "creator_id": 1,
            "date_created": 1691057093,
            "description": "Channels for frontend discussions",
            "id": 1,
            "is_archived": false,
            "name": "Frontend",
            "rendered_description": "<p>Channels for frontend discussions</p>"
        },
        {
            "creator_id": 1,
            "date_created": 1791057093,
            "description": "Channels for **backend** discussions",
            "id": 2,
            "is_archived": false,
            "name": "Backend",
            "rendered_description": "<p>Channels for <strong>backend</strong> discussions</p>"
        }
    ],
    "msg": "",
    "result": "success"
}