---
title: "Create Agency Plan website database"
method: POST
path: "/api/agency-hosting/v1/websites/{website_uid}/databases"
tags: ["Agency Hosting: Databases"]
---

# Create Agency Plan website database

`POST /api/agency-hosting/v1/websites/{website_uid}/databases`

Creates a MySQL database with a dedicated user for an Agency Plan website.

The database name, username, and password must all be provided by the caller.

## Path parameters

- `website_uid` string, required

## Request body

- AgencyHostingV1WebsitesDatabasesCreateDatabaseRequest
  - `database_name` string, required — Database name to create (alphanumeric characters).
  - `database_user` string, required — Database username to create alongside the database (alphanumeric characters).
  - `password` string, password, required — Password for the database user (requires mixed case, letters, and numbers).

## Response `200`

Success response

- AgencyHostingV1WebsitesDatabasesDatabaseResource
  - `name` string — Database name.
  - `created_at` string, date-time — Database creation date in ISO 8601 format.
  - `users` AgencyHostingV1WebsitesDatabasesDatabaseUserResource[] — Non-system users that can access the database.
    - `name` string — Database username.
    - `host` string — Database host the user is allowed to connect from.
    - `created_at` string, date-time — Database user creation date in ISO 8601 format.

## 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/74abfea76e36/schema)
