---
title: "Create a cluster"
method: POST
path: "/clusters"
tags: ["Clusters"]
---

# Create a cluster

`POST /clusters`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/clusters`
- Auth: API key in header `API-Key`

Required scope: `clusters:write`

## Headers

- `API-Version` '2026-06-01.beta', required

## Request body

- CreateClusterRequest: Request body for creating a new cluster. Admin console SSO integration is enabled by default.
  - `name` string, required
  - `type` 'keycloak' | 'tidecloak'
  - `size` 'small' | 'medium' | 'large', required
  - `version` string, required: Cluster version in semver format. Check the documentation for the latest supported versions.
  - `location` 'us' | 'us-west' | 'ca' | 'au' | 'eu', required: Region where the cluster is hosted.
  - `management_mode` 'full': Skycloak manages the full lifecycle of the cluster. Every cluster is fully managed.
  - `features` string[]: Keycloak feature flags to enable on the cluster at creation time.
  - `features_disabled` string[]: Keycloak feature flags to disable on the cluster at creation time.
  - `http_relative_path` string: HTTP path prefix to serve Keycloak from (e.g. `/auth`). Defaults to `/`.
  - `auto_upgrade_enabled` boolean: Enable automatic patch upgrades. Requires a maintenance window; one is provisioned if not supplied.
  - `maintenance_window` MaintenanceWindow: A cluster maintenance window: when Skycloak applies upgrades and other disruptive changes.
    - `enabled` boolean, required: Whether the window is active.
    - `days_of_week` integer[], required: Days of week the window applies to (0 = Sunday ... 6 = Saturday).
    - `start_local` string, required: Local start time, `HH:MM`.
    - `end_local` string, required: Local end time, `HH:MM`.
    - `timezone` string, required: IANA timezone, e.g. `Europe/Berlin`.

## Response `201`

The request has succeeded and a new resource has been created as a result.

- Cluster: A Keycloak cluster managed by Skycloak.
  - `id` string, uuid, required
  - `name` string, required
  - `type` 'keycloak' | 'tidecloak', required
  - `size` 'small' | 'medium' | 'large', required
  - `version` string, required: Cluster version in semver format. Check the documentation for the latest supported versions.
  - `location` 'us' | 'us-west' | 'ca' | 'au' | 'eu', required: Region where the cluster is hosted.
  - `status` 'provisioning' | 'available' | 'updating' | 'degraded' | 'maintenance' | 'stopped' | 'failed' | 'deleting', required
  - `management_mode` 'full', required: Skycloak manages the full lifecycle of the cluster. Every cluster is fully managed.
  - `url` string, uri, required: Keycloak instance URL. Only non-empty once the cluster reaches `available` status.
  - `sso_enabled` boolean, required: Whether admin console SSO integration is enabled for this cluster.
  - `auto_upgrade_enabled` boolean: Whether automatic patch upgrades are enabled for this cluster.
  - `http_relative_path` string, required: Path prefix Keycloak is served from (e.g. `/auth`). Empty string means `/`.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `features` string[], required: Keycloak feature flags explicitly enabled on this cluster.
  - `features_disabled` string[], required: Keycloak feature flags explicitly disabled on this cluster.

## Other responses

- `400`: The server could not understand the request due to invalid syntax.
- `401`: Access is unauthorized.
- `402`: Client error
- `403`: Access is forbidden.
- `422`: Client error
- `429`: Client error
- `500`: Server error
- `501`: Server error

---

[API](https://skmtc.dev/skycloak/apis/skycloak-public-api.md) · [All operations](https://skmtc.dev/skycloak/apis/skycloak-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/skycloak/apis/skycloak-public-api/revisions/33a69e2ce35f?raw)
