List PostgreSQL users

List the users of a PostgreSQL instance. Returns every user in one page. Get a user's password with betterstack postgres-user credentials.

GET https://{availability_zone}.betterstackcloud.com/v1/postgres/{postgres_id}/users
postgres_id string required

The ID of the PostgreSQL instance.

Authorization string required

Bearer $TOKEN

200 OK
{
  "data": [
    {
      "id": "example",
      "username": "example",
      "default_user": false,
      "privileges": {
        "appdb": "read_write"
      },
      "created_at": "2026-07-01T12:00:00.000Z"
    }
  ]
}

Returns the list of PostgreSQL users.

id string

The user's ID, a UUID.

username string

The user name in PostgreSQL. Accepts up to 63 lowercase letters, digits and underscores, starting with a letter or an underscore. Can't be changed after the user is created.

default_user boolean

Whether this is the instance's default admin user. We manage the default user's access, and the default user can't be deleted.

privileges object

The user's access to each database, as an object that maps a database name to an access level, such as {"appdb": "read_write"}. A database that isn't in the object gets no access. read can read the tables in the public schema. read_write can also add, change and delete rows and run functions, but can't create tables. all can also create tables and schemas and maintain them, such as with VACUUM. none gives no access.

created_at datetime

When the user was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.