Sending canned response in chat via /api/v2/conversations/chat/messages

I’m trying to send a canned response to a customer during an active chat session using the Genesys Cloud API. I know I can do this in the UI, but I need to trigger it programmatically from my backend service.

I’m hitting the POST /api/v2/conversations/chat/conversations/{conversationId}/messages endpoint. I have a valid OAuth token and the conversation ID. The request returns a 202 Accepted status, which seems good, but the message never appears in the chat transcript for the agent or the customer.

Here is the JSON payload I’m sending:

{
 "text": "Thanks for your patience. How can I help you today?",
 "cannedResponseId": "12345678-abcd-1234-abcd-1234567890ab"
}

I’ve checked the docs, and they mention that canned responses are handled differently than standard text messages. I tried removing the cannedResponseId and just sending text, which works fine. But when I include the ID, nothing happens.

Environment details:

  • Genesys Cloud Org ID: 123456
  • API Version: v2
  • Language: Python 3.9 with requests library
  • Endpoint: /api/v2/conversations/chat/conversations/{conversationId}/messages

Is there a specific header or parameter I’m missing? Or is this endpoint not meant for canned responses at all?