Skip to content

Use case

For developers

A practical OTP API integration flow into a backend in a few minutes.

Quick Answer

Cascade integration for a developer: key in the cabinet → Authorization Bearer → /otp/send → user enters code → /otp/verify. Base URL https://cascade.kz/api.

Summary

Take a Bearer token, call POST /otp/send and POST /otp/verify, handle 401/422/429. Key only on the server.

Key Takeaways

  • Key only on the server.
  • See /api/errors and rate limits.
  • WA/TG is cheaper than SMS in tokens.

Task

Embed outbound OTP into a backend without unnecessary glue.

Minimal flow

  1. Create a company and API key in the cabinet.
  2. Store the token on the server (not in the frontend).
  3. POST https://cascade.kz/api/otp/send with the user's phone.
  4. Show the code input form.
  5. POST https://cascade.kz/api/otp/verify.
  6. On errors check the status code and body.

Example request idea (pseudo):

POST /api/otp/send
Authorization: Bearer <token>
Content-Type: application/json

{"phone":"+77001234567"}

What to handle immediately

Topic Where to look
Wrong key 401/api/errors
Validation 422
Limits 429/api/rate-limits
Billing WA/TG = 1 token, SMS = 16 — /pricing
SDK /sdk
Full guide /docs

Limits

Do not promise 100% delivery: channels depend on the network. Keep SMS as a more expensive fallback. Useful product scenarios: /use-cases/saas and channel /use-cases/telegram.

FAQ

Where is OpenAPI?
https://cascade.kz/openapi.yaml and the /api reference.
Where to start?
Key → POST /otp/send → POST /otp/verify → monitor in the cabinet.