I've done a bit of searching around and I from what I can see it's not possible to programmatically import /export nintex forms or workflows for office 365, which is a major problem for us, I've seen on user voice they say it's a feature coming soon / under review but haven't seen any update to this for a while.
We have recently acquired nintex for a major piece of work however finding that we can't import and export programmatically means instead of making our dev team more productive it's had the complete opposite effect as we now have to manually import and export our forms through various environments, which is a non-starter.
Looking at how export works in the nintex ribbon I can see that .nwp file is posted to an endpoint :
Which then has various querystring parameters added to it, i.e. list name, site collection, licence id etc, I'm thinking that this is an API and I would like to use it however I can't seem to get an answer about if using this endpoint would be supported or not.
The only other horrible way to work round this manual import task would be to use coded ui to automate the clicking of the import button on the ribbon and then selecting a .nwp file then clicking on upload, however I can't say this is really a nice or viable solution as nintex is more likely to change the UI at some point which would then break our coded ui tests.
I'm starting to wonder now if nintex workflows are the right thing, we can automate exporting and importing of OTB office 365 forms and workflows and that was with ease and it's supportable via the Microsoft client object model, I'm am shocked that nintex doesn't offer something similar or some work around apart form it's coming very soon, that was back in August with no further update on it.