The Phone Validation Object
Overviewβ
The Phone Validation object represents the process of verifying phone numbers within your Verifik projects. This object contains all the information needed to track and manage phone verification requests.
Attributesβ
clientβ
Type: ObjectId
Required: Read-Only
The client account that owns this phone validation. This is automatically set based on your authentication token.
projectβ
Type: ObjectId
Required: Optional
The project where this phone validation is being performed. This is the _id generated when creating a project.
projectFlowβ
Type: ObjectId
Required: Required
The project flow where this phone validation is being performed. This is the _id generated when creating a project flow.
statusβ
Type: String
Required: Required
The current status of the phone validation process. Can be:
"new"- Validation request created but not yet processed (default)"sent"- Verification code has been sent to the user"validated"- Phone has been successfully verified"failed"- Phone validation failed or expired
countryCodeβ
Type: String
Required: Required
The international dialing code for the phone number (e.g., "+1" for US, "+44" for UK, "+57" for Colombia).
phoneβ
Type: String
Required: Required
The phone number being validated (spaces are automatically removed).
typeβ
Type: String
Required: Required
The type of phone validation being performed:
"validation"- General phone number validation"login"- Phone verification during user login"onboarding"- Phone verification during user registration
validationMethodβ
Type: String
Required: Required
The method used for phone validation:
"verificationCode"- OTP code sent via SMS"manual"- Manual verification process
verificationCodeβ
Type: String
Required: Optional
The OTP code generated for phone verification (only present when validationMethod is "verificationCode").
expiresAtβ
Type: Date
Required: Optional
The expiration date and time for the validation code.
redirectUrlβ
Type: String
Required: Optional
URL to redirect to after successful validation.
webhookUrlβ
Type: String
Required: Optional
Webhook URL for validation status notifications.
identityUrlβ
Type: String
Required: Optional
Identity verification URL for additional verification steps.
requires2FAβ
Type: Boolean
Required: Optional
Flag indicating if two-factor authentication is required.
ipAddressβ
Type: String
Required: Optional
IP address of the user performing the validation.
attemptsβ
Type: Number
Required: Optional
Number of validation attempts made.
maxAttemptsβ
Type: Number
Required: Optional
Maximum number of validation attempts allowed.
createdAtβ
Type: Date
Required: Required
Timestamp when the phone validation was created.
updatedAtβ
Type: Date
Required: Required
Timestamp when the phone validation was last updated.
validatedAtβ
Type: Date
Required: Optional
Timestamp when the phone validation was completed successfully.
Example Objectβ
{
"_id": "phone_validation_123456789",
"client": "client_123456789",
"project": "project_123456789",
"projectFlow": "flow_123456789",
"status": "validated",
"countryCode": "+1",
"phone": "1234567890",
"type": "validation",
"validationMethod": "verificationCode",
"verificationCode": "123456",
"expiresAt": "2024-01-15T11:30:00Z",
"redirectUrl": "https://example.com/success",
"webhookUrl": "https://example.com/webhook",
"requires2FA": false,
"ipAddress": "192.168.1.1",
"attempts": 1,
"maxAttempts": 3,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:32:00Z",
"validatedAt": "2024-01-15T10:32:00Z"
}