POST/v2/databases/{database_cluster_uuid}/topics

Create a Kafka topic

Creates a Kafka topic attached to a database cluster. Provide name in the request body, and optionally configure its replication factor, partition count, and topic settings. A 201 response contains the created topic in a topic field.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 4 body fields
database_cluster_uuidstringrequired
The unique identifier of the database cluster, in UUID format.

Optional configuration for the Kafka topic; include name when you provide a request body.

namestringrequired
The name of the Kafka topic.
replication_factorintegeroptional
The number of nodes to replicate data across the cluster.
partition_countintegeroptional
The number of partitions available for the topic. On update, this value can only be increased.
configobjectoptional
Topic configuration settings.

6 status codes
201Returns a JSON object containing the created topic in the `topic` field, including its name, state, replication factor, partitions, and configuration.
topicobjectoptional
401Returned when authentication fails due to invalid credentials.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404Returned when the requested resource is not found.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429Returned when the API rate limit has been exceeded.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500Returned when a server error occurs.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
defaultThere was an unexpected error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

Error handling

A 401 is returned for invalid credentials; a 404 when the database cluster is not found; a 429 when the API rate limit is exceeded; and a 500 when a server error occurs. When you send a request body, include name. The database_cluster_uuid path parameter must be a valid UUID identifying a database cluster.