---
title: "POST /v1/{+parent}/users"
method: POST
path: "/v1/{+parent}/users"
tags: ["projects"]
---

# POST /v1/{+parent}/users

`POST /v1/{+parent}/users`

Creates a new User in a given project, location, and cluster.

## Path parameters

- `parent` string, required

## Query parameters

- `requestId` string
- `userId` string
- `validateOnly` boolean

## Request body

- User — Message describing User object.
  - `name` string — Output only. Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.
  - `keepExtraRoles` boolean — Input only. If the user already exists and it has additional roles, keep them granted.
  - `databaseRoles` string[] — Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
  - `userType` 'USER_TYPE_UNSPECIFIED' | 'ALLOYDB_BUILT_IN' | 'ALLOYDB_IAM_USER' — Optional. Type of this user.
  - `password` string — Input only. Password for the user.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/alloydb.md) · [All operations](https://skmtc.net/google/apis/alloydb/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/alloydb/versions/cdbec2e3108c/schema)
