Get pinned messages

GET https://connect.suryojasvi.com/api/v1/messages/pinned

The pinned messages in the conversations the user can read, most recently pinned first.

Changes: New in Zulip 13.0 (feature level ZF-3964f5).

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 GET -G https://connect.suryojasvi.com/api/v1/messages/pinned \
    -u EMAIL_ADDRESS:API_KEY

Parameters

This endpoint does not accept any parameters.

Response

Return values

  • pinned_messages: (object)[]

    The pinned messages.

    • message_id: integer

      The ID of the pinned message.

    • stream_id: integer

      For a message in a channel, the channel's ID.

    • topic: string

      For a message in a channel, its topic.

    • user_ids: (integer)[]

      For a direct message, the IDs of everyone in its conversation.

    • sender_id: integer

      The ID of the message's sender.

    • timestamp: integer

      When the message was sent, as a UNIX timestamp.

    • rendered_content: string | null

      The message's content, rendered as HTML.

    • pinned_by_id: integer

      The ID of the user who pinned it.

    • date_pinned: integer

      When it was pinned, as a UNIX timestamp.

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": "",
    "pinned_messages": [
        {
            "date_pinned": 1594825500,
            "message_id": 16,
            "pinned_by_id": 11,
            "rendered_content": "<p>Release on Friday.</p>",
            "sender_id": 10,
            "stream_id": 3,
            "timestamp": 1594825442,
            "topic": "release"
        }
    ],
    "result": "success"
}