Pushing proactive messages to inactive Web Chat guests

Quick question about the Guest API. I am building a Rails middleware using Faraday to push proactive notifications to customers who had a past web messaging session but are currently inactive. I see the /api/v2/conversations endpoint, but it requires an active conversationId, which I do not have for dormant guests.

I tried constructing a payload to create a new conversation linked to the previous guestId, but the API rejects it with a 400 Bad Request. The error message says the guest is not found in the active roster, which makes sense since they are offline.

Is there a specific endpoint to re-engage a past guest or inject a message into a closed conversation? I need the exact JSON structure if this is possible via the REST API, as I want to avoid polling for active sessions.

This looks like a scope mismatch in your Faraday client. The Guest API requires webchat:write. Here is the corrected curl to link the inactive session:

curl -X POST "https://api.mypurecloud.com/api/v2/conversations" \
 -H "Authorization: Bearer $TOKEN" \
 -d '{"type":"webchat","guest":{"id":"${previous_guest_id}"}}'

Check the scope first.