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

# List pinned messages

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

## Request

- Base URL: `https://zernio.com/api`
- URL: `https://zernio.com/api/v1/discord/channels/{channelId}/pins`
- Auth: HTTP bearer

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`: Missing or invalid API key. `code` is `missing_credentials` when no Authorization header was sent and `invalid_credentials` when the key is unknown, revoked or expired.
- `404`: Discord account not found or not accessible.
- `502`: Bot lacks access to the channel.

## Changes

- **2026-10-06** `f8c8f34fb41a`: 1 warning
  - added the new `account` enum value to the `details/budgetScope` response property for the response status `401`
- **2026-10-02** `d556591af3f6`: 7 info
  - added the optional property `code` to the response with the `401` status
  - added the optional property `details` to the response with the `401` status
  - added the optional property `docUrl` to the response with the `401` status
  - added the optional property `param` to the response with the `401` status
  - …3 more

[Operation history](https://skmtc.dev/zernio/apis/zernio-api/changes/v1/discord/channels/:channelId/pins/get.md)

---

[API](https://skmtc.dev/zernio/apis/zernio-api.md) · [All operations](https://skmtc.dev/zernio/apis/zernio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zernio/apis/zernio-api/revisions/4e74db179e73?raw)
