> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superskope.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit, delete, forward and pin

> Manage one exact message with independently granted action permissions.

`POST /api/v1/chats/{chatId}/messages/{messageId}/actions` performs one explicit message action. Both groups and DMs require current account/chat/message proof and a full same-chat message ID. The operation never discovers a recipient from a name or model guess.

| Action | Required scope and body |
| - | - |
| `edit` | `messages:edit`; `text` with 1–4,000 characters; linked-account own sent message only |
| `delete` | `messages:delete`; linked-account own sent message only |
| `forward` | `messages:forward` on the source plus `messages:write` on the exact selected `targetChatId` |
| `pin` | `messages:pin`; optional `days` of 1, 7 or 30 (default 7) |
| `unpin` | `messages:pin` |

Reactions use their [separate route and scope](https://docs.superskope.com/developers/reactions.md). The WhatsApp account's native permissions and service constraints still apply; an API scope does not override them.

```js theme={null}
await client.messageAction(chatId, messageId, {
  action: 'edit', text: 'The reviewed correction.',
}, { idempotencyKey: persistedEditKey });
```

Every action needs its own persisted `Idempotency-Key`. A confirmed repeat returns the saved result; it does not repeat the transport action. Changing the body under that key conflicts. An unknown outcome returns an error/unknown state and remains locked. Inspect the original operation and actual conversation before deciding on a new action.

Forwarding is another message submission. A source grant alone cannot send into an unrelated chat. Review both destinations and preserve delivery uncertainty rather than treating a forward failure as permission to resend with a new key.

The SDK exposes `messageAction`. A custom MCP host may expose the corresponding write tool only with explicit host authorization, confirmation and a stable intent key. The bundled stdio executable remains read-only.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.