Verifies a user’s email address using the token sent to their email during registration. This endpoint confirms that the user has access to the email address they provided.
Authentication
No authentication required.
Request Body
Email verification token sent to the user’s email address. This token is typically included in the verification link.
Response
Success message confirming email verification.
Example Request
curl -X POST https://api.contafy.com/api/auth/verify-email \
-H "Content-Type: application/json" \
-d '{
"token": "evt_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
}'
Example Response
{
"message": "Email verificado exitosamente"
}
Error Responses
Human-readable error message.
Common Errors
400 Bad Request
{
"error": "INVALID_TOKEN",
"message": "El token de verificación es inválido o ha expirado"
}
400 Bad Request
{
"error": "VALIDATION_ERROR",
"message": "Token es requerido"
}
400 Bad Request
{
"error": "ALREADY_VERIFIED",
"message": "Este email ya ha sido verificado"
}
Notes
- Verification tokens typically expire after 24 hours
- Users can request a new verification email if their token expires
- Once verified, the user’s
email_verified field will be set to true
- Some features may be restricted until email verification is complete