Reset database password or certificate
Rotate a database’s password or TLS certificate with POST /v2/databases//credentials/reset. A new password is shown only once.
POST
Reset database password or certificate
string
required
The API key for your account. You can find this in your account settings.
databases:credentials scope.
Rotates either the access password or the TLS certificate of a database, without recreating it or changing its connection URL structure. Use this if a credential leaked or as part of a routine rotation policy.
The database must be running to reset either credential. Resetting password returns the new password once in the response body, it is not shown again, so store it immediately. Resetting certificate returns a plain success, fetch the new certificate afterward via Get Certificate. After either reset, existing client connections using the old credential will need to reconnect. Rate limited to 1 reset every 3 seconds per user.
Parameters
string
required
The ID of the database.
string
required
The credential you want to reset, password or certificate.
Response
string
Indicates whether the call was successful:
success if it was, error if not.If it’s a password reset
object
The contents of the response.
Common errors
Related
- CLI:
squarecloud db credentials reset - SDKs:
api.databases.resetCredentials()(JavaScript),client.databases.reset_credentials()(Python),c.Databases.ResetCredentials()(Go)

