Rotate a ClickHouse instance's credentials

Change the admin user's password of a ClickHouse instance. The old password keeps working for 24 hours, until rotating_until. The instance must be running or degraded.

POST https://{availability_zone}.betterstackcloud.com/v1/clickhouse/{id}/credentials/rotate
id string required

The ID of the ClickHouse instance to rotate.

Authorization string required

Bearer $TOKEN

202 Accepted
{
  "user": "jane@example.com",
  "password": "example",
  "database": "example",
  "uri": "example",
  "https_url": "https://example.com",
  "public_uri": "example",
  "public_https_url": "https://example.com",
  "ca_certificate": "example",
  "rotating_until": "2026-07-01T12:00:00.000Z"
}

Returns the credentials with the new password as one object.

user string

The username, always admin.

password string

The new admin password.

database string

The default database, defaultdb.

uri string

A clickhouse:// URI for the native protocol with TLS on your private networks, with the new password in it.

https_url string

The HTTPS URL for your private networks, without the password.

public_uri string or null

A clickhouse:// URI for the native protocol with TLS, for clients on the internet, with the new password in it, or null when public_access is false.

public_https_url string or null

The address of the HTTPS interface for clients on the internet, without the password, or null when public_access is false.

ca_certificate string

The CA certificate to verify the instance's TLS certificate with, in PEM format. Save it to a file for your client.

rotating_until datetime or null

When the previous password stops working, 24 hours from now. In ISO 8601 format, such as 2026-07-01T12:00:00Z.