Rotate database credentials API Reference
POST
/tenants/{tenant}/databases/{name}/rotate-credentials
const url = 'https://api.kupe.cloud/api/v1/tenants/acme/databases/orders-db/rotate-credentials';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"role":"owner"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.kupe.cloud/api/v1/tenants/acme/databases/orders-db/rotate-credentials \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "role": "owner" }'Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ” tenant
required
string
Tenant name
name
required
string
Database name
Request Body
Section titled “ Request Body ”Role to rotate
Media type application/json
object
role
Role whose password is rotated: owner (app_owner), readwrite (app_readwrite) or readonly (app_readonly).
string
Example
readwriteResponses
Section titled “ Responses ”Rotation requested
Media type application/json
object
database
string
requestedAt
string
role
string
Example
{ "database": "orders-db", "requestedAt": "2026-10-09T12:00:00.123456789Z", "role": "owner"}Validation error
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Missing or invalid authentication
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Admin access required
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Database not found, or databases are not enabled (code databases_unavailable)
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Database is being deleted (code terminating)
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}Rate limit exceeded
Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{ "code": "example", "error": "example", "field": "example", "message": "example", "severity": "example"}