Create Topic
POST /public/v1/topics
POST /public/v1/topics
Creates a new topic in the connected Kafka cluster with the specified configuration.
Request
Body Parameters
name
string
Name of the topic to create
Yes
metadata
object (TopicMetadata)
Topic metadata configuration
Yes
configs
array of objects (TopicConfig)
Key-value configuration pairs
Optional
TopicMetadata Structure
partitions
integer
Number of partitions for the topic
Yes
replicationFactor
integer
Replication factor for the topic
Yes
TopicConfig Structure
name
string
Configuration parameter name
Yes
value
string
Configuration parameter value
Yes
Example Request
Response
HTTP Status Code: 200 OK
Response Body: (empty)
Possible Errors
400
Invalid request
Check your request payload format
401
Unauthorized
Check your API key
409
Topic already exists
Use a different topic name or delete the existing topic first
Best Practices
Choose an appropriate partition count based on expected throughput and parallelism.
Set a replication factor of at least 2–3 for data durability.
Configure retention policies carefully according to your data lifecycle requirements.
Last updated
Was this helpful?