Skip to main content

Supported Channels

NativeMessage supports:
  • WhatsApp Business API (template and session messages)
  • Viber Business (promotional and transactional)
  • Telegram Bot API

Channel Setup

Create an OTT channel linked to a provider:
curl -X POST https://api-message.nativehub.live/api/v1/ott/channels \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "provider_id": "prov_abc123",
    "channel_type": "whatsapp",
    "config": {
      "phone_number_id": "123456789",
      "business_account_id": "987654321"
    }
  }'

Template Management

Create Template

curl -X POST https://api-message.nativehub.live/api/v1/ott/templates \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "chan_abc123",
    "name": "order_confirmation",
    "language": "en",
    "category": "transactional",
    "body": "Your order {{1}} is confirmed. Total: ${{2}}"
  }'
WhatsApp templates require Meta approval before use. Approval typically takes 24-48 hours.

Template Status

Templates have these states:
  • pending — Awaiting approval
  • approved — Ready to use
  • rejected — Failed approval

Sending OTT Messages

Template-Based Message

curl -X POST https://api-message.nativehub.live/api/v1/ott/messages \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "chan_abc123",
    "destination": "+1234567890",
    "template_id": "tmpl_xyz789",
    "parameters": ["ORD-12345", "49.99"]
  }'

Session Message (Freeform)

Session messages can be sent within 24 hours of user reply (WhatsApp):
curl -X POST https://api-message.nativehub.live/api/v1/ott/messages \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "chan_abc123",
    "destination": "+1234567890",
    "content": {
      "type": "text",
      "text": "Thank you for your inquiry!"
    }
  }'
Session windows vary by platform:
  • WhatsApp: 24 hours from last user message
  • Viber: No session window
  • Telegram: No session window

Retry Failed Messages

curl -X POST https://api-message.nativehub.live/api/v1/ott/messages/msg_abc123/retry \
  -H "Authorization: Bearer YOUR_TOKEN"