---
title: "Create topic"
method: POST
path: "/v1/topics"
tags: ["Topics"]
---

# Create topic

`POST /v1/topics`

Create a [topic](https://docs.redpanda.com/redpanda-cloud/get-started/create-topic/).

## Query parameters

- `validate_only` boolean

## Request body

- CreateTopicRequestTopic
  - `configs` Config[] — An array of key-value config pairs for a topic. These correspond to Kafka topic-level configs.
    - `name` string — A topic-level config key (e.g. `segment.bytes`).
    - `value` string, nullable — A topic-level config value (e.g. 1073741824).
  - `name` string — Name of topic.
  - `partition_count` integer, nullable — The number of partitions to give the topic. If specifying partitions manually (see `replica_assignments`), set to -1. Or, to use the cluster default partition count, set to null.
  - `replica_assignments` ReplicaAssignment[] — Manually specify broker ID assignments for partition replicas. If manually assigning replicas, both `replication_factor` and `partition_count` must be -1.
    - `partition_id` integer — A partition to create.
    - `replica_ids` integer[] — The broker IDs the partition replicas are assigned to.
  - `replication_factor` integer, nullable — The number of replicas every partition must have. If specifying partitions manually (see `replica_assignments`), set to -1. Or, to use the cluster default replication factor, set to null.

## Response `201`

Topic created

- CreateTopicResponse
  - `partition_count` integer — The number of partitions created for the topic. This field has a default value of -1, which may be returned if the broker does not support v5+ of this request which added support for returning this information.
  - `replication_factor` integer — The number of replicas per topic partition. This field has a default of -1, which may be returned if the broker does not support v5+ of this request which added support for returning this information.
  - `topic_name` string — Name of topic.

## Other responses

- `401` — Unauthenticated.
- `500` — Internal Server Error. Reach out to support.
- `default` — An unexpected error response.

---

[API](https://skmtc.net/redpanda-data/apis/redpanda-cloud-data-plane-api.md) · [All operations](https://skmtc.net/redpanda-data/apis/redpanda-cloud-data-plane-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/redpanda-data/redpanda-cloud-data-plane-api/versions/2917b4dd86f7/schema)
