# Create Env

Source: https://next.coolify.io/docs/api/endpoints/databases/create-env-by-database-uuid

## POST /databases/{uuid}/envs

Create Env

Create env by database UUID.

**Authentication:** Bearer token (`bearerAuth`)

### Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| uuid | path | yes | string | UUID of the database. |

### Request body

Env created.

`application/json`, required.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| key | string | no | The key of the environment variable. |
| value | string | no | The value of the environment variable. |
| is_literal | boolean | no | The flag to indicate if the environment variable is a literal, nothing espaced. |
| is_multiline | boolean | no | The flag to indicate if the environment variable is multiline. |
| is_shown_once | boolean | no | If true, the saved value is hidden in the UI and API responses. MCP never returns environment variable values. |

### Responses

#### 201

Environment variable created.

`application/json`: object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| uuid | string | no |  |

#### 400

Invalid token.

`application/json`: object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | no |  |

#### 401

Unauthenticated.

`application/json`: object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | no |  |

#### 404

Resource not found.

`application/json`: object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | no |  |

#### 422

Validation error.

`application/json`: object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| message | string | no |  |
| errors | object | no |  |
