I’m trying to automate the injection of a canned response into an active chat session using the genesyscloud Terraform provider and a post-deploy script. The goal is to trigger a specific message from a backend service once a certain condition is met in our data layer, bypassing the normal agent typing flow.
I have the conversationId and the participantId for the agent. I’m trying to send a message to the conversation using the standard conversation message endpoints, but I’m finding that the available API methods for sending messages are limited to inbound open messages or typing events, and none of them appear to support injecting a standard user message into an existing active chat session via a simple POST to a conversation-specific path.
The request I was attempting to make returns a 200 OK in my local testing environment (likely hitting a mock or different version), but the message never shows up in the chat window for the agent or the customer. I’ve verified the participantId is correct by checking the conversation details endpoint. Is there a specific header or body field I’m missing to make this a visible user message instead of a system event? The docs are a bit sparse on the difference between these message types. I’ve tried adding "type": "user" but that just throws a 400 Bad Request saying the type is immutable.