Skip to main content

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"
}