---
title: "POST /public/kafka/v2/cluster/{cluster}/topic"
method: POST
path: "/public/kafka/v2/cluster/{cluster}/topic"
tags: ["cli_topic_kafka_v2_12"]
---

# POST /public/kafka/v2/cluster/{cluster}/topic

`POST /public/kafka/v2/cluster/{cluster}/topic`

## Request

- Base URL: `https://developers.conduktor.io` (the document declares no server; this is the origin it was published from)
- URL: `https://developers.conduktor.io/public/kafka/v2/cluster/{cluster}/topic`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/conduktor/apis/conduktor-console-api/docs/public/kafka/v2/cluster/:cluster/topic/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a Topic

## Path parameters

- `cluster` string, required

## Request body

- TopicResourceV2
  - `apiVersion` string, required
  - `kind` 'Topic', required
  - `metadata` TopicMetadata, required
    - `name` string, required
    - `cluster` string, required
    - `labels` MapLabelKeyString
    - `catalogVisibility` 'PRIVATE' | 'PUBLIC'
    - `descriptionIsEditable` boolean
    - `description` string
    - `sqlStorage` TopicSqlStorage
      - `retentionTimeInSecond` integer, required
      - `enabled` boolean
  - `spec` TopicSpec, required
    - `partitions` integer, required
    - `replicationFactor` integer: Number of replicas. When creating a topic, -1 means use the cluster's default.replication.factor.
    - `configs` TopicConfigMap

## Response `200`

- TopicCreateResultV2
  - `resource` TopicResourceV2, required
    - `apiVersion` string, required
    - `kind` 'Topic', required
    - `metadata` TopicMetadata, required
      - `name` string, required
      - `cluster` string, required
      - `labels` MapLabelKeyString
      - `catalogVisibility` 'PRIVATE' | 'PUBLIC'
      - `descriptionIsEditable` boolean
      - `description` string
      - `sqlStorage` TopicSqlStorage
        - `retentionTimeInSecond` integer, required
        - `enabled` boolean
    - `spec` TopicSpec, required
      - `partitions` integer, required
      - `replicationFactor` integer: Number of replicas. When creating a topic, -1 means use the cluster's default.replication.factor.
      - `configs` TopicConfigMap
  - `createResult` 'AlreadyExist' | 'Created', required

## Other responses

- `400`: The request is not valid
- `401`: The user is not authenticated
- `403`: The user doesn't have sufficient privilege to do this operation
- `404`: No topic with this technical id exists
- `409`: Resource already exists
- `500`: An unexpected error occurred in the server

---

[API](https://skmtc.dev/conduktor/apis/conduktor-console-api.md) - [All operations](https://skmtc.dev/conduktor/apis/conduktor-console-api/llms.txt) - [OpenAPI document](https://skmtc.dev/conduktor/apis/conduktor-console-api/revisions/24750c294805?raw)
