List pinned messages in a Discord channel
Returns the channel's pinned messages, sorted most-recently-pinned first. Discord caps a channel at 50 pinned messages and returns the full list unpaginated.
Bot needs READ_MESSAGE_HISTORY in the channel (granted by default BOT_PERMISSIONS).
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Discord channel snowflake.
Query Parameters
SocialAccount _id of any Discord account in the same guild.
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.discord.listDiscordPinnedMessages({ path: { channelId: 'channel_abc123', }, query: { accountId: 'account_abc123', },});console.log(data);{
"data": [
{
"id": "string",
"channel_id": "string",
"content": "string",
"timestamp": "2019-08-24T14:15:22Z",
"author": {},
"attachments": [
{}
],
"embeds": [
{}
]
}
]
}{
"error": "Unauthorized"
}List Discord guild roles GET
Returns all roles in a Discord guild. Useful for building role-mention pickers, role-permission UIs, or finding the role ID before calling the role-assign endpoint. Roles are returned unordered — sort client-side by `position` if you need Discord's UI ordering. Caller must pass `accountId` of a Discord SocialAccount bound to this guild (route verifies team access + guild match).
List Discord scheduled events GET
Return all scheduled events in the guild. Events are distinct from messages — they appear in the server's Events panel and Discord auto-notifies interested members ahead of start time. Pass `withUserCount=true` to include `user_count` (number of members who RSVP'd) on each event. Useful for surfacing engagement.