Nest Authbeta

POST /auth/verify-phone

Verify phone number with OTP

Verify phone number with OTP

POST/auth/verify-phone

Request body

NestAuthVerifyPhoneRequestDto

FieldTypeRequiredDescription
codestringrequiredVerification code received via SMS (matches OTP entity `code`)
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

NestAuthPhoneVerifiedResponseDto

FieldTypeRequiredDescription
messagestringrequiredResponse message
Example: Phone verified successfully

Example response

{
  "message": "Phone verified successfully"
}

Try it

curl -X POST 'https://api.example.com/auth/verify-phone' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -d '{"code":"123456","tenantId":"123e4567-e89b-12d3-a456-426614174000"}'

On this page