I’ve been digging through the Conversations API docs for a bit now, trying to figure out how to programmatically send a canned response during an active chat session. We’re building a custom agent desktop, so I need this to happen via API calls rather than the standard Genesys UI.
The interaction is a standard web chat. I have the interaction ID and the participant ID. My assumption was that I’d use the POST /api/v2/conversations/messaging/messages endpoint. The docs suggest you can attach a text field, but I’m not seeing a clear way to reference a specific canned response ID or name in the payload.
If I just send the raw text string, it works, but that defeats the purpose of having a centralized library of canned responses that update in one place. I tried passing a cannedResponseId in the metadata object, hoping the platform would resolve it on the fly:
{
"participantId": "agent-participant-uuid",
"to": "customer-participant-uuid",
"text": "Checking on that for you...",
"metadata": {
"cannedResponseId": "uuid-of-canned-response"
}
}
The API returns a 200 OK, and the message sends. But the agent doesn’t get any credit for using a canned response, and analytics don’t show it as such. It just looks like a normal typed message.
Is there a different endpoint for this? Or do I need to fetch the canned response text via the Knowledge API first and then inject it into the message body manually? It feels like I’m missing a simple flag or field in the POST /api/v2/conversations/messaging/messages payload.
Also, just to be sure, I’m using the standard OAuth2 Bearer token for the authenticated agent context. No issues with auth there.