POST /v1/topics
Create a Topic
Create a new topic within a messaging service
POST
POST /v1/topics
Documentation Index
Fetch the complete documentation index at: https://openmetadata-codex-audit-docs-codebase-alignment.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Create a Topic
Create a new topic within a messaging service.Body Parameters
Name of the topic. Must be unique within the parent messaging service.
Fully qualified name of the parent MessagingService (e.g.,
sample_kafka).Schema definition for messages in the topic.
Number of partitions for the topic.
Array of cleanup policies for the topic (e.g.,
delete, compact).Replication factor for the topic.
Maximum message size in bytes.
Retention size in bytes. Use
-1 for unlimited.Human-readable display name for the topic.
Description of the topic in Markdown format.
Array of owner references (users or teams) to assign to the topic.
Fully qualified name of the domain to assign for governance purposes.
Array of classification tags to apply to the topic.
Custom property values defined by your organization’s metadata schema.
POST /v1/topics
Returns
Returns the created topic object with all specified properties and system-generated fields.Response
Unique identifier for the topic (UUID format).
Topic name.
Fully qualified name in format
service.topicName.Human-readable display name.
Description of the topic in Markdown format.
Reference to the parent messaging service.
Schema definition for messages in the topic.
Number of partitions for the topic.
Cleanup policies for the topic.
Replication factor for the topic.
Maximum message size in bytes.
Retention size in bytes.
Type of messaging service (e.g., Kafka, Redpanda, Kinesis).
List of owners assigned to the topic.
Domain assignments for governance.
Classification tags applied to the topic.
Custom property values defined by your organization’s metadata schema.
Version number for the entity (starts at 0.1).
Create or Update (PUT)
UsePUT /v1/topics instead of POST to perform an upsert. If a topic with the same fullyQualifiedName already exists, it will be updated; otherwise, a new topic is created. The request body is the same as POST.
PUT will not return a 409 conflict error if the entity already exists — it will update the existing entity instead.Bulk Create or Update (PUT)
UsePUT /v1/topics/bulk to create or update multiple topics in a single request. The request body is an array of create request objects.
Error Handling
| Code | Error Type | Description |
|---|---|---|
400 | BAD_REQUEST | Invalid request body or missing required fields |
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission to create topics |
409 | ENTITY_ALREADY_EXISTS | Topic with same name already exists in service (POST only) |