---
title: "Pin a Discord message"
method: PUT
path: "/v1/discord/channels/{channelId}/pins/{messageId}"
tags: ["Discord"]
---

# Pin a Discord message

`PUT /v1/discord/channels/{channelId}/pins/{messageId}`

Pin a specific message in a channel. Path shape mirrors Discord's own
API (`PUT /channels/{cid}/pins/{mid}`).

Idempotent — re-pinning an already-pinned message is a 204 no-op.

Constraints:
  - Bot needs MANAGE_MESSAGES in the channel.
  - 50-pin cap per channel — hitting it returns 400 (Discord-side).
    Caller should unpin one first.

## Path parameters

- `channelId` string, required
- `messageId` string, required

## Query parameters

- `accountId` string, required

## Response `200`

Message pinned (or was already pinned — idempotent).

- object
  - `success` boolean
  - `operation` 'message_pinned'
  - `channelId` string
  - `messageId` string

## Other responses

- `400` — Validation error or pin cap (50) reached.
- `401` — Unauthorized
- `404` — Discord account not found.
- `502` — Bot lacks MANAGE_MESSAGES in 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/revisions/19fd2b70854e/schema)
