Help Center SMSBAT API

SMSBAT API

SMSBAT is a RESTful API platform for sending various types of messages including Viber carousel, Viber opinion dialog, Viber promo (pictures, video), Viber business chat, OTP notifications (Viber OTP, Flash Call) and their fallback variants.

Base URL

Requests to SMSBAT API are transmitted to an endpoint with localization. Request the address from your Manager beforehand.

Example: https://restapi.smsbat.com (actual URL may vary based on your region)

Authentication

SMSBAT API supports three authentication methods:

Method 1: HTTP Basic Auth

Use your username and password credentials:

curl -X POST https://restapi.smsbat.com/bat/messagelist \
  -u "username:password" \
  -H "Content-Type: application/json" \
  -d @request.json

Method 2: API Key Header

Use the X-Authorization-Key header:

curl -X POST https://restapi.smsbat.com/bat/messagelist \
  -H "X-Authorization-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d @request.json

Method 3: API Key as Password

Use @ as username and your API key as password:

curl -X POST https://restapi.smsbat.com/bat/messagelist \
  -u "@:your-api-key" \
  -H "Content-Type: application/json" \
  -d @request.json

Available Endpoints

MethodEndpointDescription
POST/bat/messagelistSend messages
GET/bat/message/{messageId}Check message status

Message Types

SMSBAT API supports the following message types:

  • SMS - Standard text messages
  • WhatsApp - WhatsApp Business session messages and approved templates, see WhatsApp via bat/messagelist
  • Viber Promo - Promotional messages with rich media
  • Viber Transactional - Transaction notifications
  • Viber Carousel - Interactive carousel messages
  • Viber Survey - Opinion dialog messages
  • Viber OTP - One-time password notifications
  • RCS - Rich Communication Services messages
  • Flash Call - Silent call verification

Key Features

Fallback Messaging

If the main channel fails or its ttl runs out, SMSBAT sends the next channel from the fallbacks array. For example:

WhatsApp → Viber Business → SMS

See Sequential fallbacks.

Rich Media Support

Send messages with:

  • Images (JPG, PNG)
  • Videos (MP4)
  • PDFs
  • Buttons and action links

Message Status Tracking

The final status of every message arrives in a delivery callback:

  • delivered - delivered;
  • undeliverable - not delivered, a retry may succeed;
  • permanenterror - permanent error, a retry is pointless.

For Viber Business a second callback with extendedStatuses: ["VIBER_SEEN"] may follow delivery when the message is read. A status can also be requested with Check Status.

Callbacks

Interactive Test (Try It)

You can quickly test the SMSBAT API using curl from your terminal. Replace YOUR_API_KEY and the to phone number with your actual details.

curl -X POST https://restapi.smsbat.com/bat/messagelist \
  -H "X-Authorization-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {
        "from": "ALPHANAME",
        "to": "380501234567",
        "text": "Hello! This is a test message from the Try It section.",
        "type": "sms"
      }
    ]
  }'

Quick Start

  1. Send a Message - Learn how to send your first message
  2. Check Status - Track message delivery status
  3. Message Types - Explore different message types

Request Format

All requests use JSON format with the following structure:

{
  "messages": [
    {
      "recipient": "+380XXXXXXXXX",
      "type": "viber",
      "text": "Your message here",
      // ... additional parameters
    }
  ]
}

Response Format

Successful responses return:

{
  "messages": [
    {
      "messageId": "unique-message-id",
      "recipient": "+380XXXXXXXXX",
      "status": "sent"
    }
  ]
}

Error Handling

HTTP status codes:

  • 200 OK - Request successful
  • 400 Bad Request - Invalid request format
  • 401 Unauthorized - Authentication failed
  • 429 Too Many Requests - Rate limit exceeded
  • 500 Internal Server Error - Server error

Next Steps