Pinning is a moderation action. Only an Admin or Moderator — a group owner
included — may pin or unpin. The server is the authority: a member’s call is
rejected with
ERR_ACTION_NOT_ALLOWED.Pin a Message
CallpinMessage() with the message’s ID. It resolves with the full updated message, with pinnedAt and pinnedBy set.
- TypeScript
- JavaScript
pinnedBy and pinnedAt to the most recent pinner rather than failing.
Unpin a Message
- TypeScript
- JavaScript
Fetch Pinned Messages
Build aMessagesRequest with setPinned(true). A pinned list belongs to one conversation, so pair it with setUID() for a one-on-one conversation or setGUID() for a group — exactly one of the two is required.
- TypeScript
- JavaScript
A conversation can hold at most 100 pinned messages, so
setLimit(100) fetches
the whole list in a single call — which is what you want when showing a pinned
count in a header.Check if a Message is Pinned
EveryBaseMessage carries its pin state. The presence of pinnedAt is the boolean — an unpinned message simply has no pin attributes.
- TypeScript
- JavaScript
Real-time Pin Events
Pin and unpin are broadcast to everyone in the conversation. Add the callbacks to your existingMessageListener.
- TypeScript
- JavaScript
Pin Limit
A conversation holds a capped number of pins, configurable per app. Read the cap rather than hard-coding it — it is tenant-overridable and will drift.- TypeScript
- JavaScript
null when the app settings carry no value — show generic copy in that case rather than guessing a number. getSystemPinnedMessagesLimit() is the separate cap for admin/global pins, enforced independently of the per-user one.
Feature Availability
Check whether Pin Message is enabled for your app before showing pin actions.- TypeScript
- JavaScript
false rather than rejecting when the flag is missing or settings are unavailable, so an unavailable setting degrades to “hidden” instead of an unhandled rejection.
Next Steps
Save A Message
Bookmark a message privately, across conversations
Pin A Conversation
Pin a conversation to the top of the list
All Real Time Listeners
Every listener the SDK exposes, in one place
Additional Message Filtering
Filter messages by pinned, saved, type, tags and more