---
title: "Rotate credentials"
method: POST
path: "/api/v1/databases/{database_id}/credentials/rotate"
tags: ["Managed Databases"]
---

# Rotate credentials

`POST /api/v1/databases/{database_id}/credentials/rotate`

Generate a new password for the database user. Existing connections keep working until they disconnect; new connections must use the new password. Fetch it via `GET /api/v1/databases/{database_id}/connection?reveal=true`.

## Path parameters

- `database_id` string, required

## Response `200`

Credentials rotated

- SuccessResponse
  - `success` boolean
  - `message` string

## Other responses

- `401` — Authentication required
- `404` — Resource not found

## Changes

- **2026-08-20** `efd3c11c5c92` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/rafftechnologies/apis/raff-api/changes/api/v1/databases/:database_id/credentials/rotate/post.md)

---

[API](https://skmtc.dev/rafftechnologies/apis/raff-api.md) · [All operations](https://skmtc.dev/rafftechnologies/apis/raff-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rafftechnologies/raff-api/revisions/119e4aec8f63/schema)
