# Enable Extension (/postgres-clusters/Postgres_extensions_enable)

Enable a Postgres extension within a specific database. PostGIS extensions require a PostGIS-enabled cluster.

`POST /v1/postgres/{postgres_cluster_id}/databases/{database_name}/extensions`

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `postgres_cluster_id` | path | `string` | Yes | Managed Postgres Cluster ID |
| `database_name` | path | `string` | Yes | Database Name |

## Request Body

Type: `enablePostgresExtensionRequest`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `create_schema` | `boolean` | No | Create the schema first if it does not exist. |
| `name` | `string` | Yes | Extension to enable. |
| `schema` | `string` | No | Schema to install the extension into. Defaults to the database's default schema. |

## Responses

| Status | Description | Schema |
| --- | --- | --- |
| `204` | No Content |  |
| `400` | Database name is malformed | `PostgresErrorResponse` |
| `404` | Cluster not found | `PostgresErrorResponse` |
| `409` | 'PostGIS is not enabled on this cluster' or 'Extension <name> is already installed in schema <schema>' | `PostgresErrorResponse` |
| `422` | Unknown or unsupported extension | `PostgresErrorResponse` |

The full machine-readable OpenAPI spec is available at /openapi.json.