Skip to content

API

Send OTP

The POST /api/otp/send endpoint delivers a code to the user's real phone.

Quick Answer

POST https://cascade.kz/api/otp/send with Bearer and the phone field.

Summary

Send JSON with phone (required), optionally purpose, channel, link. Bearer authorization.

Key Takeaways

  • Channels: whatsapp|telegram|sms or company default.
  • expires_in is usually 300 seconds.
  • No more than ~1 time per 60 sec per number.

Related Questions

Request

curl -sS -X POST "https://cascade.kz/api/otp/send" \
  -H "Authorization: Bearer $OTP_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"phone":"77001234567","purpose":"verification"}'

Fields

Field Required Description
phone yes Recipient phone
purpose no Scenario, default verification
channel no whatsapp | telegram | sms
link no URL, shortened and added to the message
link_expires_in no Short link TTL, 60…2592000 sec

Success

{
  "success": true,
  "message": "OTP sent via WhatsApp",
  "expires_in": 300,
  "short_url": "https://cascade.kz/s/Ab3xK9"
}

short_url only if link was passed.

Next: verify, responses, examples, FAQ.