Skip to content

API

POST /otp/send — send OTP

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

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 отправлен через WhatsApp",
  "expires_in": 300,
  "short_url": "https://cascade.kz/s/Ab3xK9"
}

short_url only if link was passed.

Next: verify, responses, examples, FAQ.