Secure phone number validation via SMS using Allcance SMS service
RESTful API with authentication, rate limiting, and comprehensive error handling
/api/v1
application/json
Include your API key in requests using one of these methods:
X-API-Key: your-api-key
Authorization: Bearer your-api-key
Send SMS verification code to a phone number.
{
"phone_number": "(41) 99209-6998"
}
{
"status": "success",
"message": "Código de verificação enviado com sucesso",
"expires_in": 600
}
{
"status": "error",
"message": "Formato de telefone inválido. Use o formato: (41) 99209-6998"
}
{
"status": "error",
"message": "Código de verificação já enviado. Verifique suas mensagens ou aguarde a expiração.",
"error_code": "otp_already_sent",
"expires_in": 598
}
Resend the same SMS verification code to a phone number (60-second cooldown).
{
"phone_number": "(41) 99209-6998"
}
{
"status": "success",
"message": "Código de verificação reenviado com sucesso",
"expires_in": 420
}
{
"status": "error",
"message": "Aguarde 60 segundos antes de solicitar outro reenvio."
}
Verify the SMS code entered by the user.
{
"phone_number": "(41) 99209-6998",
"code": "123456"
}
{
"status": "success",
"message": "Telefone verificado com sucesso"
}
{
"status": "error",
"error": "Invalid or expired verification code"
}
Health check endpoint (no authentication required).
{
"status": "success",
"service": "Velox OTP API",
"version": "1.0.0",
"status": "healthy"
}
Code | Description | When it occurs |
---|---|---|
200 | OK | Request successful |
400 | Bad Request | Invalid request data or format |
401 | Unauthorized | Missing or invalid API key |
404 | Not Found | Endpoint does not exist |
405 | Method Not Allowed | HTTP method not supported |
429 | Too Many Requests | Rate limit exceeded |
500 | Internal Server Error | Server error or SMS service failure |