Help Center Cascade API

Cascade API

Cascade API އެއްވެސް އެއްވެސް ލިޔުންވާ ސަފްޙާލުން ފަށަން: Telegram bot, Viber bot, Viber Business Messages, RCS, SMS, email އާން push. އަދި އެންމެ ނަޝަވަނީ އެންމެ ލަންސަވަނީ ފަށަން އަށް ފަށަނީ އަށް ފަށަން ވަނީ އެންމެ ލަންސަވަނީ ފަށަނީ ވަނީ އަށް ފަށަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ ވަނީ

Base URL

https://restapi.smsbat.com

OpenAPI / Swagger

The full, machine-readable specification is public:

The request schema is LegacyMessageDataDTO; the SMS/other fallback element is LegacyFallbackDTO; the Viber part is LegacyViberMessage; the Telegram part is LegacyTelegramMessageData.

Authentication

Requests are authenticated with headers:

HeaderPurpose
X-Authorization-KeyOrganization API key. Generated in omni.smsbat.com. It is the same key as the one used for https://api.smsbat.com/bat/messagelist.
X-Viber-Auth-TokenToken of the Viber bot the message is sent through. Required for Viber bot delivery, because an organization can have several bots.
X-Tg-Bot-KeyToken of the Telegram bot the message is sent through. Required for Telegram bot delivery.
curl -X POST https://restapi.smsbat.com/api/CascadeMessage/send_message_async \
  -H "Content-Type: application/json" \
  -H "X-Authorization-Key: <organization key from omni.smsbat.com>" \
  -H "X-Viber-Auth-Token: <viber bot token>" \
  -d @request.json

Bot tokens are stored in your organization in the SMSBAT panel, but they still have to be sent with every request so the platform knows which bot to use.

Endpoints

MethodEndpointDescription
POST/api/CascadeMessage/send_message_asyncAccepts the batch and returns immediately; delivery statuses arrive via callbacks. Recommended.
POST/api/CascadeMessage/send_messageSynchronous variant of the same request.
POST/api/CascadeMessage/send_message/omni-smsbat/tg-viber/asyncCascade with Telegram → Viber priority.
GET/api/CascadeMessage/status_guid/{guid}SMSBAT messageId އަށް ގެންނޭ މެސެޖްގެ ސްޓެޓުސް.
GET/api/CascadeMessage/status_id/{id}SMSBAT messageId އަށް ގެންނޭ މެސެޖްގެ ސްޓެޓުސް.

އެންމެ ކާމެއް

Telegram bot → Viber bot → Viber Business → RCS → SMS

އެއްވެސް އެއްވެސް އެންގާނެވޭ މެސެޖްގެ އެލައިން އެކަށްފަހުން. މައްސަލައިފިލާން ވަނީ ޕްލެޓްފޮރމް އަށް ނިމުންފައިވާ ޗެނަލްތައް އަށް ފެންނަވަނީ؛ ޗެނަލް އެންމެ ފަށަންވާ (އުސަރު ބޮޓްގެ ނިންވާ، ނަންވަނީ Viber ނެތް، މެސެޖް ނިސްވަން) އަށް ނިމޭ ފޮލްބެކް އަށް ފިލާލަނީ. ކޮލްބެކް އަށް ފިންނަވަނީ އެންމެ ޗެނަލް ކުރިއަށް ނިންވާނެ.

އަލުން ނިމޭ ނިސްވަނީ ނަން ނިސްވަނީ:

  • toPhone ނެތް މެސެޖް ބޮޓްގެ އަށް ފަހުން. Viber Business އާން SMS ފޮނު ނަންވާ ފޮނުވާނެ: toPhone އަށް މެސެޖްގައި ނެތް fallbacks[] ގެ އަށް toPhone އަށް.
  • ބޮޓް ފަންވަނީ އަށް ނަންވާ ނަންވާ ނަންވާ: Telegram އަށް tgMessage.chatId އަށް Viber އަށް viberMessage.receiver. މިއަށް ބޮޓް އަށް އަށްވެސް ފަށަންވާނެ އަށް SMSBAT އަށް ސިንክލް ނެތް.

އެނގާނެވޭ އެލައިން އަށް އަށް

