Documentation menu

Set database password

POSThttps://api.instacloud.com/projects/{projectId}/database/password

Token scope: account · org · project — read-only tokens refused (not a GET).

Set or regenerate the postgres user password. Omitting password asks the provider to generate one.

Parameters

NameInTypeRequiredDescription
branchquerystringnobranch name (default branch if omitted)
groupquerystringnopostgres service name (default: the sole postgres service)
projectIdpathstringyes

Request body

application/json

FieldTypeRequiredDescription
passwordstringnonew password; omit to generate one

Responses

200

Default Response

FieldTypeRequiredDescription
connStringstringno
passwordstringno
privateConnStringstringnothe private network lane twin of connString (with the password). Present only while the instance has private access.
credentialsStoredbooleannopassword rotation only (insta-db) — true: the new connection strings were stored in the project secrets (DATABASE_URL, and DATABASE_PRIVATE_URL while private access is on). false: the password rotated but storing them failed, so the project secrets still carry the retired password and this response holds the only copy of the new credentials — rotate again to re-store them. Absent on a provider path that stores no credentials. Branch on this, not on `warnings` text: a warning can accompany a successful store.
warningsstring[]nopassword rotation only — what to act on: compute services bound to this database that must be redeployed to pick up the new password, or (the rotation still succeeded) that re-storing DATABASE_URL / DATABASE_PRIVATE_URL failed, in which case this response holds the only copy of the new credentials.

202

Default Response

FieldTypeRequiredDescription
status"approval_required"no
approvalIdstringno
actionstringnothe gated action, or a comma-joined compound set — prefer `actions`
actionsstring[]noevery capability this approval covers
messagestringno
urlstringnothe console page where a project admin reviews this request
nextActionsobject[]no
nextActions.opstringyesNeutral logical action id, e.g. "service.add" — NOT an operationId or a CLI/MCP tool name; each client maps it to its own surface.
nextActions.reasonstringyesNatural-language, human/LLM-facing "why do this now".
nextActions.argsobjectnoSuggested, flat named arguments; "<placeholder>"s where a value is unknown.
nextActions.gatedbooleannoTrue if the action passes a governance gate.

400

Default Response

FieldTypeRequiredDescription
errorstringyes

403

Default Response

FieldTypeRequiredDescription
errorstringyes

404

Default Response

FieldTypeRequiredDescription
errorstringyes

409

code credential_change_in_progress: another credential change for this database (a rotation or a private-access toggle) is in flight — nothing was changed and the password is not rotated; retry in a moment

FieldTypeRequiredDescription
errorstringyes
codestringnostable machine-readable reason, e.g. private_lane_disabled, private_lane_unavailable_in_region, public_access_closed, credential_change_in_progress

502

Default Response

FieldTypeRequiredDescription
errorstringyes

View as Markdown