---
title: "Create"
method: POST
path: "/v1/groups"
tags: ["DatabaseGroup"]
---

# Create

`POST /v1/groups`

## Request

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

Create a new DatabaseGroup for the user.

## Request body

- CreateDatabaseGroupPayload
  - `display_name` string, required: A [DatabaseGroup] display name. Must be less than 64 Characters.
  - `storage_region` string, required: The Storage Region where the data will be saved at rest. You can now about the storage region available by querying GET `/v1/config/`.
  - `primary_regions` PossibleRegion[], required: The primary regions expected for the Database
  - `replicas_regions` PossibleRegion[], required: The replicas regions expected for the Database

## Response `200`

- CreateDatabaseGroupResponse
  - `group` DatabaseGroup, required: [DatabaseGroup] returned by the API
    - `id` string, required: [DatabaseGroupId] is a `group_<ulid>`
    - `name` string, required: The [DatabaseGroup] name, unique across your account.
    - `storage_region` string, required: The current Storage Region used to store your databases.
    - `primary_regions` PossibleRegion[], required: The Primary Regions available for your Database, when your database need to be commissionned, it'll be comissionned in one of those regions.
    - `replicas_regions` PossibleRegion[], required: The Secondary Regions are the regions where your replicas will be able to be commissionned.

## Other responses

- `400`: A default error response for most API errors.
- `401`: 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.

---

[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)
