Skip to content

Rotate database credentials API Reference

POST
/tenants/{tenant}/databases/{name}/rotate-credentials
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" }'
tenant
required
string

Tenant name

name
required
string

Database name

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
Allowed values: owner readwrite readonly
Example
readwrite

Rotation requested

Media type application/json
object
database
string
requestedAt
string
role
string
Allowed values: owner readwrite readonly
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"
}