PATCH /api/v2/interactions/attributes failing with 412 Precondition Failed on live voice calls

Can anyone clarify why updating participant attributes during an active voice session triggers a 412 Precondition Failed response? I am building a security audit automation that syncs external risk scores to Genesys Cloud in real-time. The goal is to write a custom attribute (ext:risk_score) to the participant object as soon as our external system updates it. I am using the Python SDK to fetch the current interaction state via GET /api/v2/interactions/{id} and immediately sending a PATCH request to /api/v2/interactions/{id}/attributes. The If-Match header is populated with the ETag returned from the GET request. However, the PATCH fails consistently with 412. I have verified that the ETag is not expired by reducing the latency between GET and PATCH to under 100ms. The JSON payload is minimal: { "attributes": { "ext:risk_score": 85 } }. I suspect the interaction lock state changes rapidly during voice media handling, causing the ETag to become invalid almost instantly. Is there a specific optimistic locking strategy or a different API endpoint designed for high-frequency attribute updates on live participants? I need to ensure the audit log captures the exact risk state at the moment of the call event.

Here is the relevant code snippet using the genesyscloud Python SDK. The error occurs at the update_interaction_attributes call. I have tried adding a retry loop with exponential backoff, but the 412 error persists because the ETag changes on every interaction update (e.g., media state changes). I cannot use the EventBridge webhook approach because I need to push data into Genesys, not just react to it. Is there a way to bypass the ETag check for specific custom attributes, or should I be using the Conversation API (/api/v2/conversations) instead of the Interactions API for this use case? The documentation is unclear on whether participant attributes are immutable once media is established. Any code examples for handling concurrent updates to live interaction metadata would be appreciated.