Error while adding a new flow using the API

Forget about the notification you get in the editor - that's a separate problem.

For now, just reload the editor to get the latest flows displayed. Do the nodes you've added appear as you expect?