Skip to main content

Validate an Email Validation

Endpoint

POST https://api.verifik.co/v2/email-validations/{id}/validate

This service validates an email validation by providing the verification code. The system will check the code against the stored verification code and update the validation status accordingly.

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 validate.

Body Parameters

verificationCode

Type: String
Required: Yes

The verification code received via email.

Request

import axios from 'axios';

const options = {
method: 'POST',
url: 'https://api.verifik.co/v2/email-validations/email_validation_123456789/validate',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_token>'
},
data: {
verificationCode: '123456'
}
};

try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}

Response

{
"success": true,
"data": {
"_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",
"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"
}
}

Characteristics

  • Code Validation: Validates 6-digit OTP codes sent via email
  • Attempt Control: Tracks validation attempts and maximum limits
  • Expiration: Handles expired codes with appropriate responses
  • Status Update: Updates validation status after successful verification
  • Timestamps: Records when validation was completed
  • Multiple Languages: Support for JavaScript, Python, PHP and Swift
  • Error Handling: Detailed error responses for different scenarios