Retrieve an Email Validation
Endpointβ
GET https://api.verifik.co/v2/email-validations/{id}
This service retrieves a specific email validation record using its unique identifier. The response includes all the details about the email validation process, including status, OTP information, and associated project data.
Headersβ
Content-Typeβ
Type: String
Required: Required
Value: application/json
Authorizationβ
Type: String
Required: Required
Value: Bearer {YOUR_ACCESS_TOKEN}
Path Parametersβ
idβ
Type: String
Required: Yes
The unique identifier of the email validation record you want to retrieve.
Query Parametersβ
populates[]β
Type: String
Required: No
Optional array of related data to include. Available options: client, project, projectFlow.
Requestβ
- Node.js
- Python
- PHP
- Go
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.verifik.co/v2/email-validations/email_validation_123456789',
params: {
'populates[]': ['client', 'project', 'projectFlow']
},
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_token>'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
import http.client
conn = http.client.HTTPSConnection("api.verifik.co")
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_token>'
}
conn.request("GET", "/v2/email-validations/email_validation_123456789?populates[]=client&populates[]=project&populates[]=projectFlow", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.verifik.co/v2/email-validations/email_validation_123456789', [
'headers' => [
'Content-Type': 'application/json',
'Authorization' => 'Bearer <your_token>',
],
'query' => [
'populates[]' => ['client', 'project', 'projectFlow']
]
]);
echo $response->getBody();
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.verifik.co/v2/email-validations/email_validation_123456789?populates[]=client&populates[]=project&populates[]=projectFlow"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer <your_token>")
client := &http.Client{}
res, _ := client.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Responseβ
- 200
- 404
{
"success": true,
"data": {
"_id": "email_validation_123456789",
"client": {
"_id": "client_123456789",
"name": "Example Client",
"email": "client@example.com"
},
"project": {
"_id": "project_123456789",
"name": "Example Project",
"description": "Example project description"
},
"projectFlow": {
"_id": "flow_123456789",
"name": "Example Flow",
"type": "onboarding"
},
"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"
},
"signature": {
"dateTime": "April 11, 2023 12:25 PM",
"message": "Certified by Verifik.co"
}
}
{
"success": false,
"error": "Email validation not found",
"code": "EMAIL_VALIDATION_NOT_FOUND"
}
Characteristicsβ
- Retrieval by ID: Get a specific email validation using its unique ID
- Complete Information: Includes all details of the validation process
- Related Data: Client, project and project flow information
- Detailed Status: Current status, attempts, limits and timestamps
- Configuration: Redirect URLs, webhooks and security configurations
- Multiple Languages: Support for JavaScript, Python, PHP and Swift
- Error Handling: Detailed error responses for different scenarios