---
title: "Create a SQL database"
method: POST
path: "/storage/sqldbs"
tags: ["sql databases"]
---

# Create a SQL database

`POST /storage/sqldbs`

Creates a new SQL database. Provisioning is asynchronous: the database is returned with status `pending` and becomes usable once it reaches `provision_ok`.

## Request body

- CreateSqlDatabaseRequest
  - `name` string, required — Database name. Lowercase letters, numbers, and hyphens only; must start and end with a letter or number.

## Response `201`

SQL database created successfully (status `pending`)

- SqlDatabaseResponseWrapper
  - `data` SqlDatabase
    - `created_at` string, date-time
    - `id` string, uuid
    - `name` string
    - `record_type` string
    - `status` 'pending' | 'provision_ok' | 'provision_failed' | 'deleting' | 'delete_failed' — Provisioning status. A database is usable once `status` is `provision_ok`. Once deletion completes, the database no longer appears in the API.
    - `updated_at` string, date-time

## Other responses

- `400` — Bad request — the request body is malformed
- `401` — Unauthorized
- `409` — Conflict — a database with this name already exists for your organization
- `422` — Validation error — `name` is missing or not a valid database name
- `500` — Internal server error

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api-2/revisions/3fdc16374d70/schema)
