# POST /chat/rooms/:room_id/messages

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

Post a message to a chat room. When sent via API/MCP the message is attributed as an AI actor on the workspace's behalf (actor_type defaults to "ai"); pass actor_type "human" only when relaying a real person. Provide `body` text and/or structured `content`.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `room_id` | path | string | yes |  |
| `body` | body | string | yes | The message text. |
| `content` | body | object | no | Optional structured payload (attachments, rich content). |
| `actor_type` | body | string | no | human, ai, or system. Defaults to ai for API/MCP sends. |
| `sender_label` | body | string | no | Display label for an AI/system sender (e.g. "TrustPager AI"). |
| `reply_to_message_id` | body | string | no | UUID of the message being replied to. |
| `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 POST   "https://api.trustpager.com/functions/v1/api/v1/chat/rooms/:room_id/messages"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"body":"...","content":"...","actor_type":"..."}'
```

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