---
title: "Create a database"
method: POST
path: "/v1/databases"
tags: ["Databases"]
---

# Create a database

`POST /v1/databases`

create a database that user owns

## Request body

- CreateDatabases
  - `hostname` string — The hostname of databases that you want to create
  - `options` object
    - `standaloneReplicaSet` boolean
  - `publicNetwork` boolean — The publicNetwork of databases that you want to create
  - `type` string — The type of databases that you want to create
  - `planID` string — The planID of databases that you want to create
  - `version` string — The version of databases that you want to create

## Response `200`

Successful operation

- object
  - `databaseID` string

## Other responses

- `400` — Bad request
- `401` — Missing authentication
- `409` — Conflict

## Changes

> 19 revisions in range; 1 not diffed.

- **2023-10-06** `5f87209bfb82` — 1 breaking, 2 info
  - removed the media type `Databaselication/json` from the request body
  - added the media type `application/json` to the request body
  - added the media type `application/json` for the response with the status `200`
- **2023-09-28** `9f7f05298db1` — 1 info
  - api operation id `createDatabase` was added
- **2023-09-25** `47b5df51d3e7` — 1 breaking
  - added required request body

[Change history](https://skmtc.dev/liara-cloud/apis/dbaas/changes/v1/databases/post.md)

---

[API](https://skmtc.dev/liara-cloud/apis/dbaas.md) · [All operations](https://skmtc.dev/liara-cloud/apis/dbaas/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/liara-cloud/dbaas/revisions/6423b3e16f16/schema)
