# PATCH /chat/rooms/:room_id/messages/:message_id

**Resource:** [Chat](./chat.md)  
**MCP tool:** `edit_chat_message`  
**Scopes:** `chat:write`  
**Write operation:** yes

Edit one of your own chat messages (sets edited_at). Only the original sender can edit. Pass the new `body` and/or `content`.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `room_id` | path | string | yes |  |
| `message_id` | path | string | yes |  |
| `body` | body | string | no | New message text. |
| `content` | body | object | no | New structured payload. |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X PATCH   "https://api.trustpager.com/functions/v1/api/v1/chat/rooms/:room_id/messages/:message_id"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"body":"...","content":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`