Skip to main content
POST
Create a new Kafka topic

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
topic_name
string
required

Kafka topic name

Required string length: 1 - 249
num_partitions
integer
default:1

Number of partitions

Required range: x >= 1
replication_factor
integer | null

Replication factor (defaults to broker count)

Required range: x >= 1
cleanup_policy
enum<string> | null

Topic cleanup policy

Available options:
delete,
compact,
delete,compact
min_insync_replicas
integer | null

Minimum in-sync replicas

Required range: x >= 1
retention_ms
integer | null

Time to retain data in ms (-1 for unlimited)

Required range: x >= -1
retention_bytes
integer | null

Max size on disk in bytes (-1 for unlimited)

Required range: x >= -1
max_message_bytes
integer | null

Maximum message size in bytes

Required range: x >= 1
custom_configs
Custom Configs · object | null

Additional topic configs as key-value pairs

tags
string[] | null

Tag IDs to assign to the topic

Response

Successful Response

id
string
required
name
string
required
entity
TopicDetailsEntity · object
required
num_partitions
integer
required
replication_factor
integer
required
prefix
string | null
serialization
TopicSerialization · object | null

Serialization format information for a topic.

Topics inherit their serialization format from their producer (source/transform). Most Streamkap sources use Avro by default with Schema Registry.

warnings
CreateTopicWarning · object[]