The Messaging endpoints expose XMPP messaging features over HTTP — no persistent XMPP connection required. Use these endpoints to send chat messages, manage presence subscriptions, maintain your contact roster, and retrieve queued messages. All endpoints require a valid JWT bearer token. Messages are sent and received as XMPP stanzas via the authenticated account.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.
Endpoints
| Endpoint | Description |
|---|---|
| Send text message | Send a plain text chat message to an XMPP recipient. |
| Send formatted message | Send a rich/formatted XMPP message (e.g. with XML content). |
| Send presence subscription | Request a presence subscription from a contact. |
| Send presence unsubscription | Cancel an existing presence subscription. |
| Send subscription accepted | Accept an incoming presence subscription request. |
| Send subscription declined | Decline an incoming presence subscription request. |
| Presence probe | Probe the presence of a contact to retrieve their current status and full JID. |
| Get roster | Retrieve the full contact roster for the authenticated account. |
| Get roster item | Retrieve a single contact entry from the roster. |
| Set roster item | Add or update a contact in the roster. |
| Remove roster item | Remove a contact from the roster. |
| Clear messages | Delete queued offline messages stored on the broker. |
| Pop messages | Retrieve and remove queued messages from the broker (up to a specified count). |
| Information query | Send an XMPP IQ (get or set) to a contact using their full JID. |
| Register event handler | Register (or unregister) a client-side event handler for incoming XMPP messages of a given type, namespace, or local name. |
Message retrieval
The Neuron broker queues messages for accounts that are not actively polling. Use Pop messages to retrieve queued messages and remove them from the server in one call. Use Clear messages to discard queued messages without reading them. For real-time push delivery, Register event handler lets you bind a JavaScript function to incoming message types via the/Events.js mechanism.
Presence and roster
Before you can probe a contact’s presence or send them an IQ, you need a mutual presence subscription. The typical flow:- Call Send presence subscription to request access.
- The contact accepts — call Send subscription accepted on your end.
- Call Presence probe to get their full JID for IQ queries.
Related
- Messaging guide — step-by-step walkthrough of sending messages.
- Authentication & sessions — obtain the JWT required by all messaging endpoints.