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.
Authentication
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
Path parameters
Responses
Success· the request worked
Errors· the request failed
Send a verification code
Generate a one-time code, deliver it to the recipient, and store only its hash. Check the user-typed code with POST /v1/verify/verifications/{verificationId}/check. ### Resends Re-POSTing for the same (channel, to) while a verification is active RESENDS a fresh code on the existing verification (200 with `resend: true`) instead of creating a new one. Resends are limited to one per 60 seconds (429 with `retryAfterSeconds` inside the cooldown). The stored brandName/codeLength/ttlMinutes win on a resend. ### Channels Codes deliver from a number on your account (`from` optional when you own exactly one number on the channel), always with a fixed template. - `sms`: from an SMS-enabled number. Each accepted send bills one verification fee plus the standard message rate. - `whatsapp`: from a connected WhatsApp number, as a Meta AUTHENTICATION template with a copy-code button. Each accepted send bills one verification fee; Meta bills its authentication rate to your WhatsApp Business Account. ### WhatsApp template The first WhatsApp verification on a WhatsApp Business Account creates the `zernio_verify_code` template there. It answers 422 `template_pending` until Meta approves it (usually minutes; retry after `retryAfterSeconds`). Meta fixes the message text, so `brandName` is not shown and the code's validity is not stated in the message (`ttlMinutes` is still enforced).
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`.