---
title: "Delete a specific message from a Discord channel."
method: POST
path: "/deleteMessage"
---

# Delete a specific message from a Discord channel.

`POST /deleteMessage`

This function removes a specified message from a given Discord channel. It takes the channel ID and message ID as parameters and returns a Promise that resolves when the deletion is complete. This allows for programmatic management of channel content.

## Request body

- object
  - `body` object — Body of the deleteMessage sls call
    - `arguments` unknown[], required
      - unknown
    - `auth` object — Authentication object
      - `strategy` 'apikey' — Authentication strategy
      - `variables` unknown[] — Variables for the authentication strategy
        - unknown
    - `packageName` string — @microfox/discord

## Response `200`

Message successfully deleted

- object
  - `success` boolean — Indicates whether the deletion was successful

## Other responses

- `400` — Bad request - invalid channel ID or message ID
- `403` — Forbidden - insufficient permissions to delete the message
- `404` — Not found - channel or message does not exist
- `500` — Internal server error

---

[API](https://skmtc.net/microfox-ai/apis/microfox-discord-sdk-api.md) · [All operations](https://skmtc.net/microfox-ai/apis/microfox-discord-sdk-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/microfox-ai/microfox-discord-sdk-api/versions/7cb5b64ae924/schema)
