/databases/users
0.1.0Unchanged since publicationCreate a database user
databasesallMariaDB creates an account for localhost and another for 127.0.0.1. It also creates an account for ::1 when IPv6 loopback is available. All accounts use the supplied password and start with no grants. The response returns the created database user in user.
Administrators must supply user to name the customer and can choose any valid name. Customers create database users for themselves. Resellers can create database users for themselves or supply user to select one of their customers. For customers and resellers, name must start with the owner's username followed by an underscore, as in CUSTOMER_.
The API returns 400 for an administrator request without user or for a name outside the allowed format of 1 to 64 ASCII letters, digits, or underscores. UrbeStack refuses names already in use, including names created directly in MariaDB, and names reserved for phpMyAdmin sign-on.
As a command
Run as root on the serverRequest body
JSON· 3 fieldsnameDatabaseNameRequiredpasswordstring, up to 128 charactersRequireduserUsernameExample
See the API overview for how to set $API and $TOKEN.curl -sS -X POST "$API/databases/users" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "alice",
"password": "Sup3r-Secret-Passphrase",
"user": "alice"
}'201 Created{
"user": {
"created_at": "2026-09-09T10:15:00Z",
"grants": [
{
"database": "alice_shop",
"level": "full",
"privileges": "text"
}
],
"id": 1,
"name": "alice",
"other_hosts": [
"text"
],
"updated_at": "text",
"user": "alice",
"user_id": 2
}
}Errors
11 errors, each a status and a sentence400--name is required400A <what> name is 1 to 64 letters, digits or underscores400A name beginning with <SIGNON_PREFIX> is the panel's own: its phpMyAdmin users400A password is required: --password-stdin or --password-hash400Invalid password: 8 to 128 printable characters400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter400Username '<value>' is reserved400user is required: the customer the database is for401Authentication required409Database user <name> already exists409Database user <name> exists in MariaDB outside the panel; drop it at a shell, or name anotherurbestack.com/docs/api/post-databases-users/