400 Bad Request when sending Open Messaging quick replies via /api/v2/conversations/messaging

HTTP 400 Bad Request: The request payload was invalid. The server rejected my structured message payload when attempting to send a quick reply card to an active Web Messaging session. I am using the standard Open Messaging format as documented, but the validation fails on the action payload.

{
 "to": {
 "id": "agent-user-id-123"
 },
 "type": "message",
 "content": {
 "type": "quick_reply",
 "text": "Select an option",
 "actions": [
 {
 "type": "button",
 "label": "Option A",
 "value": "val_a"
 }
 ]
 }
}

The endpoint is POST /api/v2/conversations/messaging/{conversationId}/events. The mobile SDK logs show the request is formed correctly, but the API returns a generic 400 without specific field errors. Is there a missing field or incorrect nesting for the actions array in the current API version?

Have you tried validating the action structure against the Open Messaging spec?

  • Ensure actions is an array of objects with type, payload, and label.
  • payload must be a JSON object, not a string.
  • Verify the to.id is the contact ID, not the agent ID.
{
 "to": { "id": "contact-id-xyz" },
 "type": "message",
 "content": {
 "type": "quick_reply",
 "text": "Choose an option",
 "actions": [
 {
 "type": "postback",
 "payload": { "key": "value" },
 "label": "Option 1"
 }
 ]
 }
}