---
title: "Change email"
method: POST
path: "/api/v1/auth/email-change"
tags: ["Authentication"]
---

# Change email

`POST /api/v1/auth/email-change`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/auth/email-change`
- Auth: HTTP bearer

An unverified account moves to the new address at once and must verify it; it answers the registration CAPTCHA when one is configured. A verified account re-enters its password (or, with no password, has signed in within 10 minutes) and keeps its address until the link sent to the new one is opened.

## Cookies

- `refresh_token` string

## Request body

- ChangeEmailRequest
  - `newEmail` string, email, required
  - `currentPassword` string
  - `captchaToken` string

## Response `200`

Changed, or waiting for confirmation

## Other responses

- `400`: Wrong password, failed CAPTCHA or invalid address
- `403`: A passwordless account has not signed in recently
- `409`: Email already exists
- `429`: Too many requests or daily cap reached

---

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