Quick reply buttons returning 400 Bad Request on DFO custom channel

We’ve got a custom messaging channel wired up via the Digital First Omnichannel API. Text messages flow through fine. The moment we try to send a structured quick reply payload, the gateway throws a 400.

Here’s the JSON we’re POSTing to /api/v2/dfo/channels/{channelId}/messages:

{
 "guestId": "guest-123",
 "content": {
 "type": "structured",
 "structured": {
 "type": "quick_reply",
 "text": "Choose an option",
 "options": [
 {
 "title": "Option 1",
 "payload": "opt1"
 },
 {
 "title": "Option 2",
 "payload": "opt2"
 }
 ]
 }
 }
}

The error response is just "error": "Invalid message structure". No specifics. We’ve tried swapping structured for payload in the root object, but that just breaks text messages. Is there a specific schema version or wrapper we’re missing for the DFO endpoint? The standard Web Messaging SDK handles this automatically, but we’re bypassing it for our custom integration.

The issue is likely the missing options array in your structured object. The DFO API expects an array of selectable items, not just a single text string.

Here’s the corrected payload structure:

{
 "guestId": "guest-123",
 "content": {
 "type": "structured",
 "structured": {
 "type": "quick_reply",
 "text": "Choose an option",
 "options": [
 {
 "id": "opt-1",
 "text": "Option 1",
 "payload": "value_1"
 },
 {
 "id": "opt-2",
 "text": "Option 2",
 "payload": "value_2"
 }
 ]
 }
 }
}

Make sure each option has a unique id. The payload field is what you’ll receive back when the user selects it. If you’re still hitting 400s, check that your channel definition actually supports structured content. Some legacy custom channels don’t.