Example of Viber Message request

JSON

Example of template Message request:

{
  "phone_number": 380961111111,
  "extra_id": "AD-6640-7006",
  "callback_url": "https://send-dr-here.com",
  "start_time": "2020-12-12 10:10:10+03:00",
  "tag": "Campaign name",
  "channels": [
    "viber"
  ],
  "channel_options": {
    "viber": {
      "text": "Templated text for Viber",
      "ttl": 60
    }
  }
}

Example of non-template Message request :

{
  "phone_number": 380961111111,
  "extra_id": "AD-6640-7006",
  "callback_url": "https://send-dr-here.com",
  "start_time": "2020-12-12 10:10:10+03:00",
  "tag": "Campaign name",
  "channels": [
    "viber"
  ],
  "channel_options": {
    "viber": {
      "text": "Text for Viber",
      "ttl": 60,
      "device": "phone",
      "img": "https://example.com/image.png",
      "caption": "Click the button",
      "action": "https://example.com"
    }
  }
}

Example of Viber Message request with “alpha_name” parameter:

{
  "phone_number": 380961111111,
  "extra_id": "AD-6640-7006",
  "callback_url": "https://send-dr-here.com",
  "start_time": "2020-12-12 10:10:10+03:00",
  "tag": "Campaign name",
  "channels": [
    "viber"
  ],
  "channel_options": {
    "viber": {
      "text": "Text for Viber",
      "ttl": 60,
      "device": "phone",
      "alpha_name": "GMSU",
      "img": "https://example.com/image.png",
      "caption": "Click the button",
      "action": "https://example.com"
    }
  }
}

XML

Example of template Message request:

<?xml version="1.0" encoding="UTF-8" ?>
<message>
  <phone_number>380961111111</phone_number>
  <extra_id>AD-6640-7006</extra_id>
  <callback_url>https://send-dr-here.com</callback_url>
  <start_time>2020-12-12 10:10:10+03:00</start_time>
  <tag>Campaign name</tag>
  <channels>
    <channel>viber</channel>
  </channels>
  <channel_options>
    <viber>
      <text>Templated text for Viber</text>
      <ttl>60</ttl>
    </viber>
  </channel_options>
</message>

Example of non-template Message request:

<?xml version="1.0" encoding="UTF-8" ?>
<message>
  <phone_number>380961111111</phone_number>
  <extra_id>AD-6640-7006</extra_id>
  <callback_url>https://send-dr-here.com</callback_url>
  <start_time>2020-12-12 10:10:10+03:00</start_time>
  <tag>Campaign name</tag>
  <channels>
    <channel>viber</channel>
  </channels>
  <channel_options>
    <viber>
      <text>Text for Viber</text>
      <ttl>60</ttl>
      <device>phone</device>
      <img>https://example.com/image.png</img>
      <caption>Click the button</caption>
      <action>https://example.com</action>
    </viber>
  </channel_options>
</message>

Example of Viber Message request with parameter:

<?xml version="1.0" encoding="UTF-8" ?>
<message>
  <phone_number>380961111111</phone_number>
  <extra_id>AD-6640-7006</extra_id>
  <callback_url>https://send-dr-here.com</callback_url>
  <start_time>2020-12-12 10:10:10+03:00</start_time>
  <tag>Campaign name</tag>
  <channels>
    <channel>viber</channel>
  </channels>
  <channel_options>
    <viber>
      <text>Text for Viber</text>
      <ttl>60</ttl>
      <alpha_name>GMSU</alpha_name>
      <device>phone</device>
      <img>https://example.com/image.png</img>
      <caption>Click the button</caption>
      <action>https://example.com</action>
    </viber>
  </channel_options>
</message>