Turn API on for every new user

Is it possible to turn API on for every new user?

I am using CURL api to create new website as below.

curl --include \
–request POST \
–header “Content-Type: application/json” \
–data-binary “{
“adminUser”: “admin”,
“adminPass”: “1234567”,
“domainName”: “cyberpanel.net”,
“ownerEmail”: “info@cyberpanel.net”,
“packageName”: “Default”,
“websiteOwner”: “newowner”,
“ownerPassword”: “password”
}” \

I can add the option in this API, you can control the API switch with that option. Would that be fine?

@CyberPanel I just realised it already comes with API switched “on” if I create a new website with using your API already thank you.

It would be very useful if you could add ACL selection in to API so we could also automate reseller creations or special ACL’s etc.

Thank you

I’ve added additional option to same API end point. You can pass acl

If you don’t pass this value it will default to user. (This will come in v1.9.2). It will be like

--data-binary "{
\"adminUser\": \"admin\",
\"adminPass\": \"1234567\",
\"domainName\": \"cyberpanel.net\",
\"ownerEmail\": \"info@cyberpanel.net\",
\"packageName\": \"Default\",
\"websiteOwner\": \"newowner\",
\"ownerPassword\": \"password\"
\"acl\": \"reseller\"
}" \\

Excellent thank you!

@gofast, did you solve your need? i couldn’t find a way to set active api for a new user, even through acl

@cyberpanel how can I activate the API by default for a new user? The ideal would be to pass a value in the function of creating the user.