Skip to main content

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

{
  "to": "bob@neuron.example.com",
  "message": "# Hello\n\n**Bold** and _italic_ text.",
  "subject": "",
  "language": "en",
  "id": ""
}
FieldTypeRequiredDescription
tostringyesRecipient JID (bare or full).
messagestringyesMarkdown body of the message.
subjectstringnoOptional subject line.
languagestringnoOptional ISO 639-1 language code.
idstringnoOptional message id.

Response

{
  "sent": true,
  "id": "msg-67890"
}
FieldTypeDescription
sentbooleanWhether the stanza was sent.
idstringMessage id. Generated if not provided.

Example (curl)

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"
  }'