Skip to main content
Use this endpoint to rotate a database credential — either the password or the TLS certificate. When you reset the password, the API immediately returns the newly generated password in the response. When you reset the certificate, a new certificate is issued and the previous one is revoked; fetch the new certificate using the Get Certificate endpoint.

Request

POST https://api.virtuscloud.app/v2/databases/{databaseId}/credentials/reset

Headers

Authorization
string
required
Your Virtus Cloud API key. Pass it directly as the header value — no prefix required.Example: Authorization: vc_live_xxxxxxxxxxxx

Path Parameters

databaseId
string
required
The unique identifier of the database whose credentials you want to reset.

Body

reset
string
required
The credential type to rotate. Accepted values:
  • "password" — generates a new database password and returns it in the response.
  • "certificate" — issues a new TLS certificate, revoking the previous one.

Response

status
string
Returns "success" when the credential reset completes successfully.
response
object
Present only when reset is set to "password". Contains the newly generated password.
Resetting the password immediately invalidates the old password. Update your application’s connection string before or immediately after calling this endpoint to avoid service interruption. After resetting the certificate, update all clients with the new .pem file retrieved from the Get Certificate endpoint.

Examples

curl -X POST https://api.virtuscloud.app/v2/databases/a14b8d5e1cb7405a851eb4c075506121/credentials/reset \
  -H "Authorization: <api_key>" \
  -H "Content-Type: application/json" \
  -d '{"reset": "password"}'

Response Example (Password Reset)

{
  "status": "success",
  "response": {
    "password": "f3T1hdskMkchMwK6Hxqinoyb"
  }
}

Response Example (Certificate Reset)

{
  "status": "success"
}