API operation · databases group
POST
/databases/{name}/adopt
First published 3 Oct 2026
0.1.0Unchanged since publicationAssign an unowned MariaDB database to a customer
Who may call it
AdministratorResellerCustomer
Token scope, any of
databasesallAnswers201 Created
Only administrators can call this operation. Set user to the customer who will own an existing MariaDB database with no recorded owner. The API returns 400 if user is missing or empty, or if name falls outside the allowed format of 1 to 64 ASCII letters, digits, or underscores.
UrbeStack adopts the database in place and returns it in database. It then lists the database and manages access, exports, and deletion under the customer's ownership. If MariaDB is installed and database.enabled is on, adoption also updates the grants for the customer's phpMyAdmin database user.
As a command
Run as root on the serverParameters
namepath ·DatabaseNameRequiredRequest body
JSON· 1 fielduserUsernameRequiredA username consists of lowercase letters, digits and underscores. For the user role, it also serves as the system account name.
Example
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X POST "$API/databases/alice/adopt" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"user": "alice"
}'Response ·
201 Created{
"database": {
"created_at": "2026-09-09T10:15:00Z",
"id": 1,
"measured_at": "text",
"name": "alice",
"size_bytes": 1,
"user": "alice",
"user_id": 2
}
}Errors
6 errors, each a status and a sentence400--name is required400A <what> name is 1 to 64 letters, digits or underscores400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter400Username '<value>' is reserved400user is required: the customer the database is given to401Authentication requiredNo error of this operation matches.
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/post-databases-name-adopt/