# POST /databases/phpmyadmin

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the databases group.

Create a phpMyAdmin sign-on URL

- Who may call it: administrator, reseller, customer
- Token scope, any of: databases, all
- Answers: 200 OK

Send the browser to url within one minute and use it once. The response includes expires_at, the URL's expiration time. Sign-on uses the caller's own hidden database user. A customer's database user can access all databases they own. An administrator's database user can access the entire MariaDB server.

UrbeStack creates the hidden database user on first sign-on and sets a new password on each sign-on. phpMyAdmin redeems the token for the database credentials and discards the temporary copy. UrbeStack retires the password after it has gone unused by phpMyAdmin sessions for the configured idle limit.

A nonempty return_url must start with http:// or https:// and contain 1 to 1990 characters after that prefix, within the 2000-character limit. Whitespace, quotes, angle brackets, and backslashes are disallowed. The API returns 400 for an invalid return_url.

## As a command

- [urbestack-database-signon](https://urbestack.com/docs/commands/urbestack-database-signon.md): Returns a one-time phpMyAdmin sign-on URL for the account named by --user.

## Request body

JSON.

- `return_url` (string, up to 2000 characters): URL of the client's page where phpMyAdmin sends the browser after logout or sign-on expiration. By default, phpMyAdmin shows a signed-out page.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X POST "$API/databases/phpmyadmin" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "return_url": "text"
  }'
```

Response, 200 OK:

```
{
  "expires_at": "2026-09-16T10:15:00Z",
  "url": "text"
}
```

## Errors

- 400: The return address is an http or https address, at most 2000 characters
- 401: Authentication required
