databases
POST /v1/databases/{databaseId}/credentials
Reveal the database password.
Authentication
Send an API key as a bearer token. The key must carry the databases.credentials.reveal permission; a key without it is refused with 403, not 404.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/databases/{databaseId}/credentials \
-H "Authorization: Bearer zdk_live_…"Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
Gated on databases.credentials.reveal — its own permission, held by no read-only role, because this is the one call that moves a secret opening every row the customer has. Every call is audit-logged. ⛔ A POST rather than a GET on purpose. A GET would put the credential in browser history, proxy logs and Referer headers.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
databaseId (path) | string | Yes | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
username | string | Yes | — |
password | string | Yes | — |
host | string | Yes | — |
port | integer | Yes | — |
database_name | string | Yes | — |
engine | string<postgres, mysql> | Yes | — |
dsn | string | Yes | A ready-to-use connection string for this database's engine — postgresql://…?sslmode=verify-full or mysql://…?ssl-mode=VERIFY_IDENTITY. Both spellings authenticate the… |
Errors this endpoint can return
401 · 403 · 404 · 422