Skip to main content

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: string (reference id)
Required: Read-Only

The client account that owns this phone validation. This is automatically set based on your authentication token.

project

Type: string (reference id)
Required: Optional

The project where this phone validation is being performed. This is the _id generated when creating a project.

projectFlow

Type: string (reference id)
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"
}