---
title: "Set or change the password"
method: POST
path: "/v1/me/password"
tags: ["Account"]
---

# Set or change the password

`POST /v1/me/password`

## Request

- Base URL: `https://api.stackdata.io`
- URL: `https://api.stackdata.io/v1/me/password`
- Auth: one of:
  - API key in cookie `sd_session`
  - HTTP bearer

If a password already exists, `current_password` must be correct. OAuth-only accounts set a first password with no current one.

## Request body

- object
  - `current_password` string
  - `new_password` string, required

## Response `200`

Updated.

- Ok
  - `ok` boolean

## Other responses

- `400`: New password too short.
- `403`: Current password is wrong.

---

[API](https://skmtc.dev/stackdata/apis/stackdata-api.md) · [All operations](https://skmtc.dev/stackdata/apis/stackdata-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stackdata/apis/stackdata-api/revisions/91358ae3f6e8?raw)
