Zernio
APIFor you
Zernio
APIFor you
API Reference

Verify

Send a verification codePOSTGet a verificationGETCheck a verification codePOST
Dashboard
OverviewPlatformsAPI ReferenceResources
Verify

Check a verification code

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

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Path Parameters

verificationId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.verify.checkVerification({  path: {    verificationId: 'verification_abc123',  },  body: {    code: 'abc123',  },});console.log(data);
{  "id": "string",  "status": "pending",  "channel": "sms",  "to": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "attempts": 0,  "maxAttempts": 0,  "sendCount": 0,  "lastSentAt": "2019-08-24T14:15:22Z",  "deliveryStatus": "delivered",  "deliveryErrorCode": 0,  "createdAt": "2019-08-24T14:15:22Z",  "resend": true,  "valid": true}
Was this page helpful?

Get a verification

Current state of a verification. `status` is effective (a pending code past its expiry reads as `expired`). Verification records are deleted 24 hours after creation, after which this returns 404.

List keys

Returns API keys with a preview only, not the full key value. For a regular team member this is their own keys; for the team owner this is every team member's keys, each carrying a `createdBy` field.

code*string
Match^\d{4,8}$