---
title: "Create a password for a user"
method: POST
path: "/users/{id}/password"
---

# Create a password for a user

`POST /users/{id}/password`

## Path parameters

- `id` string, uuid, required

## Request body

- CreatePassword
  - `password` string

## Response `200`

OK

- string — The actual password, its `minLength` defaults to 8 but can be [configured](https://github.com/teamhanko/hanko/blob/main/backend/docs/Config.md#hanko-backend-config) through the `password.min_password_length` option.

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal server error

---

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