Stuck on the payload structure for sending rich messages via the Genesys Cloud Open Messaging API. I’ve got a simple bot flow that needs to push quick replies to the guest, but every POST to /api/v2/conversations/messaging/messages comes back with a 400. The documentation is a bit light on the exact schema for the actions array when mixing text and buttons.
Here’s the JSON I’m sending in the body:
{
"from": {
"id": "bot-id-here"
},
"text": "Please select an option:",
"actions": [
{
"type": "quick-reply",
"text": "Option A",
"payload": "opt_a"
}
]
}
The response error is just Invalid request body. No helpful details. I’ve tried changing type to button and card, but nothing sticks. The guest receives the text fine if I strip out the actions object, so auth and the conversation ID are correct.
Is there a specific wrapper I’m missing? Or does the Open Messaging API not actually support quick replies directly in the message body like the Web Messaging SDK does? Checking the event logs shows the message is being dropped before delivery.
Also, I noticed the payload field is sometimes required to be a JSON string, not a plain string. Tried that too. Still 400.