---
title: "Create a new database user"
method: POST
path: "/api/hosting-account/database-users"
tags: ["Admin - Hosting Account Database Users"]
---

# Create a new database user

`POST /api/hosting-account/database-users`

## Request body

- object
  - `username` string, required — Database username
  - `password` string, required — Database password
  - `hosting_account_id` integer, required — ID of the hosting account

## Response `201`

Database user created successfully

- HostingAccountDatabaseUser — Database user model for HostingAccount
  - `id` integer — ID of the database user
  - `hosting_account_id` integer — ID of the related hosting account
  - `username` string — Database username
  - `username_prefix` string — Prefix for the database username

## Other responses

- `400` — Validation error or hosting account ID is required
- `403` — Unauthorized access to hosting account

---

[API](https://skmtc.dev/adminbolt/apis/adminbolt-api-documentation.md) · [All operations](https://skmtc.dev/adminbolt/apis/adminbolt-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/adminbolt/adminbolt-api-documentation/revisions/bf4f36fbfbd3/schema)
