Update a Kafka user

Replace the user's privileges. We apply them to the cluster shortly after the response. To change the password, use betterstack kafka-user reset-password.

PATCH https://{availability_zone}.betterstackcloud.com/v1/kafka/{kafka_id}/users/{id}
kafka_id string required

The ID of the kafka the Kafka user belongs to.

id string required

The ID of the Kafka user to update.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

privileges array of objects or null

The new privileges, up to 25 entries. Send null or an empty list to remove all of them.

privileges[].topic_pattern string required

A topic name, or a prefix followed by a trailing *, made of letters, digits, dots, hyphens and underscores, up to 249 characters. * alone matches every topic.

privileges[].permission string required

What the user can do on the matching topics.
Valid values:
consume: Read and describe the matching topics, and join consumer groups.
produce: Write and describe the matching topics, and use transactions and the enable.idempotence producer setting.
produce_consume: Both consume and produce.

202 Accepted
{
  "id": "example",
  "username": "example",
  "default_user": false,
  "privileges": [
    {
      "topic_pattern": "example",
      "permission": "consume"
    }
  ],
  "created_at": "2026-07-01T12:00:00.000Z",
  "updated_at": "2026-07-01T12:00:00.000Z"
}

Returns the updated Kafka user.

id string

The user's ID, a UUID. Requests for one user use this ID, never the username.

username string

The name clients sign in with, unique in the cluster, up to 64 lowercase letters, digits, hyphens and underscores, starting with a letter or digit. Can't start with betterstack.

default_user boolean

Whether this is the cluster's default user, which every cluster comes with. You can't delete the default user, but you can change its privileges.

privileges array of objects

The topics the user can use and what it can do on them, up to 25 entries. A user with no privileges has an empty list.

privileges[].topic_pattern string

A topic name, or a prefix followed by a trailing *, made of letters, digits, dots, hyphens and underscores, up to 249 characters. * alone matches every topic.

privileges[].permission string

What the user can do on the matching topics.
Valid values:
consume: Read and describe the matching topics, and join consumer groups.
produce: Write and describe the matching topics, and use transactions and the enable.idempotence producer setting.
produce_consume: Both consume and produce.

created_at datetime or null

When the user was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

updated_at datetime or null

When the user was last updated. In ISO 8601 format, such as 2026-07-01T12:00:00Z.