---
title: "edit a message"
method: POST
path: "/instances/{id}/client/action/edit-message"
tags: ["message"]
---

# edit a message

`POST /instances/{id}/client/action/edit-message`

Edit a previously sent message.

## Path parameters

- `id` integer, required

## Request body

- object
  - `messageId` string, required — The ID of the message to edit
  - `message` string, required — The new message content

## Response `200`

Message edited successfully

- object
  - `data` object
    - `status` 'success' | 'error'
    - `instanceId` string
    - `data` object
      - `messageId` string
      - `edited` boolean
      - `newContent` string
  - `links` object
    - `self` string
  - `status` 'success' | 'error'

## Other responses

- `401` — Unauthorized — invalid or missing bearer token
- `403` — Forbidden — insufficient permissions or account blocked
- `404` — Not found — instance does not exist or does not belong to you
- `409` — Conflict — instance is not ready
- `422` — Validation error — invalid or missing request parameters
- `429` — Too many requests — rate limit exceeded

---

[API](https://skmtc.net/waapi/apis/waapi-api.md) · [All operations](https://skmtc.net/waapi/apis/waapi-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/waapi/waapi-api/revisions/1e2cc7c12090/schema)
