The Email Validation Object
Overviewβ
The Email Validation object represents the process of verifying email addresses within your Verifik projects. This object contains all the information needed to track and manage email validation requests.
Attributesβ
clientβ
Type: ObjectId
Required: Optional
The client account that owns this email validation. This is automatically set based on your authentication token.
projectβ
Type: ObjectId
Required: Optional
The project where this email validation is being performed. This is the _id generated when creating a project.
projectFlowβ
Type: ObjectId
Required: Required
The project flow where this email validation is being performed. This is the _id generated when creating a project flow.
statusβ
Type: String
Required: Required
The current status of the email validation process. Can be:
"new"- Validation request created but not yet processed (default)"sent"- Verification email has been sent to the user"validated"- Email validation completed successfully"expired"- Validation code has expired"failed"- Validation failed or was rejected
emailβ
Type: String
Required: Required
The email address being validated. Spaces are automatically removed and converted to lowercase.
typeβ
Type: String
Required: Required
The type of email validation being performed:
"validation"- Standard email verification"login"- Email verification for login"onboarding"- Email verification for new user registration"oneTimeLink"- Single-use access link verification
validationMethodβ
Type: String
Required: Required
The method used for email validation:
"verificationCode"- OTP code sent via email"oneTimeLink"- Single-use link sent via email
verificationCodeβ
Type: String
Required: Optional
The OTP code generated for email 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 email validation was created.
updatedAtβ
Type: Date
Required: Required
Timestamp when the email validation was last updated.
validatedAtβ
Type: Date
Required: Optional
Timestamp when the email validation was completed successfully.
Example Objectβ
{
"_id": "email_validation_123456789",
"client": "client_123456789",
"project": "project_123456789",
"projectFlow": "flow_123456789",
"status": "validated",
"email": "user@example.com",
"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"
}