---
search:
  tags:
    - databases
    - POST
seo:
  description: >-
    Gives the role app a new random password, which PostgreSQL takes at…
    Reference for the POST /v1/databases/{database}/password endpoint in the
    pols.so API.
sidebar:
  label: Give a database a new password
  badge: POST
title: Give a database a new password
type: openapi-operation
---
Gives the role `app` a new random password, which PostgreSQL takes
at once (it restarts, a few seconds), then restarts the live app of
every site linked to the database with the new connection URL. The
old password stops working; a stopped earlier version of an app gets
the new one when it is restored. Only a ready database (409
otherwise).

`POST /v1/databases/{database}/password`
