I’m building a custom widget using the Embeddable Client App SDK that needs to send structured quick replies back to the guest during an active web messaging session. I’ve got the conversation ID and the participant ID from the SDK’s event listeners, but the Genesys Cloud REST API keeps rejecting the payload.
Here is the endpoint I’m hitting:
POST /api/v2/conversations/messaging/conversations/{conversationId}/participants/{participantId}/messages
The Authorization header is using a valid bearer token generated via the SDK’s auth flow, so that part checks out. The issue seems to be with the JSON structure of the content object. I’m trying to send a quick-reply message type with a few options.
Here’s the payload I’m sending:
{
"content": {
"type": "quick-reply",
"text": "Select an option:",
"quickReplies": [
{
"id": "1",
"title": "Yes"
},
{
"id": "2",
"title": "No"
}
]
}
}
The response is a 400 Bad Request with this error body:
{
"message": "Invalid input.",
"errors": [
"The content type 'quick-reply' is not supported for this message direction."
]
}
I’ve checked the Open Messaging API docs, and quick-reply is listed as a valid type for text content. I also tried switching the type to text and putting the quickReplies array in the root of content, but that just gives me a different validation error saying quickReplies is an unexpected field.
Has anyone successfully sent structured quick replies from a custom app using the REST API? Or is this something I have to do strictly through the Architect flow actions and I can’t trigger it directly from my widget code? I feel like I’m missing a specific field or nesting level here.