The Email Validation Object
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
- ObjectId - Optional
client
- ObjectId - OptionalThe client account that owns this email validation. This is automatically set based on your authentication token.
project
- ObjectId - Optional
project
- ObjectId - OptionalThe project where this email validation is being performed. This is the _id
generated when creating a project.
projectFlow
- ObjectId - Required
projectFlow
- ObjectId - RequiredThe project flow where this email validation is being performed. This is the _id
generated when creating a project flow.
status
- String - Required
status
- String - RequiredThe 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 has been successfully verified"failed"
- Email validation failed or expired
validationMethod
- String - Required
validationMethod
- String - RequiredDefines how the email will be validated. Can be:
"verificationCode"
- Send OTP code via email (default)"manual"
- Manual verification process
email
- String - Required
email
- String - RequiredThe email address that will be validated in the verification process.
type
- String - Required
type
- String - RequiredThe type of process this email validation is for. Can be:
"validation"
- General email validation (default)"login"
- User authentication process"onboarding"
- User registration process
otp
- String - Read-Only
otp
- String - Read-OnlyThe one-time password (OTP) code sent to the user for verification. This field is automatically hashed for security.
expiresAt
- Date - Optional
expiresAt
- Date - OptionalThe timestamp when the OTP code expires. After this time, the validation code becomes invalid.
name
- String - Optional
name
- String - OptionalThe name associated with the email address being validated.
extraParams
- Array of Strings - Optional
extraParams
- Array of Strings - OptionalAdditional parameters that can be passed with the email validation request.
redirectUrl
- String - Optional
redirectUrl
- String - OptionalURL where users will be redirected after completing the email validation process.
webhookUrl
- String - Optional
webhookUrl
- String - OptionalExternal webhook URL for receiving real-time notifications about validation status changes.
requires2FA
- Boolean - Optional
requires2FA
- Boolean - OptionalIndicates whether two-factor authentication is required for this validation. Defaults to false
.
ipAddress
- String - Optional
ipAddress
- String - OptionalThe IP address of the user requesting the email validation.
emailData
- Object - Optional
emailData
- Object - OptionalAdditional data related to the email validation process, such as delivery status or bounce information.
The Email Validation Object
{
"client": "507f1f77bcf86cd799439011",
"project": "507f1f77bcf86cd799439012",
"projectFlow": "507f1f77bcf86cd799439013",
"status": "sent",
"validationMethod": "verificationCode",
"email": "[email protected]",
"type": "onboarding",
"otp": "hashed_otp_code",
"expiresAt": "2024-01-01T23:59:59.000Z",
"name": "John Doe",
"extraParams": ["param1", "param2"],
"redirectUrl": "https://example.com/success",
"webhookUrl": "https://api.client.com/webhooks/verifik",
"requires2FA": false,
"ipAddress": "192.168.1.1",
"emailData": {}
}
Important Notes
Security: OTP codes are automatically hashed using bcrypt for security
Expiration: OTP codes have a default expiration time for security purposes
Status Tracking: The status field provides real-time updates on validation progress
Webhook Support: Configure webhooks to receive instant notifications about validation events
Multiple Types: Support for different validation scenarios (login, onboarding, general validation)
2FA Support: Optional two-factor authentication for enhanced security
The Email Validation object integrates seamlessly with your project flows and provides comprehensive tracking of the email verification process from creation to completion.
Last updated
Was this helpful?