Update a shared topic icon

PATCH https://z.u1v.ru/api/v1/streams/{stream_id}/topics/icon

Server extension. Set or reset the icon of an existing accessible topic, including an explicitly created empty topic. Requires channel administration. Does not change the topic name.

Usage examples

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

curl -sSX PATCH https://z.u1v.ru/api/v1/streams/1/topics/icon \
    -u EMAIL_ADDRESS:API_KEY \
    --data-urlencode topic_name=Castle \
    --data-urlencode 'icon={"emoji_code": "1f604", "emoji_name": "smile", "reaction_type": "unicode_emoji"}'

Parameters

stream_id integer required in path

Example: 1

The channel ID.


topic_name string required

Example: "Castle"

The existing topic name.


icon object | null required

Example: {"emoji_name": "smile", "emoji_code": "1f604", "reaction_type": "unicode_emoji"}

JSON emoji identity, or null to reset.

icon object details:

  • emoji_name: string required

    Emoji name.

  • emoji_code: string required

    Emoji identity code.

  • reaction_type: string required

    Emoji identity namespace.

    Must be one of: "unicode_emoji", "realm_emoji", "zulip_extra_emoji".


Response

Return values

  • changed: boolean

    Whether shared metadata changed.

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:

{
    "changed": true,
    "msg": "",
    "result": "success"
}
{
    "msg": "Topic does not exist.",
    "result": "error"
}