---
title: "Create account database"
method: POST
path: "/api/hosting/v1/accounts/{username}/databases"
tags: ["Hosting: Databases"]
---

# Create account database

`POST /api/hosting/v1/accounts/{username}/databases`

Creates a database with a database user and password for the specified account.

The database name and user are automatically prefixed with the account username when needed.

## Path parameters

- `username` string, required

## Request body

- HostingV1DatabasesCreateDatabaseRequest
  - `name` string, required — Database name. If the account username prefix is omitted, it is added automatically.
  - `user` string, required — Database user. If the account username prefix is omitted, it is added automatically.
  - `password` string, password, required — Database user password.
  - `website_domain` string, required — Website domain assigned to the database.

## Response `200`

Success empty response

- CommonSuccessEmptyResource
  - `message` string

## Other responses

- `401` — Unauthenticated response
- `422` — Validation error response
- `500` — Error response

---

[API](https://skmtc.net/hostinger/apis/hostinger-api.md) · [All operations](https://skmtc.net/hostinger/apis/hostinger-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hostinger/hostinger-api/revisions/5a5a54ce5eb4/schema)
