# Create database

`POST https://api.instacloud.com/projects/{projectId}/database/databases`

**Token scope:** `account` · `org` · `project` — read-only tokens refused (not a GET).

Create a database in the postgres server. Host remains the same; only the database name changes in connection URLs.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `branch` | query | `string` | no | branch name (default branch if omitted) |
| `group` | query | `string` | no | postgres service name (default: the sole postgres service) |
| `projectId` | path | `string` | yes |  |

## Request body (application/json)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | yes |  |

## Response 201

Default Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | no |  |
| `createdAt` | `string` | no |  |
| `connString` | `string` | no |  |
| `privateConnString` | `string` | no | the private network lane twin of connString — it CONTAINS the password, exactly like connString. Present only while the instance has private access. |

## Response 202

Default Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | `string` | yes |  |
| `approvalId` | `string` | yes |  |
| `action` | `string` | yes |  |
| `actions` | `string[]` | yes |  |
| `message` | `string` | yes |  |
| `url` | `string` | yes |  |

## Response 400

Default Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | `string` | yes |  |

## Response 403

Default Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | `string` | yes |  |

## Response 404

Default Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | `string` | yes |  |

## Response 409

Default Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | `string` | yes |  |

## Response 502

Default Response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | `string` | yes |  |
