Quick question about programmatically setting wrap-up codes after an interaction ends. i’m hitting a persistent 409 conflict error when trying to update the wrap-up state via the conversations api. my postman collection is set up to trigger this immediately after the state changes to wrapup in the websocket event stream, but the platform refuses the update.
here’s the payload i’m sending to put /api/v2/conversations/{conversationId}/wrapup:
{
"wrapupCode": {
"id": "my-wrapup-code-id-from-api-v2",
"name": "Data Entry"
},
"wrapupText": "Updated via api"
}
the response body says "code":"conflict","message":"conversation is not in a valid state for wrap-up". i’ve verified the conversation id is correct and the user making the request has the conversation:conversation:wrapup permission. i’m using the same oauth token that successfully creates the initial conversation record. is there a race condition where i need to wait for a specific internal state change before this endpoint accepts the payload? or am i missing a required header in my pre-request script?