API Documentation

Complete API reference for integrating ContactVerify into your applications.

Base URL

https://contactverify-joba123-api.greenbush-881e5440.eastus.azurecontainerapps.io

Authentication

Authorization: Bearer YOUR_API_KEY

Quick Example (cURL)

curl -X POST https://contactverify-joba123-api.greenbush-881e5440.eastus.azurecontainerapps.io
/v1/contact/send-code \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"channel": "EMAIL", "email": "user@example.com", "purpose": "login"}'

Endpoints

POST/v1/contact/send-code
Send a verification code (OTP) via Email, WhatsApp, or SMS — single or dual channel in one request
{
  // ── Single channel ──────────────────────────────────────────────────
  "channel": "EMAIL",              // "EMAIL" | "WHATSAPP" | "SMS"

  // ── Dual channel (exactly 2, must be different) ─────────────────────
  "channels": ["EMAIL", "SMS"],    // sends OTPs on both at once

  // ── Destination ─────────────────────────────────────────────────────
  "email": "user@example.com",     // required for EMAIL channel
  "phone": "+14155552671",         // required for WHATSAPP / SMS
                                   // (also accepted: whatsappNumber, phoneNumber)

  // ── Optional ────────────────────────────────────────────────────────
  "country": "US",                 // ISO 3166-1 alpha-2 — auto-inferred from phone if omitted
  "deliveryType": "TEXT",          // WHATSAPP only: "TEXT" (default) or "CALL"
  "purpose": "login",              // label surfaced in logs & analytics
  "customMessage": "Sign in to Acme Corp — if this wasn't you, contact support."
                                   // optional note injected into the email body
}
POST/v1/contact/verify-code
Verify an OTP code using the requestId returned from send-code
{
  "requestId": "b1efc76d-9094-4857-b6f1-fbbbb9dec9a5",
  "otpCode": "123456"   // also accepted as "code"
}
GET/health
Check API health and confirm which channels and services are operational
No request body required

Recipes

6 use cases

Copy-paste curl commands for every channel combination — from simple email OTP to dual-channel blasts with custom context.

Email OTP

User account sign-in, registration, or password reset via email.

curl -X POST https://contactverify-joba123-api.greenbush-881e5440.eastus.azurecontainerapps.io
/v1/contact/send-code \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "EMAIL",
    "email": "user@example.com",
    "purpose": "login"
  }'

Error Codes

CodeStatusDescription
400Bad RequestInvalid request parameters
401UnauthorizedInvalid or missing API key
404Not FoundResource not found
429Too Many RequestsRate limit exceeded
500Internal ErrorServer error, please retry

Official SDKs

Get started faster with our official client libraries.

Node.js

Python

Java

Go

Ruby

PHP

C#

Rust