Setting wrap-up code via REST Proxy returns 400 Bad Request

I’m trying to set a wrap-up code programmatically for a concluded voice interaction using the CXone REST Proxy action. The goal is to update the interaction metadata after the agent has hung up.

I’m calling POST /api/v2/conversations/voice/{conversationId}/wrapup.

Here is the JSON payload I’m sending:

{
 "wrapUpCode": {
 "id": "5f3a2b1c-8d7e-4f9a-b0c1-2d3e4f5a6b7c"
 }
}

The response comes back as a 400 Bad Request. The error message says:

{"code":"invalid.request","message":"The request body is invalid"}

I’ve verified the conversation ID is correct and the interaction status is completed. The wrap-up code ID exists in our queue settings.

I tried adding wrapUpCode directly in the root of the JSON object instead of nesting it, but that just gave me a different validation error.

Does the API expect a different structure for the wrapUpCode object? I can’t find a clear example in the docs for this specific endpoint.