List all Email Validations

GET https://api.verifik.co/v2/email-validations

With this service, you can retrieve all email validations that have been created by your account. The response includes pagination information and detailed data about each email validation record.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer {YOUR_ACCESS_TOKEN}

Query Parameters

Name
Type
Description

page

number

Page number for pagination (default: 1)

limit

number

Number of records per page (default: 20)

where_status

string

Filter by status: new, sent, validated, failed

where_type

string

Filter by type: validation, login, onboarding, oneTimeLink

where_email

string

Filter by email address

where_project

string

Filter by project ID

where_projectFlow

string

Filter by project flow ID

where_client

string

Filter by client ID

sort

string

Sort order (e.g., -createdAt for newest first)

populates[]

string

Related data to include: client, project, projectFlow

Request

const axios = require("axios");

const config = {
    method: "get",
    url: "https://api.verifik.co/v2/email-validations",
    headers: {
        "Content-Type": "application/json",
        Authorization: "Bearer YOUR_ACCESS_TOKEN"
    },
    params: {
        page: 1,
        limit: 20,
        where_status: "validated",
        sort: "-createdAt"
    }
};

axios.request(config)
    .then(response => console.log(response.data))
    .catch(error => console.error(error));

Response

{
    "data": [
        {
            "_id": "63505a2cf61d5a8d0f85417d",
            "client": "623b6317fe5fd1774be9f598",
            "project": "635059838c4cca6fdbd12237",
            "projectFlow": "635059838c4cca6fdbd09238",
            "status": "validated",
            "validationMethod": "verificationCode",
            "email": "[email protected]",
            "type": "onboarding",
            "otp": "$2a$10$zSS91Dubgb2jGtHlPPjrkareD8k2clcplqB7a4T3.42D4idumUOiJ4.",
            "expiresAt": "2024-12-19T20:27:28.000Z",
            "redirectUrl": "https://example.com/success",
            "webhookUrl": "https://api.client.com/webhooks/verifik",
            "requires2FA": false,
            "ipAddress": "192.168.1.1",
            "extraParams": [],
            "emailData": {
                "projectName": "Example Project",
                "contactEmail": "[email protected]",
                "template": "onboarding",
                "firstName": "John",
                "logo": "https://cdn.verifik.co/access/projectlogo.png"
            },
            "deleted": false,
            "createdAt": "2024-12-19T20:12:28.613Z",
            "updatedAt": "2024-12-19T20:13:14.199Z",
            "__v": 0
        },
        {
            "_id": "6351a8cf8b14defddw55f675aa",
            "client": "623b6317fe512fd1774be9f566",
            "project": "635059838c4cc121a6fdbd09237",
            "projectFlow": "635059838c4cca6fdbd09238",
            "status": "failed",
            "validationMethod": "verificationCode",
            "email": "[email protected]",
            "type": "login",
            "otp": "$2a$10$0WKihkKMar2kN5qZyFvrMe2DP1lGY5gRKrXCiZmrAbtaK0is4DoD.",
            "expiresAt": "2024-12-20T20:15:15.000Z",
            "redirectUrl": "https://example.com/login",
            "webhookUrl": null,
            "requires2FA": false,
            "ipAddress": "192.168.1.2",
            "extraParams": [],
            "emailData": {
                "projectName": "Example Project",
                "contactEmail": "[email protected]",
                "template": "login"
            },
            "deleted": false,
            "createdAt": "2024-12-20T20:00:16.618Z",
            "updatedAt": "2024-12-20T20:15:19.434Z",
            "__v": 0
        }
    ],
    "total": 2,
    "limit": 20,
    "page": 1,
    "pages": 1
}

Response Body

Parameter
Type
Description

data

Array

Array of email validation records

total

Number

Total number of records available

limit

Number

Number of records per page

page

Number

Current page number

pages

Number

Total number of pages

Email Validation Record Fields

Field
Type
Description

_id

String

Unique identifier of the email validation

client

Object

Client information (populated if requested)

project

Object

Project information (populated if requested)

projectFlow

Object

Project flow information (populated if requested)

status

String

Current status: new, sent, validated, failed

validationMethod

String

Method used: verificationCode or manual

email

String

Email address being validated

type

String

Type of validation: validation, login, onboarding, oneTimeLink

otp

String

Hashed one-time password (for security)

expiresAt

String

Timestamp when the OTP expires

redirectUrl

String

URL for redirect after validation

webhookUrl

String

Webhook URL for notifications

requires2FA

Boolean

Whether two-factor authentication is required

ipAddress

String

IP address of the validation request

extraParams

Array

Additional parameters passed during creation

emailData

Object

Email template and project-specific data

deleted

Boolean

Whether the record has been deleted

createdAt

String

Timestamp when the record was created

updatedAt

String

Timestamp when the record was last updated

Important Notes

  • Authentication Required: You must provide a valid Bearer token to access this endpoint

  • Client Isolation: The system automatically filters results based on your client ID for security

  • Pagination: Use page and limit parameters to navigate through large result sets

  • Filtering: Apply filters to narrow down results by status, type, email, or project

  • Sorting: Use the sort parameter to order results (e.g., -createdAt for newest first)

  • Data Population: Use populates[] to include related client, project, and project flow information

  • Security: OTP values are returned as hashed strings for security purposes

Use Cases

  • Monitoring: Track the status of all email validations across your projects

  • Analytics: Analyze validation success rates and user engagement

  • Audit Trail: Maintain records of all email verification attempts

  • Troubleshooting: Investigate failed validations and identify issues

  • Reporting: Generate reports on validation activities for compliance purposes

This endpoint provides comprehensive access to all email validation records while maintaining security through client isolation and pagination for optimal performance.

Last updated

Was this helpful?