---
title: "Create Database"
method: POST
path: "/v1/organizations/{organizationSlug}/databases"
---

# Create Database

`POST /v1/organizations/{organizationSlug}/databases`

Creates a new database in a group for the organization or user.

## Path parameters

- `organizationSlug` string, required

## Request body

- CreateDatabaseInput
  - `name` string, required — The name of the new database. Must contain only lowercase letters, numbers, dashes. No longer than 64 characters.
  - `group` string, required — The name of the group where the database should be created. **The group must already exist.**
  - `seed` object
    - `type` 'database' | 'database_upload' — The type of seed to be used to create a new database. Use `database` to copy from an existing database, or `database_upload` to [upload a SQLite database file](/api-reference/databases/upload).
    - `name` string — The name of the existing database when `database` is used as a seed type.
    - `timestamp` string — A formatted [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) recovery point to create a database from. This must be within the last 24 hours, or 30 days on the scaler plan.
  - `size_limit` string — The maximum size of the database in bytes. Values with units are also accepted, e.g. 1mb, 256mb, 1gb.
  - `remote_encryption` object — Encryption configuration for the database. Can be used when creating a new encrypted database, creating a encrypted database from upload (`seed.type = "database_upload"`), or forking from an encrypted database (required when the source database is encrypted).
    - `encryption_key` string — Base64-encoded encryption key. Key size depends on cipher: 32 bytes for aes256gcm, chacha20poly1305, aegis256 variants; 16 bytes for aes128gcm, aegis128l variants.
    - `encryption_cipher` 'aes256gcm' | 'aes128gcm' | 'chacha20poly1305' | 'aegis128l' | 'aegis128x2' | 'aegis128x4' | 'aegis256' | 'aegis256x2' | 'aegis256x4' — The encryption cipher to use.

## Response `200`

Successful response

- object
  - `database` CreateDatabaseOutput
    - `DbId` DbId — unresolved $ref
    - `Hostname` Hostname — unresolved $ref
    - `Name` Name — unresolved $ref

## Other responses

- `400` — Bad Request
- `409` — Conflict

---

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