Trying to push a structured message with quick replies via the Open Messaging API. Using the standard POST /api/v2/conversations/messaging/contacts/{contactId}/messages endpoint. The payload looks correct according to the spec, but the response is a 400 Bad Request with a generic validation error. No specific field is flagged in the error body. Here’s the JSON I’m sending:
{
"type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"content": {
"type": "quickReply",
"text": "Select an option",
"quickReplies": [
{ "text": "Option 1", "value": "opt1" },
{ "text": "Option 2", "value": "opt2" }
]
}
}
I’ve verified the contact ID is valid and the conversation is active. The issue seems to be with the content structure. Is there a specific schema version required for quick replies? The SDK documentation is vague on the exact nesting for quickReplies. Any hints on what might be causing the validation failure?
that application/vnd.openxmlformats-officedocument.wordprocessingml.document type is definitely the culprit. you’re trying to send a Word doc mime type in a messaging payload that expects plain text or specific structured types like application/vnd.genesis.quickreply. the API validator sees that mime type and immediately bails because it’s not a valid message part type for this endpoint.
you’ll need to switch the type to application/vnd.genesis.quickreply and ensure the content field is an object containing the quickReplies array. each reply needs a label and a value. the value is what gets sent back to your webhook.
here’s the corrected payload structure:
{
"type": "application/vnd.genesis.quickreply",
"content": {
"quickReplies": [
{
"label": "Yes",
"value": "yes_option"
},
{
"label": "No",
"value": "no_option"
}
]
}
}
if you’re using the PureCloud SDK, it’s easier to let the builder handle the serialization so you don’t miss a bracket.
var message = new MessageCreateRequest
{
Type = "application/vnd.genesis.quickreply",
Content = new QuickReplyMessageContent
{
QuickReplies = new List<QuickReply>
{
new QuickReply { Label = "Yes", Value = "yes_option" },
new QuickReply { Label = "No", Value = "no_option" }
}
}
};
await client.ConversationsApi.PostConversationsMessagingContactMessages(contactId, message);
just double-check that the contact is actually on a channel that supports quick replies. some older SMS gateways might strip them out.