---
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
    - `record_type` string
    - `id` string, uuid
    - `name` 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.
    - `created_at` string, date-time
    - `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

## Changes

> 99 revisions in range; 1 not diffed.

- **2026-09-16** `a6a61a29ecdd` — 4 breaking, 4 warning, 8 info
  - the `errors/items/code` response's property type changed from `string` to `integer`, and format from no format to `int32` for status `400`
  - the `errors/items/code` response's property type changed from `string` to `integer`, and format from no format to `int32` for status `401`
  - the `errors/items/code` response's property type changed from `string` to `integer`, and format from no format to `int32` for status `409`
  - the `errors/items/code` response's property type changed from `string` to `integer`, and format from no format to `int32` for status `422`
  - …12 more
- **2026-08-17** `1571b0380bd7` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/changes/storage/sqldbs/post.md)

---

[API](https://skmtc.dev/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/revisions/227c33b1ac9c?raw)
