---
type: api
title: Create a Cloud Connected cluster.
description: Create a Cloud Connected cluster to onboard a self-managed cluster.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-connect/operation/operation-createcluster
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/cloud-connect/operation/operation-createcluster
products:
  - Elastic Cloud Hosted
---

# Create a Cloud Connected cluster.

- Server: `https://api.elastic-cloud.com`

## Paths

- `POST` `/api/v1/cloud-connected/clusters`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/cloud-connect/authentication#apikey)

## Description

Create a Cloud Connected cluster to onboard a self-managed cluster.

## Query String Parameters

- `create_api_key` (boolean · default: false)
  If true, the response will return an API Key with cloud-connected-admin permissions scoped to the cluster being created. This API Key will be revoked when the cluster is disconnected.

## Request Body

`application/json`

Configuration of the Cloud Connected cluster to create.

- `name` (string · max: 255) — optional
  Descriptive name for a Cloud Connected cluster.
- `self_managed_cluster` ({} SelfManagedCluster) — required
  A self-managed cluster.
  - `id` (string) — required
    ID of the self-managed cluster.
  - `name` (string) — required
    Descriptive name for a self managed cluster.
  - `version` (string) — required
    The version of the self-managed cluster.
- `license` ({} SelfManagedClusterLicense) — required
  The license of the self-managed cluster
  - `type` (enum SelfManagedClusterLicenseType) — required
    The type of the self-managed cluster license.
    Values: `trial`, `basic`, `standard`, `dev`, `silver`, `gold`, `platinum`, `enterprise`
  - `uid` (string) — required
    The unique identifier of the self-managed cluster license.

## Responses

#### `200`

The Cloud Connected cluster already existed.

`application/json`

- `id` (string · pattern: ^[a-z0-9]{32}$)
  ID of the Cloud Connected cluster.
- `name` (string · max: 255)
  Descriptive name for a Cloud Connected cluster.
- `metadata` ({} ClusterMetadata)
  Additional details about the Cloud Connected cluster.
  - `created_at` (string)
    Date and time when the cluster was onboarded.
  - `created_by` (string)
    ID of the user.
  - `organization_id` (string · pattern: ^[a-z0-9]{1,32}$)
    The Organization ID which owns the cluster.
- `self_managed_cluster` ({} SelfManagedCluster)
  A self-managed cluster.
  - `id` (string)
    ID of the self-managed cluster.
  - `name` (string)
    Descriptive name for a self managed cluster.
  - `version` (string)
    The version of the self-managed cluster.
- `license` ({} SelfManagedClusterLicense)
  The license of the self-managed cluster
  - `type` (enum SelfManagedClusterLicenseType)
    The type of the self-managed cluster license.
    Values: `trial`, `basic`, `standard`, `dev`, `silver`, `gold`, `platinum`, `enterprise`
  - `uid` (string)
    The unique identifier of the self-managed cluster license.
