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 hitting the endpoint POST /api/v2/conversations/{conversationId}/participants/{participantId}/messages with a JSON payload that looks like this:
{
"text": "Thank you for your patience. An agent will be with you shortly.",
"type": "text"
}
The call returns a 200 OK, but 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 this endpoint even the right one for injecting canned responses? Or is there a different flow for automation messages in chat?
Here’s the curl command I’m using:
curl -X POST "https://api.mypurecloud.com/api/v2/conversations/{conversationId}/participants/{participantId}/messages" \
-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.