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

# Send text message

## Overview

Send a plain text chat message from the authenticated account to an XMPP recipient.

## HTTP request

`POST /Agent/Xmpp/SendTextMessage`

## Authentication

Requires a valid JWT bearer token.

## Request body

```json theme={null}
{
  "to": "bob@neuron.example.com",
  "message": "Hello!",
  "subject": "",
  "language": "en",
  "id": ""
}
```

| Field      | Type   | Required | Description                       |
| ---------- | ------ | -------- | --------------------------------- |
| `to`       | string | yes      | Recipient JID (bare or full).     |
| `message`  | string | yes      | Plain text body of the message.   |
| `subject`  | string | no       | Optional subject line.            |
| `language` | string | no       | Optional ISO 639-1 language code. |
| `id`       | string | no       | Optional message id.              |

## Response

```json theme={null}
{
  "sent": true,
  "id": "msg-12345"
}
```

| Field  | Type    | Description                            |
| ------ | ------- | -------------------------------------- |
| `sent` | boolean | Whether the stanza was sent.           |
| `id`   | string  | Message id. Generated if not provided. |

## Example (curl)

```bash theme={null}
curl -sS "https://$NEURON_HOST/Agent/Xmpp/SendTextMessage" \
  -H "Authorization: Bearer $JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "bob@neuron.example.com",
    "message": "Hello from the Agent API!",
    "language": "en"
  }'
```

## Related endpoints

* [Send formatted message](/neuron-api/api-reference/messaging/send-formatted-message)
