Get your free beta license ↗
API operation · databases group
POST

/databases/{name}/adopt

First published 3 Oct 20260.1.0Unchanged since publication

Assign an unowned MariaDB database to a customer

Who may call it
AdministratorResellerCustomer
Token scope, any of
databasesall
Answers201 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 server

Parameters

namepath ·DatabaseNameRequired

Request body

JSON· 1 field
userUsernameRequired
A 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 sentence
400--name is required
400A <what> name is 1 to 64 letters, digits or underscores
400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter
400Username '<value>' is reserved
400user is required: the customer the database is given to
401Authentication required
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/