Email OTP API

Documentation

Add email OTP verification to any app in 10 minutes.

1. Create a project & key

Sign up, open Projects and create one for your app (choose sender name, OTP length and expiry). Then open API Keys and generate a key pair:

  • X-Api-Key — public key, identifies your project.
  • X-Api-Secret — shown once. Keep it on your server only.

2. Send an OTP

Call POST /send with the user's email. You receive a request_id.

POST https://softwearapp.com/otp-api/api/v1/send
curl -X POST https://softwearapp.com/otp-api/api/v1/send \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: pk_live_xxx' \
  -H 'X-Api-Secret: sk_live_xxx' \
  -d '{"email":"user@example.com"}'

3. Verify the code

When the user types the code, call POST /verify with the request_id and otp.

POST https://softwearapp.com/otp-api/api/v1/verify
curl -X POST https://softwearapp.com/otp-api/api/v1/verify \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: pk_live_xxx' -H 'X-Api-Secret: sk_live_xxx' \
  -d '{"request_id":"req_…","otp":"482913"}'

# → {"ok":true,"verified":true,"email":"user@example.com"}

Security rules built in

  • OTPs are stored hashed and expire after your project's expiry time.
  • Maximum 5 wrong attempts per request, then it is blocked.
  • Maximum 3 sends per email per minute and 120 API calls per minute per project.
  • Every request is logged in Logs; webhooks are HMAC-signed.