v2

latestOpenAPI 3.1.02026-08-075421692.0 MB
Verify

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.

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.

Codes deliver by SMS from a phone number on your account (from optional when you own exactly one SMS-enabled number) and the message uses a fixed template. Each accepted send bills one verification fee plus the standard message rate.

post/v1/verify/verifications

Request body

channel'sms' required

SMS-only for now.

tostring required

E.164 phone number.

fromstring

The SMS-enabled number on your account to send from. Defaults to your only SMS number.

brandNamestring

Your app or business name, rendered in the message. Defaults to your account name. Letters, numbers, and basic punctuation only.

codeLengthinteger
ttlMinutesinteger

Response

Active verification found: a fresh code was resent (resend: true).

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

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

lastSentAtstring date-time nullable
createdAtstring date-time
resendboolean

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