CX as Code CLI export command failing for Architect flows

Running the genesyscloud arch flow export command in our US/Eastern staging org keeps spitting out a 404 for most of the routing rules. We’ve got the CLI configured with the correct org ID and a fresh OAuth token, but the export only pulls three flows instead of the forty we have active. The JSON output shows a bunch of empty flow_data fields and the terminal throws a validation error on the second pass. Compliance needs the full dump before Friday and the Terraform state isn’t updating because the export script bails early. The token scope has architect:flow:read so it shouldn’t be blocking the request. Here is the exact command and the error trace we are getting:

genesyscloud arch flow export --org-id "a1b2c3d4-e5f6-7890-abcd-ef1234567890" --output-dir "./arch_exports" --file-format json
[2024-05-14T10:23:11Z] INFO: Starting Architect flow export...
[2024-05-14T10:23:15Z] ERROR: Failed to retrieve flow "compliance_call_routing_v2" - HTTP 404 Not Found
[2024-05-14T10:23:16Z] WARN: Skipping flow due to missing revision ID
Export complete: 3/40 flows saved.

That 404 usually means the CLI is hitting the public API instead of the org-scoped endpoint. Check your ~/.genesyscloud/config.json. Ensure base_url isn’t hardcoded to api.mypurecloud.com without the org suffix. Run genesyscloud config set base_url https://api.mypurecloud.com/api/v2 and retry.