---
title: "List pinned messages"
method: GET
path: "/v1/discord/channels/{channelId}/pins"
tags: ["Discord"]
---

# List pinned messages

`GET /v1/discord/channels/{channelId}/pins`

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).

## Path parameters

- `channelId` string, required

## Query parameters

- `accountId` string, required

## Response `200`

Pinned messages.

- object
  - `data` object[]
    - `id` string
    - `channel_id` string
    - `content` string
    - `timestamp` string, date-time
    - `author` object
    - `attachments` object[]
    - `embeds` object[]

## Other responses

- `400` — Invalid channelId or accountId format.
- `401` — Unauthorized
- `404` — Discord account not found or not accessible.
- `502` — Bot lacks access to the channel.

---

[API](https://skmtc.net/zernio/apis/zernio-api.md) · [All operations](https://skmtc.net/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zernio/zernio-api/versions/f81ca70ea6b9/schema)
