We’re trying to bridge NICE Cognigy voicebots into CXone Studio for complex IVR fallbacks. The Cognigy bot handles initial auth, then calls the CXone API to hand over the session to a Studio flow.
The issue is the POST /api/v2/conversations/voice/{conversationId}/participants/{participantId}/state call returns a 400 Bad Request. The error body says invalid_session_state_transition.
Here’s the JSON payload we’re sending:
{
"state": "HANDOFF",
"data": {
"flowId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"attributes": {
"cognigy_user_id": "usr_12345",
"intent_score": 0.95
}
}
}
The conversation ID is valid and the participant is currently in the ACTIVE state. We’ve verified the flow ID exists in CXone. Is there a specific prerequisite state the participant needs to be in before a handoff? Or are we missing a header? We’re using the CXone REST API directly from a Cognigy plugin node. Debugging this is painful since the logs don’t show much detail.