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

# Create a database

`POST /workspace/sql/databases`

Create a new database for your account.

## Request body

- DatabaseRequest
  - `name` string, required — Name of the database
  - `active` boolean — Whether the database is active

## Response `201`

Database created successfully.

- DatabaseDetailResponse
  - `state` string
  - `data` DatabaseDetail, required — Detailed database representation with extended status information.
    - `id` integer, required — Unique identifier for the database
    - `name` string, required — Name of the database
    - `status` 'creating' | 'created' | 'deleting', required — Current status of the database * `creating` - creating * `created` - created * `deleting` - deleting
    - `active` boolean — Whether the database is active
    - `last_modified` string, date-time, required — Last modification timestamp
    - `last_editor` string, nullable, required — Last editor of the schema.
    - `product_version` string, required — Product version

## Other responses

- `202` — Database creation request accepted and is being processed asynchronously.
- `400` — Validation Error
- `401` — Authentication Failed
- `403` — Permission Denied
- `404` — Not Found
- `405` — Method Not Allowed
- `406` — Not Acceptable
- `422` — Unprocessable Entity
- `429` — Throttled
- `500` — Internal Server Error

---

[API](https://skmtc.dev/azion/apis/azion-api.md) · [All operations](https://skmtc.dev/azion/apis/azion-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azion/azion-api/revisions/bb3250697218/schema)
