---
title: "Create Topic"
method: POST
path: "/kafka/v3/clusters/{cluster_id}/topics"
tags: ["Topic (v3)"]
---

# Create Topic

`POST /kafka/v3/clusters/{cluster_id}/topics`

[![Generally Available](https://img.shields.io/badge/Lifecycle%20Stage-Generally%20Available-%2345c6e8)](#section/Versioning/API-Lifecycle-Policy)

Create a topic.
Also supports a dry-run mode that only validates whether the topic creation would succeed
if the ``validate_only`` request property is explicitly specified and set to true. Note that
when dry-run mode is being used the response status would be 200 OK instead of 201 Created.

## Request body

- CreateTopicRequestData
  - `topic_name` string, required
  - `partitions_count` integer
  - `replication_factor` integer
  - `configs` object[]
    - `name` string, required
    - `value` string, nullable
  - `validate_only` boolean

## Response `200`

The created topic.

- TopicData
  - `kind` string, required
  - `metadata` ResourceMetadata, required
    - `self` string, required
    - `resource_name` string, nullable
  - `cluster_id` string, required
  - `topic_name` string, required
  - `is_internal` boolean, required
  - `replication_factor` integer, required
  - `partitions_count` integer, required
  - `partitions` Relationship, required
    - `related` string, required
  - `configs` Relationship, required
    - `related` string, required
  - `partition_reassignments` Relationship, required
    - `related` string, required
  - `authorized_operations` string[]

## Other responses

- `201` — The created topic.
- `400` — Indicates a bad request error. It could be caused by an unexpected request body format or other forms of request validation failure.
- `401` — Indicates a client authentication error. Kafka authentication failures will contain error code 40101 in the response body.
- `403` — Indicates a client authorization error. Kafka authorization failures will contain error code 40301 in the response body.
- `429` — Indicates that a rate limit threshold has been reached, and the client should retry again later.
- `5XX` — A server-side problem that might not be addressable from the client side. Retriable Kafka errors will contain error code 50003 in the response body.

---

[API](https://skmtc.dev/confluent/apis/confluent-cloud-apis.md) · [All operations](https://skmtc.dev/confluent/apis/confluent-cloud-apis/llms.txt) · [OpenAPI document](https://skmtc.dev/confluent/apis/confluent-cloud-apis/revisions/cd93f933f941?raw)
