List all Phone Validations
GET
https://api.verifik.co/v2/phone-validations
With this service, you can retrieve all phone validations that have been created by your account. The response includes pagination information and detailed data about each phone validation record. This endpoint is useful for monitoring phone validation activities, generating reports, or managing multiple validation records.
Headers
Content-Type
application/json
Authorization
Bearer {YOUR_ACCESS_TOKEN}
Query Parameters
page
number
Page number for pagination (default: 1).
limit
number
Number of records per page (default: 10).
sort
string
Sort field and direction (e.g., -createdAt
for newest first, createdAt
for oldest first).
where_project
string
Filter by project ID.
where_projectFlow
string
Filter by project flow ID.
where_status
string
Filter by status: new
, sent
, validated
, failed
, or expired
.
where_type
string
Filter by validation type: validation
, login
, onboarding
, or oneTimeLink
.
where_phone
string
Filter by specific phone number.
where_countryCode
string
Filter by country code (e.g., +507
).
where_phoneGateway
string
Filter by delivery method: sms
, whatsapp
, or none
.
where_requires2FA
boolean
Filter by two-factor authentication requirement.
in_language[]
Array<string>
Filter by language setting.
populates[]
Array<string>
A list of related objects to include. Available options: client
, project
, projectFlow
.
Query Examples
Basic List Request
GET /v2/phone-validations
Filtered by Status
GET /v2/phone-validations?where_status=sent&limit=20
Filtered by Project and Type
GET /v2/phone-validations?where_project=507f1f77bcf86cd799439011&type=onboarding
Advanced Filtering with Pagination
GET /v2/phone-validations?where_status=validated&where_phoneGateway=whatsapp&page=2&limit=50&sort=-createdAt
Request Examples
curl -X GET "https://api.verifik.co/v2/phone-validations?status=sent&limit=20" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
Response
The response includes pagination information and an array of phone validation records. Each record contains detailed information about the validation process.
{
"data": [
{
"_id": "674de8df21c72be3cc42b8a7",
"client": "507f1f77bcf86cd799439013",
"project": "507f1f77bcf86cd799439011",
"projectFlow": "507f1f77bcf86cd799439015",
"status": "sent",
"countryCode": "+507",
"phone": "62647737",
"phoneGateway": "whatsapp",
"otp": "$2a$10$/v55.1QmwlCdX6zD1jy51OF87POIDZzj30.UmTtp13pZv6uKm.a.m",
"expiresAt": "2024-12-02T17:15:35.000Z",
"name": "John Doe",
"phoneData": {
"title": "Verifik Client"
},
"extraParams": {},
"type": "validation",
"redirectUrl": "https://api.verifik.co",
"webhookUrl": "https://yourapp.com/webhook",
"requires2FA": false,
"ipAddress": "172.17.0.1",
"language": "en",
"createdAt": "2024-12-02T17:05:36.788Z",
"updatedAt": "2024-12-02T17:05:36.788Z",
"__v": 0
},
{
"_id": "674de8df21c72be3cc42b8a8",
"client": "507f1f77bcf86cd799439013",
"project": "507f1f77bcf86cd799439011",
"projectFlow": "507f1f77bcf86cd799439016",
"status": "validated",
"countryCode": "+507",
"phone": "62647738",
"phoneGateway": "sms",
"otp": "$2a$10$/v55.1QmwlCdX6zD1jy51OF87POIDZzj30.UmTtp13pZv6uKm.a.m",
"expiresAt": "2024-12-02T17:15:35.000Z",
"name": "Jane Smith",
"phoneData": {
"title": "Verifik Client"
},
"extraParams": {},
"type": "onboarding",
"redirectUrl": "https://api.verifik.co",
"webhookUrl": "https://yourapp.com/webhook",
"requires2FA": false,
"ipAddress": "172.17.0.2",
"language": "en",
"createdAt": "2024-12-02T17:05:36.788Z",
"updatedAt": "2024-12-02T17:05:36.788Z",
"__v": 0
}
],
"total": 2,
"limit": 20,
"page": 1,
"pages": 1
}
Notes
Access Control: This endpoint respects client-based access control. Users can only retrieve phone validations associated with their client account.
Default Population: Related objects (client, project, projectFlow) are automatically populated to provide comprehensive information.
Filtering: Multiple filters can be combined to narrow down results effectively.
Sorting: Use the
sort
parameter to control the order of results (e.g.,-createdAt
for newest first).Pagination: The response includes pagination metadata to help navigate through large result sets.
Security: OTP fields are encrypted and cannot be used directly for validation purposes.
Common Use Cases
Monitoring: Track phone validation activities and success rates across your projects.
Reporting: Generate reports on validation performance, delivery methods, and user engagement.
Auditing: Review phone validation history for compliance and debugging purposes.
Analytics: Analyze patterns in phone validation usage, timing, and geographic distribution.
Management: Identify and manage phone validations that require attention (failed, expired, etc.).
Last updated
Was this helpful?