NathanLei encountered an issue when creating a user via API using node.js. Despite setting active=true, the user was still created with active=false. However, when using Postman to create a user, active=true worked as expected.
david suspected that the issue might be due to incorrect API key passing in the node.js code. After NathanLei shared his code, david suggested sending API credentials via HTTP headers instead of parameters and pointed out that sending via parameters is deprecated.
NathanLei solved the issue by adding Api-Key and Api-Username to the header and setting 'content-type': 'application/json'.
My guess is that your node.js code is not passing the API key correctly, so you are not being allowed to override the active parameter. If you can share a snippet of your code here we might be able to help out.
I don’t know much about node, but that looks ok as far as I can see.
One thing you could try is sending the API credentials via HTTP headers, rather than parameters. Sending via parameters is deprecated, and will cause a warning in your admin panel. The header names are Api-Key and Api-Username (note hyphens, not underscores). More info here.