Can you create a MySQL DB via API json call?

Chuck Burgess

Oct 21, 2011
Cedar Hills, Utah, United States
cPanel Access Level
Website Owner
I am looking to automate the creation of a MySQL database via a json api call. To list dbs, I can just use something like:

This is successful via HTTP Sockets and CURL. Is there any equivalent call for adddb?

This doesn't work. I get the following error:

“username_†is an invalid database name. It contains invalid characters.

Any help?