We’re trying to automate a few canned responses during active chat sessions using the Conversations API. The goal is to inject a message into the conversation stream grammatically when certain conditions are met in our backend logic.
I’ve been trying to find an endpoint to send a message directly to a participant, but the call returns a 200 OK, yet the message never shows up in the agent’s console or the customer’s chat window. I’ve checked the conversation logs, and there’s no trace of the message being delivered.
I’ve tried:
- Using the correct participant ID for the bot/automation participant.
- Ensuring the conversation is still active (not in “closed” state).
- Checking if the message type needs to be different (tried
text/plaininstead oftext).
The docs are pretty sparse on sending messages from non-human participants. Is there an endpoint I’m missing for injecting canned responses? Or is there a different flow for automation messages in chat?
I looked at the available endpoints and the closest thing I found is POST /api/v2/conversations/messages/agentless for sending agentless outbound messages, but that seems intended for initiating new conversations rather than injecting into an existing active chat. I’m not sure if there is a direct “send message to participant” endpoint in the current spec.
Here’s the curl command I was attempting with a hypothetical path:
curl -X POST "https://api.mypurecloud.com/api/v2/conversations/messages/agentless" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"text": "Thank you for your patience. An agent will be with you shortly.",
"type": "text"
}'
The response is just {}. No errors, no feedback. Just silence.