Verify

Check a verification code

Changed on

Verify the code the user typed. Wrong, expired, and exhausted codes answer 200 with valid: false and the settled status. Only an unknown id is a 404. A correct code consumes the verification (single-use, status: approved) and fires the verification.approved webhook; the 5th wrong attempt settles it as max_attempts_reached and fires verification.failed.

post/v1/verify/verifications/{verificationId}/check

Request

  • Base URL: https://zernio.com/api
  • URL: https://zernio.com/api/v1/verify/verifications/{verificationId}/check
  • Auth: HTTP bearer

Path parameters

verificationIdstring required

Request body

codestring required

Response

Check result: the verification plus valid.

idstring
status'pending' | 'approved' | 'expired' | 'max_attempts_reached' | 'canceled' | 'delivery_failed'
channel'sms' | 'whatsapp'
tostring
expiresAtstring date-time
attemptsinteger
maxAttemptsinteger
sendCountinteger

Accepted deliveries (initial send + resends); each bills one verification fee.

lastSentAtstring date-time nullable
deliveryStatus'delivered' | 'read' | 'failed' | 'null' nullable

WhatsApp only, returned by GET /v1/verify/verifications/{verificationId} (null on create and check responses): what Meta reported for the latest send, null until it reports. A code that never reached the recipient (for example a number not on WhatsApp) reads failed, with the Meta error in deliveryErrorCode. failed does not settle the verification: Meta can report failed and later deliver the same message. Reported for at least an hour after the send, well past any code's expiry.

deliveryErrorCodeinteger nullable

Meta error code when deliveryStatus is failed (e.g. 131026, message undeliverable).

createdAtstring date-time
resendboolean

Present on create responses: true when an active verification was resent instead of created.

validboolean

Changes

    • warning

      added the new account enum value to the / response property for the response status

    • warning

      added the new account enum value to the / response property for the response status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status