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.
i’m trying to set the wrap-up code for a specific participant in the conversation, but i can’t find a direct endpoint to put the wrap-up details for the conversation itself. the available endpoints seem to be get only for retrieving the wrap-up state of a participant or communication. is there a specific flow i’m missing where i need to apply the wrap-up code through a different mechanism, or is the 409 conflict related to the conversation not being in a valid state for the operation i’m attempting?
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 the platform accepts the wrap-up update? or am i missing a required header in my pre-request script?