Cxone-export all flows returns partial data and missing sub-flows

Trying to get a full dump of our Architect environment for backup purposes. I’ve been using the CX as Code CLI tool (version 1.8.2) with the cxone export command. The basic flow export works, but it’s not pulling in all the nested sub-flows or the custom data actions linked to them.

Here is the command I’m running:

cxone export --resource-type flows --output-dir ./backup/flows --recursive

The tool finishes without errors, but when I check the JSON files in the output directory, several complex flows are missing their referenced sub-flow IDs. Instead of the actual ID, I see null or a placeholder string like REF_MISSING. When I try to import this later using cxone import, it fails with a 400 Bad Request because the references are broken.

I’ve tried adding the --force flag, but that just skips the validation and still writes the incomplete JSON. I also checked the API directly with a GET request to /api/v2/architect/flows and the response includes all the IDs correctly, so the issue seems specific to how the CLI parses or serializes the dependencies.

Has anyone found a way to force the CLI to resolve all nested dependencies before writing the JSON? Or is there a different command I should be using for a complete export?

Check your auth token scopes. You need platform-admin:architect:read

If using CLI config, verify ~/.genesyscloud/config.json has the right client_id


The recursive flag won't pull sub-flows if your auth token lacks the specific `platform-admin:architect:read` scope. The CLI often defaults to a restricted token when you just run `cxone login` without specifying the full admin scope. That explains why the main flows come through but the nested dependencies vanish. It's not a bug in the exporter, it's a permission boundary. Check your token payload in a debugger or use the `--force-refresh` flag to grab a new one with elevated privileges. If that still fails, you might be hitting the 500 error we saw earlier with complex flow definitions, but start with the scope check first. It's the usual suspect.