> ## Documentation Index
> Fetch the complete documentation index at: https://artie.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Managed Kafka cluster

> Saves a Managed Kafka cluster with status deploying and starts deploying it. An account on a public or disposable email domain, or an API key it made, gets a 403, unless an app setting allows them. A company not yet paying Artie needs a card on file first, or gets a 402. Company admins only.



## OpenAPI

````yaml https://raw.githubusercontent.com/artie-labs/artie-api-spec/refs/heads/master/openapi.yaml post /kafka-clusters
openapi: 3.1.0
info:
  description: External API endpoints for Artie
  title: Artie API
  version: v1.0.200
servers:
  - url: https://api.artie.com
security:
  - ApiKey: []
paths:
  /kafka-clusters:
    post:
      tags:
        - Kafka clusters
      summary: Create a Managed Kafka cluster
      description: >-
        Saves a Managed Kafka cluster with status deploying and starts deploying
        it. An account on a public or disposable email domain, or an API key it
        made, gets a 403, unless an app setting allows them. A company not yet
        paying Artie needs a card on file first, or gets a 402. Company admins
        only.
      operationId: kafka_cluster_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RouterCreateKafkaClusterRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayloadsKafkaCluster'
          description: OK
        '400':
          description: Bad Request
        '402':
          description: Payment Required
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '424':
          description: Failed Dependency
        '500':
          description: Internal Server Error
