Viber Mass Messages (batch) request

Example of template Message request:

{
  "messages": [{
    "phone_number": 380961111111,
    "extra_id": "AD-6640-7006",
    "text": " Templated text for Viber, recipient #380961111111"
  },
    {
      "phone_number": 380962222222,
      "extra_id": "AD-6640-7007",
      "text": " Templated text for Viber, recipient #380962222222"
    }
  ],
  "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": {
      "ttl": 60,
      "device": "phone"
    }
  }
}

Example of non-template Message request:

{
  "messages": [
    {
      "phone_number": 380961111111,
      "extra_id": "AD-6640-7006",
      "text": "Text for all channels, recipient #380961111111"
    },
    {
      "phone_number": 380962222222,
      "extra_id": "AD-6640-7007",
      "text": "Text for all channels, recipient #380962222222"
    }
  ],
  "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": {
      "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:

{
  "messages": [
    {
      "phone_number": 380961111111,
      "extra_id": "AD-6640-7006",
      "text": "Text for all channels, recipient #380961111111"
    },
    {
      "phone_number": 380962222222,
      "extra_id": "AD-6640-7007",
      "text": "Text for all channels, recipient #380962222222"
    }
  ],
  "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": {
      "ttl": 60,
      "device": "phone",
      "alpha_name": "GMSU",
      "img": "https://example.com/image.png",
      "caption": "Click the button",
      "action": "https://example.com"
    }
  }
}