- `services` ({} Services)
  A list of Cloud services that can be enabled for a cluster.
  - `auto_ops` ({} ServiceAutoOps)
    Information about the state and configuration for the AutoOps service
    - `enabled` (boolean)
      whether the AutoOps service is enabled for the cluster
    - `support` ({} ServiceSupport)
      Information about whether a service is supported for a cluster
      - `supported` (boolean)
        whether the service can be enabled for the cluster
      - `valid_license_types` ([] enum SelfManagedClusterLicenseType)
        list of license types that support the service.
        Values: `trial`, `basic`, `standard`, `dev`, `silver`, `gold`, `platinum`, `enterprise`
      - `minimum_stack_version` (string)
        minimum stack version that supports the service.
    - `config` ({} ServiceAutoOpsConfig)
      Configuration for the AutoOps service
      - `region_id` (string)
        Unique human-readable identifier for a region in Elastic Cloud.
    - `metadata` ({} ServiceAutoOpsMetadata)
      Metadata information for the AutoOps service, including documentation and service URLs
      - `documentation_url` (string)
        URL to the service documentation
      - `service_url` (string)
        URL to access the service for this cluster.
      - `connect_url` (string)
        URL to connect to the service.
    - `subscription` ({} ServiceSubscription)
      Subscription requirements for a service.
      - `required` (boolean)
        Whether a subscription is required for this service.
  - `eis` ({} ServiceEIS)
    Information about the state and configuration for the EIS service
    - `enabled` (boolean)
      whether the EIS service is enabled for the cluster
    - `support` ({} ServiceSupport)
      Information about whether a service is supported for a cluster
      - `supported` (boolean)
        whether the service can be enabled for the cluster
      - `valid_license_types` ([] enum SelfManagedClusterLicenseType)
        list of license types that support the service.
        Values: `trial`, `basic`, `standard`, `dev`, `silver`, `gold`, `platinum`, `enterprise`
      - `minimum_stack_version` (string)
        minimum stack version that supports the service.
    - `metadata` ({} ServiceBaseMetadata)
      Base metadata information for a service, including documentation URL
      - `documentation_url` (string)
        URL to the service documentation
    - `subscription` ({} ServiceSubscription)
      Subscription requirements for a service.
      - `required` (boolean)
        Whether a subscription is required for this service.
- `key` (string)
  The API Key to manage the Cloud Connected cluster.
##### Response Headers

- `ETag` (string)

#### `201`

The created Cloud Connected cluster.

`application/json`

- `id` (string · pattern: ^[a-z0-9]{32}$)
  ID of the Cloud Connected cluster.
- `name` (string · max: 255)
  Descriptive name for a Cloud Connected cluster.
- `metadata` ({} ClusterMetadata)
  Additional details about the Cloud Connected cluster.
  - `created_at` (string)
    Date and time when the cluster was onboarded.
  - `created_by` (string)
    ID of the user.
  - `organization_id` (string · pattern: ^[a-z0-9]{1,32}$)
    The Organization ID which owns the cluster.
- `self_managed_cluster` ({} SelfManagedCluster)
  A self-managed cluster.
  - `id` (string)
    ID of the self-managed cluster.
  - `name` (string)
    Descriptive name for a self managed cluster.
  - `version` (string)
    The version of the self-managed cluster.
- `license` ({} SelfManagedClusterLicense)
  The license of the self-managed cluster
  - `type` (enum SelfManagedClusterLicenseType)
    The type of the self-managed cluster license.
    Values: `trial`, `basic`, `standard`, `dev`, `silver`, `gold`, `platinum`, `enterprise`
  - `uid` (string)
    The unique identifier of the self-managed cluster license.
- `services` ({} Services)
  A list of Cloud services that can be enabled for a cluster.
  Same fields as `services`
- `key` (string)
  The API Key to manage the Cloud Connected cluster.
##### Response Headers

- `ETag` (string)

#### `400`

Bad request

`application/json`

- `errors` ([] ErrorResponse)
  - `message` (string)
    A human-readable message of the error.
  - `code` (string)
    An identifier for this type of error.
#### `401`

Unauthorized

`application/json`

- `errors` ([] ErrorResponse)
  - `message` (string)
    A human-readable message of the error.
  - `code` (string)
    An identifier for this type of error.
#### `403`

Forbidden

`application/json`

- `errors` ([] ErrorResponse)
  - `message` (string)
    A human-readable message of the error.
  - `code` (string)
    An identifier for this type of error.
#### `422`

Unprocessable entity

`application/json`

- `errors` ([] ErrorResponse)
  - `message` (string)
    A human-readable message of the error.
  - `code` (string)
    An identifier for this type of error.
## Code Examples

#### Console

```console
POST /api/v1/cloud-connected/clusters
```

#### curl

```curl
curl -X POST "https://api.elastic-cloud.com/api/v1/cloud-connected/clusters"
```