components:
  schemas:
    RouterCreateKafkaClusterRequest:
      properties:
        allowedCIDRs:
          description: >-
            Client IP ranges allowed to reach the cluster. Empty allows any IP;
            clients still need the password.
          items:
            type: string
          type: array
        brokers:
          default: 3
          maximum: 30
          minimum: 3
          type: integer
        instanceType:
          $ref: '#/components/schemas/PayloadsKafkaInstanceType'
          default: r8g.large
        localRetentionBytes:
          description: >-
            Disk cap per partition: the most broker disk each partition of a
            tiered topic keeps, in bytes, at least 1073741824 (1 GiB). Null is
            no cap.
          type:
            - 'null'
            - integer
        localRetentionMS:
          description: >-
            Days on disk: how long tiered topics keep data on broker disks, in
            ms, from 86400000 (one day) to 1209600000 (14 days). Every topic
            that doesn't set log.local.retention.ms inherits it. Left out is 3
            days.
          type:
            - 'null'
            - integer
        name:
          description: >-
            The cluster's name, as customers see it. 3 to 100 characters. The
            cluster's ID, which its address and Kubernetes objects use, is
            generated.
          maxLength: 100
          minLength: 3
          type: string
        region:
          type: string
        storageAutoscale:
          $ref: '#/components/schemas/PayloadsKafkaClusterStorageAutoscale'
          description: >-
            How Artie grows the brokers' disks before they fill. Left out is on,
            growing at 65% to 55%, with no limit.
        storageGiB:
          description: >-
            Disk per broker in GiB: 20, 50 or 80, or any size from 100 to 1024
            (1 TiB). Bigger sizes go through support.
          maximum: 1024
          minimum: 20
          type: integer
        tieredStorage:
          description: >-
            Whether Artie turns tiered storage on for every topic that hasn't
            set it either way. The setup form starts it on.
          type: boolean
      required:
        - name
        - region
        - brokers
        - instanceType
        - storageGiB
        - allowedCIDRs
        - tieredStorage
      type: object
    PayloadsKafkaCluster:
      properties:
        cloud:
          type: string
        createdAt:
          format: date-time
          type: string
        dataKeptUntil:
          description: >-
            When a deleted Managed Kafka cluster's data is deleted for good. It
            can be restored until then. Only set while status is deleted.
          format: date-time
          type: string
        deployStage:
          $ref: '#/components/schemas/EnumsKafkaDeployStage'
          description: >-
            The step a Managed Kafka cluster's deploy is on. Only set while
            status is deploying, or failed, where it is the step the deploy
            stopped at.
        disableTLS:
          type: boolean
        externalBootstrapURL:
          type: string
        isManaged:
          description: >-
            Whether this is a Managed Kafka cluster that Artie runs for the
            company.
          type: boolean
        localRetentionBytes:
          description: >-
            Disk cap per partition: the most broker disk each partition of the
            cluster's tiered topics keeps, in bytes (log.local.retention.bytes).
            Missing when there is no cap.
          type:
            - 'null'
            - integer
        localRetentionMS:
          description: >-
            Days on disk: how long the cluster's tiered topics keep data on
            broker disks, in ms (log.local.retention.ms). Missing on clusters
            made before it, whose brokers use Kafka's default.
          type:
            - 'null'
            - integer
        managed:
          $ref: '#/components/schemas/PayloadsKafkaClusterManaged'
          description: >-
            A Managed Kafka cluster's configuration. Only set when isManaged,
            and only by Get a Kafka cluster.
        name:
          type: string
        region:
          type: string
        shuttingDown:
          description: >-
            Whether a deleted Managed Kafka cluster is still being taken down.
            It can't be restored until that finishes. Only set in the clusters
            list.
          type: boolean
        status:
          $ref: '#/components/schemas/EnumsKafkaStatus'
        statusMessage:
          description: >-
            Why the last deploy of a Managed Kafka cluster failed. Only set
            while status is failed.
          type: string
        storageAutoscale:
          $ref: '#/components/schemas/PayloadsKafkaClusterStorageAutoscale'
          description: >-
            A Managed Kafka cluster's storage autoscaling. Only set when
            isManaged.
        tierAllTopics:
          description: >-
            Whether Artie turns tiered storage on for every topic of a Managed
            Kafka cluster that doesn't choose otherwise.
          type: boolean
        tieredStorageAvailable:
          description: >-
            Whether tiered storage is available on this cluster. Artie turns it
            on once the cluster's brokers have tiered storage.
          type: boolean
        tieredStorageSyncedAt:
          description: >-
            When the sync last made a Managed Kafka cluster's topics match the
            tiered storage choice for each. Missing until its first run.
          format: date-time
          type: string
        updatedAt:
          description: >-
            When the cluster row last changed. A deploying cluster can be
            retried 20 minutes after this.
          format: date-time
          type: string
        usesScram:
          type: boolean
        uuid:
          format: uuid
          type: string
      required:
        - uuid
        - name
        - createdAt
        - updatedAt
        - status
        - externalBootstrapURL
        - usesScram
        - disableTLS
        - cloud
        - region
        - tieredStorageAvailable
        - isManaged
        - tierAllTopics
      type: object
    PayloadsKafkaInstanceType:
      enum:
        - m8g.2xlarge
        - m8g.4xlarge
        - m8g.xlarge
        - m8i.2xlarge
        - m8i.4xlarge
        - m8i.xlarge
        - r8g.2xlarge
        - r8g.large
        - r8g.xlarge
        - r8i.2xlarge
        - r8i.large
        - r8i.xlarge
      type: string
    PayloadsKafkaClusterStorageAutoscale:
      properties:
        bumpAtPercent:
          description: >-
            How full, in %, a broker's disk gets before every broker's disk
            grows. At most 99. Defaults to 65.
          maximum: 99
          minimum: 1
          type: integer
        enabled:
          description: Whether Artie grows the brokers' disks before they fill.
          type: boolean
        maxGiB:
          description: >-
            The most disk per broker, in GiB, a grow goes to. Missing is no
            limit.
          minimum: 1
          type: integer
        targetPercent:
          description: >-
            How full, in %, the fullest broker's disk is after a grow. Less than
            bumpAtPercent. Defaults to 55.
          maximum: 98
          minimum: 1
          type: integer
      required:
        - enabled
        - bumpAtPercent
        - targetPercent
      type: object
    EnumsKafkaDeployStage:
      enum:
        - applying_custom_resources
        - issuing_tls_certificate
        - provisioning_broker_nodes
        - starting_kafka_brokers
        - creating_load_balancer
      type: string
    PayloadsKafkaClusterManaged:
      properties:
        allowedCIDRs:
          description: >-
            Client IP ranges allowed to reach the cluster. Empty when any IP can
            connect.
          items:
            type: string
          type: array
        brokers:
          type: integer
        instanceType:
          type: string
        kafkaVersion:
          type: string
        pendingChange:
          $ref: '#/components/schemas/PayloadsKafkaClusterChange'
          description: >-
            The cluster's latest change that isn't applied yet. Missing once
            every change is applied, and while the cluster isn't active.
        storageGiB:
          description: Disk per broker in GiB.
          type: integer
      required:
        - brokers
        - instanceType
        - storageGiB
        - allowedCIDRs
        - kafkaVersion
      type: object
    EnumsKafkaStatus:
      enum:
        - draft
        - active
        - deploying
        - failed
        - deleted
      type: string
    PayloadsKafkaClusterChange:
      properties:
        field:
          description: >-
            The setting the change is to. The other fields already show its new
            value.
          enum:
            - allowedCIDRs
            - storageGiB
            - brokers
            - instanceType
            - tieredStorage
          type: string
        startedAt:
          description: When the change was saved.
          format: date-time
          type: string
        state:
          description: >-
            Applying until the apply's time limit after the save has passed (15
            minutes plus a broker roll per broker, plus 5 minutes), then failed:
            the apply failed or was lost. Saving the same value again retries
            it.
          enum:
            - applying
            - failed
          type: string
        summary:
          description: >-
            What the change does, as the Activity feed says it, such as "Grew
            broker storage from 50 GiB to 80 GiB".
          type: string
      required:
        - state
        - field
        - summary
        - startedAt
      type: object
  securitySchemes:
    ApiKey:
      description: API key passed as a Bearer token in the Authorization header.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.