---
title: "Add a password to your account"
method: POST
path: "/v1/auth/password"
tags: ["Account"]
---

# Add a password to your account

`POST /v1/auth/password`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/auth/password`
- Auth: API key in cookie `__Host-better-auth.session_token`

Adds an optional password to an account created through a mailed code or a provider. Rejects passwords found in public breach corpora. Changing an existing password is a different flow. Needs a recent identity confirmation.

## Request body

- object
  - `password` string, required

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` object, required
    - `passwordSet` true, required

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

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