Sticky Messages

"Sticky" messages are like bookmarks for a channel, but they are per-channel, not per-user. They will have is_sticky: true.

Users with full access to a channel are able to sticky and un-sticky messages in the channel.

Endpoints:

GET /channels/{channel_id}/sticky_messages

Token: user

Scope: messages

Retrieve sticky messsages in a channel. The requesting user must have access to the channel.

Note that the pagination_id and min_id and max_id will change as users sticky and un-sticky messages.

URL Parameters

Name Description
channel_id ID of the channel to retrieve messages from
Example
curl "https://api.pnut.io/v0/channels/5/sticky_messages" \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -H "X-Pretty-Json: 1"

Returns a list of messages.

"call for example 1"

PUT /channels/{channel_id}/messages/{message_id}/sticky

Token: user

Scope: messages

Sticky a message.

URL Parameters

Name Description
channel_id ID of the channel the message is in
message_id Message to sticky
Example
curl "https://api.pnut.io/v0/channels/5/messages/13/sticky" \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -X PUT \
    -H "X-Pretty-Json: 1"

Returns the bookmarked post.

"call for example 2"

DELETE /channels/{channel_id}/messages/{message_id}/sticky

Token: user

Scope: messages

Un-sticky a message.

URL Parameters

Name Description
channel_id ID of the channel the message is in
message_id Message to un-sticky
Example
curl "https://api.pnut.io/v0/channels/5/messages/13/sticky" \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -X DELETE \
    -H "X-Pretty-Json: 1"

Returns the message.

"call for example 3"