> ## 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 formatted message

## Overview

Send a formatted chat message. Provide Markdown in `message` and the server creates plain text and HTML representations for recipients to choose from.

## HTTP request

`POST /Agent/Xmpp/SendFormattedMessage`

## Authentication

Requires a valid JWT bearer token.

## Request body

```json theme={null}
{
  "to": "bob@neuron.example.com",
  "message": "# Hello\n\n**Bold** and _italic_ text.",
  "subject": "",
  "language": "en",
  "id": ""
}
```

| Field      | Type   | Required | Description                       |
| ---------- | ------ | -------- | --------------------------------- |
| `to`       | string | yes      | Recipient JID (bare or full).     |
| `message`  | string | yes      | Markdown 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-67890"
}
```

| 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/SendFormattedMessage" \
  -H "Authorization: Bearer $JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "bob@neuron.example.com",
    "message": "# Hello\n\n**Bold** and _italic_ text.",
    "language": "en"
  }'
```

## Related endpoints

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