POST /auth/verify-phone
Verify phone number with OTP
Verify phone number with OTP
/auth/verify-phoneRequest body
NestAuthVerifyPhoneRequestDto
| Field | Type | Required | Description |
|---|---|---|---|
code | string | required | Verification code received via SMS (matches OTP entity `code`) 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
NestAuthPhoneVerifiedResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
message | string | required | Response 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"}'