---
title: "Verify user's email and complete user registration."
method: POST
path: "/users/email-verification"
tags: ["users"]
---

# Verify user's email and complete user registration.

`POST /users/email-verification`

Confirms the user's email address and finalizes the the account creation process.

Upon successful verification:
- If `organization` was provided during signup, the new organization will be created and the user will become its owner.
- If `invitationKey` was provided during signup, the user joins the invited organization.

## Request body

- EmailVerificationRequest
  - `otpCode` string, required — A one-time passcode (OTP) provided by the user for email verification. - Must be a numeric code.

## Response `201`

User email successfully verified and user account is created.

- EmailVerificationResponse
  - `id` string, uuid, required — The user's ID.
  - `authToken` string, required — A temporary token issued after the signup step. This token is used in the create session API to exchange for access and refresh tokens.

## Other responses

- `400` — - [group:**request**, code:**0**]: Invalid field in the request body. - [group:**request**, code:**1**]: The request body is required. - [group:**user**, code:**408**]: Invalid otpCode. - [group:**user**, code:**409**]: Expired otpCode.
- `401` — - [group:**user**, code:**406**]: Invalid email verification token. - [group:**user**, code:**407**]: Expired email verification token.
- `404` — - [group:**organization**, code:**2**]: Organization does not exist.
- `500` — - [group:**invitation**, code:**201**]: Get invitation encountered error. - [group:**organization**, code:**1000**]: Create organization encountered DB error. - [group:**organization**, code:**1001**]: Create organization grouping policy encountered error. - [group:**organization**, code:**1201**]: Get organization encountered DB error. - [group:**session**, code:**200**]: Failed to create auth token. - [group:**session**, code:**201**]: Failed to save auth token data. - [group:**user**, code:**401**]: Get user email verification data encountered error. - [group:**user**, code:**403**]: Save user email verification data encountered error. - [group:**user**, code:**1000**]: Create user encountered DB error.

---

[API](https://skmtc.net/gmicloud/apis/cluster-engine-api.md) · [All operations](https://skmtc.net/gmicloud/apis/cluster-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gmicloud/cluster-engine-api/versions/bcbab016469f/schema)
