---
title: "Edits an existing message in a Discord channel, allowing modification of text content and embedded media."
method: POST
path: "/editMessage"
---

# Edits an existing message in a Discord channel, allowing modification of text content and embedded media.

`POST /editMessage`

This function updates the content of a previously sent message in a specified Discord channel. It allows for modification of both text content and embedded media. The function can replace the existing text with new content and optionally update or add an embedded image or file.

## Request body

- object
  - `body` object — Body of the editMessage 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`

Successfully edited the message

- object
  - `id` string — The ID of the edited message
  - `content` string — The updated text content of the message
  - `channel_id` string — The ID of the channel containing the message
  - `embeds` object[] — Array of embeds in the message

## Other responses

- `400` — Bad request - invalid parameters
- `403` — Forbidden - insufficient permissions to edit the message
- `404` — Message or channel not found
- `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)
