Reset database password or certificate
Rotate a database’s password or TLS certificate with POST /v2/databases/:database_id/credentials/reset. A new password is shown only once.
POST
Reset database password or certificate
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
Response
If it’s a password reset
Common errors
Related
- CLI:
squarecloud db credentials reset - SDKs:
api.databases.resetCredentials()(JavaScript),client.databases.reset_credentials()(Python),c.Databases.ResetCredentials()(Go)