[
  {
    "id": "ORDER-12345",
    "callbackUrl": "https://example.com/smsbat/status",
    "fromName": "YourBrand",
    "toPhone": "380501234567",
    "messageType": "transaction",
    "ttl": 60,
    "viberMessage": {
      "type": "text",
      "sender": { "name": "YourBrand" },
      "text": "Your order #12345 has been shipped",
      "fallbacks": [
        {
          "messageType": "sms",
          "toPhone": "380501234567",
          "fromName": "YourBrand",
          "ttl": 60,
          "text": "Your order #12345 has been shipped"
        }
      ]
    }
  }
]

ފޯން ނަންވާ: އިންޓަރނޭޝަނަލް ފޮރމެޓް، ނަންވާ ނަންވާ ނަންވާ، + ނެތް (380501234567).

އެންގާނެވޭ ފިލްޑްސް އަށް Send Cascade Messages ސެރޭފްސް ފަހުން.

އަށްވެސް

200 OK އަށް މެސެޖް އަށް އެނގާނެވޭ އޮބޖެކްޓް، އެނގާނެވޭ އަށް އެނގާނެވޭ އަށް.

[
  {
    "messageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "trackinId": "ORDER-12345"
  }
]
  • messageId — SMSBAT މެސެޖް GUID; އެނގާނެވޭ ވެލޭލް ކޮލްބެކްސްގައި message_id އަށް ވަން.
  • trackinId — އަށްވެސް id އަށް ލަންވާނެ؛ ކޮލްބެކްސްގައި track_id އަށް ވަން.

400 Bad Request — ހުރި ބޭޕްސް ލަންވާނެ، އަށްވެސް އެނގާނެވޭ ލަންވާނެ؛ އެނގާނެވޭ ލަންވާނެ ނެތް ނިސްވަންވެސް ފެންނަވަން ނެތް.

ޑިލިވަރީ ސްޓެޓުސް

ސްޓެޓުސް އެނގާނެވޭ callbackUrl އަށް އެނގާނެވޭ މެސެޖްގެ (އަށް އޮރގަންސައިޒޭޝަން-ލެވެލް ކޮލްބެކް URL) POST ލިޔެވިފައިވާނެ JSON ބޮޑީ އެނގާނެވޭ އެނގާނެވޭ އޮބޖެކްޓް އެވެ. ފޮރމެޓް، ސްޓެޓުސް އަށް ލަންވާނެ ލަންވާނެ: Delivery Callbacks. އެވެ ލަންވާނެ status_guid / status_id އެނޑްޕޯއިންޓްސްގައި ފެންނަވަން.

ލިމިޓްސް

  • ލިޔެވިފައިވާ ބޮޑީ: 10 MB ގެ އަށް.
  • އެނގާނެވޭ އެލައިން ގެ މެސެޖްގެ ނަންވާ ސަލަށް ވަނީ ވަނަށް ނެތް؛ ބޮޑީ ސައިސް އެނގާނެވޭ ލިމިޓް އަށް.
  • Cascade API ގެ ސެކަންޑްގެ އަންސަރަން ނުވަތަ ނުވަނީ އަލަން ސެކަންޑްގެ ލިމިޓްސް ނޭނގޭ. މެސެޖްތައް އެކަށް އެންމެ ލިޔެވިފައިވާނެ އަށް ގްރޫޕްކުރަނޭ ބޭޓްޗްސްގައި އެންނަން.

މެސެޖް ޓައިޕްސް އަދި ވެލިއާބަލްސް

ޓެސްޓިންގް

ސެޕަރެޓް ޓެސްޓް އެންވަރިންމަންޓް (sandbox) ނެތެވެ، ކާލްބެކްސް ސިމިލޭޝަން ނެތެވެ. އިންޓެގްރޭޝަންސް ވަނީ ވާނަ އެކަމަށް އަލުންވާ: އަލަށް ސަމާލް ބެޓްޗް އަށް އަލުންވާ ފޮން ނަންބަރު ނަން އަލުން ބޮޓް ޔުސަރުގެ އަލުން ވަންނަވަން callbackUrl އަށް HTTPS އެނޑްޕޯއިންޓް އަށް ވަނަވަނީ. ސްޓެޓިސް އެންމެ ލިޔެވިފައިވާނެ ޑެލިވަރީ ކާލްބެކްސް; ސްޓެޓިސް އަށް GET /api/CascadeMessage/status_guid/{guid} އަށް status_id/{id} އަށް ޕޮލްލްއަށް ވަނީ.