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

# Create a cluster

`POST /clusters`

## Request

- Base URL: `/management/v2/environments/DEFAULT` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/management/v2/environments/DEFAULT/clusters`
- Auth: one of:
  - HTTP basic
  - API key in cookie `Auth-Graviteeio-APIM`

User must have the ENVIRONMENT_CLUSTER[CREATE] permission.

## Request body

- CreateCluster
  - `type` 'KAFKA_CLUSTER_STANDALONE' | 'KAFKA_CLUSTER' | 'KAFKA_VIRTUAL_CLUSTER', required
  - `crossId` string: Portable identifier for cross-environment references. Auto-generated from name if not provided.
  - `name` string, required
  - `description` string
  - `configuration` object, required

## Response `201`

Cluster created

- Cluster
  - `id` string
  - `crossId` string: Portable identifier for cross-environment references. Immutable after creation.
  - `type` 'KAFKA_CLUSTER_STANDALONE' | 'KAFKA_CLUSTER' | 'KAFKA_VIRTUAL_CLUSTER'
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `name` string
  - `description` string
  - `configuration` object
  - `groups` string[]
  - `lifecycleState` 'UNDEPLOYED' | 'DEPLOYED' | 'PENDING': Current lifecycle state of the cluster.
  - `deployedAt` string, date-time: Last deployment or undeployment timestamp.
  - `version` integer: Deployment version, incremented on each deploy.

## Other responses

- `default`: Generic error response

## Changes

- **2026-04-22** `ac9b3975b952`: 1 warning, 1 info
  - added the new `KAFKA_VIRTUAL_CLUSTER` enum value to the `type` response property for the response status `201`
  - added the new `KAFKA_VIRTUAL_CLUSTER` enum value to the request property `type`
- **2026-04-22** `86ed32989ff4`: 1 breaking, 1 warning, 2 info
  - removed the enum value `KAFKA_CLUSTER_CONNECTION` of the request property `type`
  - added the new `KAFKA_CLUSTER_STANDALONE` enum value to the `type` response property for the response status `201`
  - added the new `KAFKA_CLUSTER_STANDALONE` enum value to the request property `type`
  - removed the `KAFKA_CLUSTER_CONNECTION` enum value from the `type` response property for the response status `201`
- **2026-04-20** `00b565da0a78`: 3 info
  - added the optional property `deployedAt` to the response with the `201` status
  - added the optional property `lifecycleState` to the response with the `201` status
  - added the optional property `version` to the response with the `201` status
- **2026-04-15** `576375ea01b9`: 2 info
  - added the new optional request property `crossId`
  - added the optional property `crossId` to the response with the `201` status
- **2026-04-10** `775a25fac9b4`: 1 warning, 1 info
  - added the new `KAFKA_CLUSTER` enum value to the `type` response property for the response status `201`
  - added the new `KAFKA_CLUSTER` enum value to the request property `type`

[Operation history](https://skmtc.dev/gravitee-io/apis/gravitee-io-apim-management-api-environments/changes/clusters/post.md)

---

[API](https://skmtc.dev/gravitee-io/apis/gravitee-io-apim-management-api-environments.md) - [All operations](https://skmtc.dev/gravitee-io/apis/gravitee-io-apim-management-api-environments/llms.txt) - [OpenAPI document](https://skmtc.dev/gravitee-io/apis/gravitee-io-apim-management-api-environments/revisions/b736a7e375df?raw)
