---
title: "Verify email address using the one-time token sent on registration."
method: POST
path: "/v1/auth/verify-email"
tags: ["auth"]
---

# Verify email address using the one-time token sent on registration.

`POST /v1/auth/verify-email`

## Request

- Base URL: `https://api.andish.ru` (the document declares no server; this is the origin it was published from)
- URL: `https://api.andish.ru/v1/auth/verify-email`
- Auth: none declared

Consume a plaintext verification token and mark the user's email as verified.

Atomic implementation (M2 fix): uses a single UPDATE … RETURNING statement
to prevent race conditions on concurrent double-verify requests. Exactly one
call wins; subsequent calls with the same token receive 409.

Rate-limited to 10 req/min per IP via _AUTH_STRICT_PATHS (C2 spec).
GET variant with /{token} path NOT included in W2 — only POST here.
Frontend POSTs on load of /verify-email?token=… (Lane D4 post-C2 merge).

Error codes (ADR-014 wire format {"detail": {"error": "..."}}):
  404 token_not_found   — hash not in table.
  410 token_expired     — token found but past expires_at.
  409 token_already_used — token was already consumed.
  422 validation_failed — token field missing or too long.

## Request body

- VerifyEmailRequest: Request body for POST /v1/auth/verify-email.
  - `token` string, required: Plaintext verification token received via email.

## Response `200`

Successful Response

- VerifyEmailResponse: Response for successful POST /v1/auth/verify-email (HTTP 200).
  - `user_id` string, uuid, required: UUID of the verified user.
  - `email` string, required: Verified email address.
  - `email_verified_at` string, date-time, required: Timestamp when email was verified (UTC).
  - `message` string

## Other responses

- `404`: Token not found
- `409`: Token already used
- `410`: Token expired
- `422`: Validation error

---

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