Skip to main content

Validate a Phone Validation

Endpoint

PUT https://api.verifik.co/v2/phone-validations

Confirms the OTP the user received. Verifik looks up the latest sent (and not expired) Phone Validation for that phone — including manual / Smart Tools records and project-flow records.

Pair with send

Standalone OTPs are created with POST /v2/phone-validations/manual. App registration OTPs use POST /v2/phone-validations/app-registration.

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer {YOUR_ACCESS_TOKEN}

Body parameters

ParameterTypeRequiredDescription
phonestringYesSame national number used when sending the OTP.
countryCodestringYesDial code starting with +.
otpnumberYesNumeric code the user received.
phoneGatewaystringNosms or whatsapp — narrows the lookup when both channels were used.
projectstringNoOptional project filter for flow-based records.
projectFlowstringNoOptional project-flow filter (preferred when available).

Request examples

curl -X PUT "https://api.verifik.co/v2/phone-validations" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"phone": "3001234567",
"countryCode": "+57",
"otp": 123456,
"phoneGateway": "whatsapp"
}'

Success response

{
"data": {
"_id": "66f0a1b2c3d4e5f678901234",
"status": "validated",
"countryCode": "+57",
"phone": "3001234567",
"phoneGateway": "whatsapp",
"source": "manual",
"validatedAt": "2026-07-29T22:40:00.000Z"
}
}

OTP lifetime

Pending OTPs are valid for 10 minutes from the last successful send/resend (expiresAt on the create response). After that, this endpoint returns 412 phoneValidation_has_expired. Send a new OTP (respecting the ~2-minute resend cooldown, or use force: true on manual create) before asking the user to try again.

OTP attempts

There is no server-side attempt limit today. Wrong codes return 403 otp_does_not_match until the record expires or a new OTP is sent. Enforce lockout or attempt caps in your client if needed.

Common errors

StatusMessageWhen
403otp_does_not_matchCode does not match the pending OTP.
412phoneValidation_has_expiredThe pending OTP TTL (~10 minutes) has elapsed.
409otp_send_failedLatest record for this phone failed to send (not the same as expiry).
409phone_validation_already_validatedOTP was already validated.
404phone_validation_not_foundNo matching Phone Validation for this phone.
409MissingParameterRequired body fields missing.