Skip to main content
A database with managed SQL roles has three base logins: owner for migrations, runtime for your application and readonly for reporting. These endpoints list them and reveal one password at a time. To rotate or revoke a base role, use Managed role changes. For additional roles, see Additional roles on managed databases. See Database roles for the concepts. API access requires Pro or Business. Both endpoints accept a full-account key or a key scoped to selected databases that includes this database; see Authentication. Every response, including errors, is sent with Cache-Control: no-store.

List base roles

Returns metadata only; no password is included.
200 OK
A database without managed SQL roles returns {"managed": false, "roles": []}. Roles are always ordered owner, runtime, readonly. updating means a rotation or revocation for that role has not finished; read it with GET /api/v1/databases/{id}/role-changes/{operationId}. expired means the credential’s validity period has ended and it can no longer be revealed.

Reveal a credential

The body must contain exactly one field, profile, set to owner, runtime or readonly. The role must be ready. Each reveal is recorded in the account’s audit log.
200 OK
Connect with TLS; tlsRequired is always true. Store the password in a secret manager and keep it out of logs and source control. A role with a pending change, a revoked role and an expired role return 409 MANAGED_ROLE_CONFLICT.

Errors

Dashboard

The database detail page shows the same roles and lets you reveal, rotate or revoke one credential at a time on every plan.