Genesys Cloud API: Setting wrap-up code via POST /api/v2/conversations/interactions/{id}

We’ve got a Go service handling post-call logic, and I’m trying to set the wrap-up code programmatically after the interaction ends. The docs suggest using POST /api/v2/conversations/interactions/{id} with a body containing wrapupCode, but I keep hitting a 400 Bad Request saying “Invalid input.” I’m sending a simple JSON payload like {"wrapupCode": "12345678901234567890123456789012"} (a valid UUID from our wrapup code list), and the interaction is definitely in the WRAPUP state when the request fires.

Here’s the relevant snippet from our client. The auth header is fine since other endpoints work, and the interaction ID is correct. Am I missing a specific header or is the payload structure wrong? I’ve tried adding interactionType too, but no luck.

reqBody := map[string]string{"wrapupCode": "12345678901234567890123456789012"}
jsonBody, _ := json.Marshal(reqBody)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonBody))
req.Header.Set("Content-Type", "application/json")
// ... send request ...