Rotate a User's Password

POST /v1/databases/{uuid}/users/{user_uuid}/rotate

Give a database user a new generated password (the dashboard's Reset password). The response carries the new password once; it is stored encrypted and never returned again. ngris sets it on the database server, then restarts every app connected as the user so they pick it up. Until an app has restarted, its new database connections fail (MariaDB keeps no second password).

A ready user becomes rotating until the new password is set. Rotating a failed user retries creating it, with the new password. Requires Databases update.

Response (200 OK)

user object
The user, with its new status and used_by.
password string
The new password. Shown only in this response.
password_notice string
A reminder that the password is shown only once.
warning string
What happens to the connected apps, e.g. No application uses this user. or The application connected through this user restarts to pick up the new password; until it has restarted, its NEW database connections fail.
connected_apps array
The apps that restart, {application_uuid, application_name}.

Errors

403
No Databases update, no active account, or no managed databases on the plan.
404
database not found or database user not found.
409
quota_paused: the database is paused over your plan's database limit; its passwords can't be rotated.
database_status: the user is provisioning, rotating or deleting (e.g. Not possible while the user is rotating.), or the database is failed or deleting. resource and status say which.
503
databases_unavailable.
Request
curl -X POST \ "https://api.ngris.com/v1/databases/019c2a41-7d3e-7b52-a1c4-5e9f0b3d6a18/users/019c2a41-7d40-7e15-9b63-2f8c4d1a7e95/rotate" \ -H "X-API-KEY: <your_api_key>"
Response — 200 OK
{ "user": { "uuid": "019c2a41-7d40-7e15-9b63-2f8c4d1a7e95", "name": "app", "db_user": "u_p7d2m1_app", "access": "read_write", "kind": "customer", "password_rotated_at": "2026-10-18T12:00:00Z", "status": "rotating", "created_at": "2026-10-18T09:00:00Z", "updated_at": "2026-10-18T12:00:00Z", "database_uuid": "019c2a41-7d3e-7b52-a1c4-5e9f0b3d6a18", "used_by": [ { "application_uuid": "019be838-d261-7d9b-9499-71995a3a91c6", "application_name": "orders-api" } ] }, "password": "<48 hex characters, shown once>", "password_notice": "This password is shown only once. ngris stores it encrypted and never shows it again — rotate the user's password if you lose it.", "warning": "The application connected through this user restarts to pick up the new password; until it has restarted, its NEW database connections fail.", "connected_apps": [ { "application_uuid": "019be838-d261-7d9b-9499-71995a3a91c6", "application_name": "orders-api" } ] }