Go REST client failing to create Pure Cloud IVR flow versions with circular dependency validation

I’m spinning up a Go client to automate flow version creation through the Pure Cloud REST API. The service pushes node connection directives and variable schema references straight from our build pipeline.

Here’s the payload I’m hitting POST /api/v2/flows/{flowId}/versions with:

{
 "name": "v2-auto",
 "content": {
 "nodes": [{"id": "A", "type": "prompt"}, {"id": "B", "type": "transfer"}],
 "connections": [{"from": "A", "to": "B"}, {"from": "B", "to": "A"}]
 }
}

The endpoint throws a 400 every time. Circular dependency constraints are triggering even though I’m running a local path traversal simulation before the request leaves. I’ve got a state machine evaluation pipeline checking node limits, but the async compilation job still rejects the payload.

Current solution steps:

  1. Serialize the flow matrix to JSON.
  2. Run local loop detection.
  3. Submit via HTTP POST.
  4. Poll the async job status.

The version persistence seems to lock up during syntax verification. We’ve tried tweaking the automatic validation triggers, but the runtime deadlocks keep popping up. Latency tracking shows a 3-second compile delay, which messes with our CI/CD webhook callbacks.

How do I structure the content object to bypass the synchronous check without breaking the iteration loop? The validation pipeline blocks the response anyway.