Version Notice: SOFT Integration is available starting from API version 2026-08-01.
The API version you have selected does not include it. Switch to 2026-08-01 to access this functionality.
The notification WebSocket lets your application know that a consultation has finished without exposing any
public HTTP endpoint. It delivers a trigger, not the clinical result.
It is also replayed. If the result was produced while you were disconnected, the next ping you send after
reconnecting returns REPORT_READY again, right after the pong. You do not need to poll to find out whether you
missed it: keep pinging and the notification reaches you.
The connection is closed after a period of inactivity. Send a ping every few minutes to keep it alive.
{
"action": "ping"
}
Idle connections are dropped after approximately 10 minutes without traffic. A keepalive every 5 minutes is a
safe interval for consultations that run longer than that.
using System.Net.WebSockets;
using System.Text;
using System.Text.Json;
var socket = new ClientWebSocket();
await socket.ConnectAsync(
new Uri($"wss://live-notifications-soft-integrations.invoxmedical.com?third-party-signature={signature}"),
CancellationToken.None);
// Keepalive every 5 minutes
_ = Task.Run(async () =>
{
while (socket.State == WebSocketState.Open)
{
await Task.Delay(TimeSpan.FromMinutes(5));
var ping = Encoding.UTF8.GetBytes("{\"action\":\"ping\"}");
await socket.SendAsync(ping, WebSocketMessageType.Text, true, CancellationToken.None);
}
});
var buffer = new byte[4096];
while (socket.State == WebSocketState.Open)
{
var result = await socket.ReceiveAsync(buffer, CancellationToken.None);
var json = Encoding.UTF8.GetString(buffer, 0, result.Count);
using var doc = JsonDocument.Parse(json);
if (doc.RootElement.GetProperty("type").GetString() == "REPORT_READY")
{
var requestId = doc.RootElement.GetProperty("requestId").GetString();
await FetchConsultationResult(requestId);
}
}
If the connection drops while the consultation is still running, reconnect with the same signature, as long as it
has not expired. If you were disconnected at the moment the consultation finished, send a ping after
reconnecting: the pending REPORT_READY is delivered along with the pong. The result is also retrievable with
Get consultation result until it expires.
Do not use the WebSocket as your only guarantee of delivery for long-running workflows. Delivery depends on your
client being connected or reconnecting, and it is never retried on its own. For unattended processing, configure
the webhook as well.