Guest API WebSocket connection drops after 30 seconds of inactivity

The default widget is too bloated for our specific use case, so I’m trying to build a custom chat UI using the Guest API WebSocket endpoint. I can connect fine and send the initial connect message, but the connection dies if I don’t send a message within 30 seconds.

const socket = new WebSocket('wss://api.mypurecloud.com/api/v2/guestconversations');
socket.onopen = () => {
 socket.send(JSON.stringify({
 type: 'connect',
 payload: { 
 guestId: 'temp-123',
 skills: ['general-support']
 }
 }));
};

socket.onclose = (event) => {
 console.log('Disconnected:', event.code, event.reason);
};

The console logs Disconnected: 1001 Going Away. I’ve checked the docs and don’t see a heartbeat or ping mechanism mentioned for this specific endpoint. Is there a keep-alive message I need to send, or am I missing a configuration flag in the connect payload? The standard widget handles this smooth, but the docs for the raw API are sparse. I just need the connection to stay open while the user is typing.