---
title: "Delete a Discord channel message"
method: DELETE
path: "/v1/discord/channels/{channelId}/messages/{messageId}"
tags: ["Discord"]
---

# Delete a Discord channel message

`DELETE /v1/discord/channels/{channelId}/messages/{messageId}`

## Request

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

Deletes a message from a channel, for moderation and cleanup. This cannot be undone.

Deleting a message the bot did not send requires the bot to hold the Manage Messages
permission, which the Zernio bot requests at install time. Deleting the bot's own
message needs no extra permission.

Ownership is verified by resolving the channel's guild and confirming the caller owns
a Discord account bound to it.

## Path parameters

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

## Query parameters

- `accountId` string, required

## Response `200`

Message deleted.

- object
  - `success` boolean

## Other responses

- `400`: Invalid accountId, channelId, or messageId 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.
- `403`: Discord refused the action (bot lacks Manage Messages).
- `404`: Discord account not found, not accessible, or not bound to this channel's guild.
- `502`: Discord was unreachable or returned an unclassified error.

## 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/messages/:messageId/delete.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)
