VerifyHQ Docs

Email Verification

Verify email addresses via OTP or magic link. Confirms email ownership and validates deliverability. OTPs expire after 15 minutes with up to 3 retry attempts.

POST/verifications/email

Initiate an email verification by sending an OTP or magic link to the specified address.

Request Body

ParameterTypeDescription
emailrequiredstringEmail address to verify
userIdrequiredstringYour internal user identifier
methodenumVerification method: OTP (default) or MAGIC_LINK
redirectUrlstringRedirect URL after magic link click (required if method is MAGIC_LINK)

Code Examples

curl -X POST https://api.verifyhq.com/v1/verifications/email \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "userId": "user_123",
    "method": "OTP"
  }'

Response

201 Createdjson
{
  "id": "ev_abc123",
  "userId": "user_123",
  "email": "user@example.com",
  "method": "OTP",
  "status": "PENDING",
  "expiresAt": "2026-02-18T13:15:00Z",
  "createdAt": "2026-02-18T13:00:00Z"
}
POST/verifications/email/:id/verify

Submit the OTP code to complete email verification.

Request Body

ParameterTypeDescription
coderequiredstringThe 6-digit OTP code
curl -X POST https://api.verifyhq.com/v1/verifications/email/ev_abc123/verify \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "code": "739201" }'

Response

200 OKjson
{
  "id": "ev_abc123",
  "status": "VERIFIED",
  "email": "user@example.com",
  "verifiedAt": "2026-02-18T13:01:45Z"
}
GET/verifications/email/:id

Retrieve the current status of an email verification.

curl https://api.verifyhq.com/v1/verifications/email/ev_abc123 \
  -H "X-API-Key: your_api_key"

Response

200 OKjson
{
  "id": "ev_abc123",
  "userId": "user_123",
  "email": "user@example.com",
  "method": "OTP",
  "status": "VERIFIED",
  "deliverability": "DELIVERABLE",
  "disposable": false,
  "verifiedAt": "2026-02-18T13:01:45Z",
  "createdAt": "2026-02-18T13:00:00Z"
}

Verification Statuses

ParameterTypeDescription
PENDINGstatusOTP/link sent, awaiting user action
VERIFIEDstatusEmail ownership confirmed
FAILEDstatusMax attempts exceeded or invalid code
EXPIREDstatusOTP/link expired (15-minute window)

Webhook Events

ParameterTypeDescription
email.verifiedeventEmail address successfully verified
email.failedeventEmail verification failed