---
title: "Enable Extension"
method: POST
path: "/postgres/{postgres_cluster_id}/databases/{database_name}/extensions"
tags: ["Postgres Clusters"]
---

# Enable Extension

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

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

## Path parameters

- `postgres_cluster_id` string, required
- `database_name` string, required

## Request body

- EnablePostgresExtensionRequest
  - `create_schema` boolean — Create the schema first if it does not exist.
  - `name` string, required — Extension to enable.
  - `schema` string — Schema to install the extension into. Defaults to the database's default schema.

## Response `204`

No Content

## Other responses

- `400` — Database name is malformed
- `404` — Cluster not found
- `409` — 'PostGIS is not enabled on this cluster' or 'Extension <name> is already installed in schema <schema>'
- `422` — Unknown or unsupported extension

---

[API](https://skmtc.net/machines/apis/machines-api.md) · [All operations](https://skmtc.net/machines/apis/machines-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/machines/machines-api/versions/633ddedda749/schema)
