# chat.send

Source: https://docs.lightair.app/developers/remote-api/chat.send

> Sends a chat message to the stream's chat, as the account signed in on each platform.

JSON-RPC 2.0 method of Lightair's Remote API (ws://localhost:4455/rpc). Group: Chat and voice. Script plugins need the `chat.write` permission.

Without `platform`, it goes to every connected chat. Chat must be connected in Outputs, on the destination's **Chat**.

## Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `text` | `string` | yes | The message. |
| `platform` | `string` | no | Only this platform. |
| `channel` | `string` | no | Only this channel. |
| `reply_to` | `string` | no | A message's platform id, to reply to it. |

## Result

| Name | Type | Required | Description |
|---|---|---|---|
| `sent` | `number` | no | How many chats it went to. |
| `failed` | `string[]` | no | Why it didn't reach the others. |

## Errors

A state error (-32005) with nothing to send, no chat connected, or when every send failed.

## From an AI agent

The MCP server's `send_chat` reaches this method.

## Example

```json
{ "jsonrpc": "2.0", "id": 1, "method": "chat.send", "params": { "text": "Back in five!" } }
```

Result:

```json
{ "sent": 2, "failed": [] }
```

## Related

- [chat.history](https://docs.lightair.app/developers/remote-api/chat.history.md)
- [chat.moderate](https://docs.lightair.app/developers/remote-api/chat.moderate.md)
