---
title: "Create/Set a password"
method: PUT
path: "/password"
tags: ["Password"]
deprecated: true
---

# Create/Set a password

`PUT /password`

> **Deprecated.**

Create a or update an existing `password` for the user identified by `user_id`.

This endpoint is only available if passwords have been enabled via [configuration](https://github.com/teamhanko/hanko/blob/main/backend/docs/Config.md#hanko-backend-config) option `passwords.enabled`.

## Request body

- object
  - `user_id` string, uuid4, required
  - `password` string, required — 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.

## Response `200`

Successful password update

## Other responses

- `201` — Successful password creation
- `400` — Bad Request
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal server error

---

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