Skip to main content

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

{
  "to": "bob@neuron.example.com",
  "message": "Hello!",
  "subject": "",
  "language": "en",
  "id": ""
}
FieldTypeRequiredDescription
tostringyesRecipient JID (bare or full).
messagestringyesPlain text body of the message.
subjectstringnoOptional subject line.
languagestringnoOptional ISO 639-1 language code.
idstringnoOptional message id.

Response

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

Example (curl)

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