POST /auth/verify-email
Verify Email
Verify Email
/auth/verify-emailRequest body
NestAuthVerifyEmailRequestDto
| Field | Type | Required | Description |
|---|---|---|---|
code | string | required | Verification code received via email Example: 123456 |
tenantId | string | optional | Tenant ID for multi-tenant applications Example: 123e4567-e89b-12d3-a456-426614174000 |
Examples
Example
{
"code": "123456",
"tenantId": "123e4567-e89b-12d3-a456-426614174000"
}Responses
200
NestAuthEmailVerifiedResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
message | string | required | Response message Example: Email verified successfully |
Example response
{
"message": "Email verified successfully"
}400Validation failed (bad input).
ApiErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
statusCode | number | required | HTTP status code Example: 401 |
error | string | required | HTTP status text / exception name Example: Unauthorized |
message | string | required | Human-readable message Example: Invalid credentials |
code | string | required | Stable, machine-readable error code — branch on this, not the message Example: INVALID_CREDENTIALS |
Example response
{
"statusCode": 401,
"error": "Unauthorized",
"message": "Invalid credentials",
"code": "INVALID_CREDENTIALS"
}401Missing, invalid, or expired authentication.
ApiErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
statusCode | number | required | HTTP status code Example: 401 |
error | string | required | HTTP status text / exception name Example: Unauthorized |
message | string | required | Human-readable message Example: Invalid credentials |
code | string | required | Stable, machine-readable error code — branch on this, not the message Example: INVALID_CREDENTIALS |
Example response
{
"statusCode": 401,
"error": "Unauthorized",
"message": "Invalid credentials",
"code": "INVALID_CREDENTIALS"
}Try it
curl -X POST 'https://api.example.com/auth/verify-email' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-d '{"code":"123456","tenantId":"123e4567-e89b-12d3-a456-426614174000"}'