Task
Embed outbound OTP into a backend without unnecessary glue.
Minimal flow
- Create a company and API key in the cabinet.
- Store the token on the server (not in the frontend).
POST https://cascade.kz/api/otp/sendwith the user's phone.- Show the code input form.
POST https://cascade.kz/api/otp/verify.- 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.