Setting wrap-up codes via API after interaction ends for OTel tracing

How do I correctly set wrap-up codes programmatically after an interaction ends? We’re trying to capture the disposition in our OpenTelemetry trace.

  • Using POST /api/v2/conversations/interactions/{id}/wrap-up
  • Getting 409 Conflict
  • Payload: {“wrapUpCode”: {“id”: “123”}}
  • Interaction status is ‘completed’

The API docs say this should work, but we keep getting conflicts. Is there a race condition or a specific status we need to wait for?