Nest Authbeta

POST /auth/verify-email

Verify Email

Verify Email

POST/auth/verify-email

Request body

NestAuthVerifyEmailRequestDto

FieldTypeRequiredDescription
codestringrequiredVerification code received via email
Example: 123456
tenantIdstringoptionalTenant ID for multi-tenant applications
Example: 123e4567-e89b-12d3-a456-426614174000

Examples

Example
{
  "code": "123456",
  "tenantId": "123e4567-e89b-12d3-a456-426614174000"
}

Responses

200

NestAuthEmailVerifiedResponseDto

FieldTypeRequiredDescription
messagestringrequiredResponse message
Example: Email verified successfully

Example response

{
  "message": "Email verified successfully"
}
400Validation failed (bad input).

ApiErrorResponseDto

FieldTypeRequiredDescription
statusCodenumberrequiredHTTP status code
Example: 401
errorstringrequiredHTTP status text / exception name
Example: Unauthorized
messagestringrequiredHuman-readable message
Example: Invalid credentials
codestringrequiredStable, 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

FieldTypeRequiredDescription
statusCodenumberrequiredHTTP status code
Example: 401
errorstringrequiredHTTP status text / exception name
Example: Unauthorized
messagestringrequiredHuman-readable message
Example: Invalid credentials
codestringrequiredStable, 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"}'

On this page