Reset a PostgreSQL user's password

Replace a user's password with a new generated one. The new password works at once, and the old one stops working at once. Open connections stay open. The instance must be running or degraded.

POST https://{availability_zone}.betterstackcloud.com/v1/postgres/{postgres_id}/users/{id}/reset-password
postgres_id string required

The ID of the PostgreSQL instance.

id string required

The ID of the PostgreSQL user.

Authorization string required

Bearer $TOKEN

202 Accepted
{
  "user": "jane@example.com",
  "password": "example",
  "database": "example",
  "uri": "example",
  "pooled_uri": "example",
  "public_uri": "example",
  "public_pooled_uri": "example",
  "ca_certificate": "example"
}

Returns the user's connection details with the new password.

user string

The user name.

password string

The new password.

database string

The database the URIs connect to.

uri string

The URI to connect to PostgreSQL directly from your networks, with the new password.

pooled_uri string

The URI to connect through the PgBouncer connection pool from your networks, with the new password.

public_uri string or null

The URI to connect to PostgreSQL directly from the internet, with the new password, or null when public_access is off.

public_pooled_uri string or null

The URI to connect through the PgBouncer connection pool from the internet, with the new password, or null when public_access is off.

ca_certificate string

The CA certificate that signed the server's certificate, in PEM format.