We’re trying to push a canned response into an active chat interaction programmatically using the Genesys Cloud Conversations API. The goal is to inject the text directly into the transcript for analytics tracking in New Relic.
Here is the POST request to /api/v2/conversations/chat/{conversationId}/events:
{
"type": "message",
"from": {
"id": "agent-id-here",
"name": "System Bot"
},
"text": "Here is the standard response."
}
The endpoint returns a 400 Bad Request with error_code: 400 and message: "Invalid event type or payload". We’ve tried changing type to text but the result is the same. The documentation mentions sendCannedResponse for the WebSocket API, but that doesn’t seem to exist as a REST endpoint. Is there a specific JSON structure required for the REST API to accept a canned response injection? We need this to work over HTTP, not WebSockets, for our integration pattern.