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

# Enable Extension

`POST /v1/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

## Changes

- **2026-08-12** `f54480c4ce7f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/machines/apis/machines-api/changes/v1/postgres/:postgres_cluster_id/databases/:database_name/extensions/post.md)

---

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