Skip to content

Cascade API response formats

Unified response style: JSON with success and message.

On this page
  1. Successful send
  2. Successful verify
  3. Error

Successful send

{
  "success": true,
  "message": "OTP отправлен через WhatsApp",
  "expires_in": 300,
  "otp_id": 1241,
  "channel": "whatsapp",
  "locale": "ru",
  "credits_charged": 3
}

Successful verify

{
  "success": true,
  "message": "Номер подтверждён"
}

Error

A send with insufficient funds returns HTTP 402.

{
  "success": false,
  "error_code": "insufficient_balance",
  "message": "Недостаточно токенов рассылки. Пополните баланс."
}

Laravel validation responses may include an errors object — handle it alongside message.

API message strings are always Russian, whatever the docs language is. Branch on error_code / HTTP status, not on the text.

See errors, statuses, documentation, blog.