Open Messaging API rejecting structured quick replies with 400

What’s the right way to send structured quick replies via the Open Messaging API? I’ve been trying to push a card with buttons using the standard POST to /api/v2/conversations/webmessaging/messages, but it keeps failing. The payload looks valid according to the docs, yet I’m hitting a 400 Bad Request every time.

Here is the JSON body I’m sending:

{
 "content": {
 "type": "application/vnd.nice.webmessaging.card+json",
 "card": {
 "title": "Select Option",
 "buttons": [
 {
 "type": "quick_reply",
 "title": "Yes",
 "payload": "yes_option"
 }
 ]
 }
 }
}

The error response is generic: {"errorCode": "invalid_body", "message": "Invalid request body"}. I’ve checked the content-type header and it’s set to application/json. If I send a simple text message, it works fine. The issue seems to be strictly with the structured card type.

Is there a specific schema requirement for the buttons array that I’m missing? Or does the API not support quick replies in cards for webmessaging yet? I’ve tried removing the payload field and using just title, but no luck. It feels like the API is expecting a different structure for the button action. Any pointers?

You’re missing the actions array inside the card object. The API expects buttons to be defined there, not just a title. Try this structure instead:

{
 "content": {
 "type": "application/vnd.nice.webmessaging.card+json",
 "card": {
 "title": "Select Option",
 "actions": [
 {
 "type": "button",
 "label": "Option 1",
 "value": "opt1"
 }
 ]
 }
 }
}