Running into a 400 Bad Request when trying to initiate an outbound call via the Genesys Cloud API from our Kotlin backend. The error payload keeps flagging a malformed participant address, but the JSON structure looks valid against the Swagger spec.
Here’s the request body:
{
"to": {
"phoneNumber": "+18005550199",
"name": "Support Line"
},
"from": {
"phoneNumber": "+13125550100",
"name": "System Bot"
},
"wrapUpCode": {
"id": "84729103-1234-5678-9abc-def012345678"
}
}
The response is:
{
"errors": [
{
"code": "MALFORMED_REQUEST",
"message": "The participant address is malformed.",
"path": "/to"
}
]
}
I’ve verified the phoneNumber format includes the + prefix and the from number is registered in our phone number inventory. Tried stripping the name field, no change. Also attempted using userId instead of phoneNumber for the to object, but that throws a different validation error about missing phone capabilities.
Is there a specific format requirement for the to object when using the REST API directly versus the SDK? The Kotlin SDK wrapper postConversationsCalls seems to abstract this away, but I’m hitting the endpoint directly for a specific retry logic flow. Debugging logs show the header Content-Type: application/json is set correctly.
Stuck on this for an hour.