---
title: "Create"
method: POST
path: "/v2/databases"
tags: ["Database (v2)"]
---

# Create

`POST /v2/databases`

## Request

- Base URL: `https://api.bunny.net/database`
- URL: `https://api.bunny.net/database/v2/databases`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `AccessKey`
- TypeScript: <https://skmtc.dev/bunny/apis/bunny-database-backend-api/docs/v2/databases/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new Database for a user

## Request body

- CreateDatabaseV2Payload: Request body for `POST /v2/databases`.
  - `name` string, required: A database name. Must be at most 16 characters.
  - `storage_region` string, required: The storage region where the data is saved at rest. Available regions come from `GET /v1/config/`.
  - `primary_regions` PossibleRegion[], required: The primary regions expected for the database. At least one.
  - `replicas_regions` PossibleRegion[], required: The replica regions expected for the database.

## Response `200`

Response body for `POST /v2/databases`.

- CreateDatabaseV2Response: Response body for `POST /v2/databases`.
  - `db_id` string, required: HTTP DTO for a database identifier. On the wire this serializes/deserializes as `db_<ULID>`. Internally it stores only the raw ULID string (no prefix).

## Other responses

- `400`: A default error response for most API errors.
- `401`: A default error response for most API errors.
- `403`: A default error response for most API errors.
- `409`: A default error response for most API errors.
- `500`: A default error response for most API errors.

## Changes

- **2026-11-12** `f3bb69bad6b6`: 2 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `403`

[Operation history](https://skmtc.dev/bunny/apis/bunny-database-backend-api/changes/v2/databases/post.md)

---

[API](https://skmtc.dev/bunny/apis/bunny-database-backend-api.md) - [All operations](https://skmtc.dev/bunny/apis/bunny-database-backend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bunny/apis/bunny-database-backend-api/revisions/f3bb69bad6b6?raw)
