---
title: "Send a Viber Campaign"
method: POST
path: "/viber/campaign"
---

# Send a Viber Campaign

`POST /viber/campaign`

Send viber messages to multiple recipients. This is a paid service.

## Headers

- `Authorization` string, required
- `Content-Type` string, required

## Request body

- object
  - `senderInfoTrackingId` string, required — The unique sender id. You can find it at [Routee Platform-applications page](https://go.routee.net/#/management/applications).
  - `to` string[] — The phone numbers (array) the message is about to be sent to. Format with a '+' and country code e.g., +306948530920 (E.164 format). Max length: 1000. One of "groups", "to", "contacts" parameters are required.
  - `contacts` string[] — The contact ids that the message will be sent to. Max length: 1000. One of "groups", "to", "contacts" parameters are required.
  - `groups` string[] — The groups of contacts in the account selected as recipients. Groups have to be created at the system. Max length: 1000. One of "groups", "to", "contacts" parameters are required.
  - `campaignName` string — The name of the viber campaign. If you want to be able to track the whole campaign from Routee web platform use a name. Must be between 2 and 30 characters and contain only latin letters, numbers, spaces and -
  - `isSessionMessage` boolean — Indicates a Viber Campaign is initiated to be a Viber Session. The session rate is applied ONLY after recipient response. Billed per session not per each delivered message. Supported session types are: Text-Only, Image and File. Default value false. Learn more about it at [our documention](https://docs.routee.net/docs/send-a-viber-session)
  - `scheduledDate` string, date — Defines the scheduled date and time in UTC. (eg YYYY-MM-DDThh:mm:ssTZD where TZD is the time zone designator (Z or +hh:mm or -hh:mm))
  - `body` object — Represents the viber message. When the viber message has only text, then the message is transactional. Otherwise, it is promotional. The supported viber message layouts are: Text, Image, Text + Action, Text + Action + Image, carousel. Check [here](/docs/other-viber-messaging-concept) for details.
    - `text` string — The text of viber message. Maximum number of characters supported in a Viber message is 1000 characters. Use [~{labelName}] in order to send personalized messages, by using the labels of your contacts. [Text only messages are billed as Transactional. All the other message types are charged as Promotional]
    - `imageURL` string — The url of the image. (recommended image size: 400KB for optimal delivery; image url length: max 1000 characters; only valid and secure URL starting with https:/)
    - `action` object
      - `caption` string — The displayed text on the button (1-30 characters).
      - `targetUrl` string — The target URL of the viber action.
    - `viberFile` object
      - `fileName` string, required — The name of the file. Max size 25 chars
      - `fileType` string, required — Type of viber message file. The supported file types are following: For document: doc, .docx, .rtf, .dot, .dotx, .odt ,odf, .fodt, .txt, .info For PDF: pdf, .xps, .pdax, .eps For Spreadsheet: .xls, .xlsx, .ods, .fods, .csv, .xlsm, .xltx
      - `fileUrl` string, required — The url of the document. (recommended file size: 600KB for optimal delivery) (document url length: up to 1000; only valid and secure URL starting with https:/)
    - `viberVideo` object
      - `videoURL` string, required — The URL where the video is hosted (1000 max chars, only https).
      - `fileSize` integer, required — The file size in MB (positive number, 200 max).
      - `videoThumbnail` string, required — The URL of a thumbnail for the video (1000 max chars, only https).
      - `duration` integer, required — The video’s duration in seconds (positive number, 600 max).
    - `fallbackValues` object — Defines the default values in case a contact does not contain any of the selected personalized labels. It is an object with key-values pairs. The key refers to the label name.
    - `carousel` object — Carousel Object can contain array of carousel items
      - `items` object[] — array of carousel item objects
        - `title` string — Short title of the card
        - `imageUrl` string — Fully qualified HTTPS image URL
        - `primaryButton` object — Carousel Primary Button
          - `label` string — carousel primary button label
          - `actionUrl` string — carousel primary button action url
        - `secondaryButton` object — Optional
          - `label` string — secondary button label
          - `actionUrl` string — secondary button action url
  - `ttl` integer — Time range until message expires. TTL range in seconds: 30 - 86400 seconds. If it is not set, the default range is 14 days. TTL range in seconds for web clients: 300 - 86400 seconds.
  - `callbackUrl` string — Defines the callback URL that will receive all the individual messages' progress of the Viber campaign. Check [here](/docs/viber-callback) for details.
  - `inboundUrl` string — Defines the callback URL that will receive the inbound messages. Check [here](/docs/viber-inbound-messages) for details.
  - `label` string — A generic label which can be used for tagging the Viber message. Maximum length is 350 characters.

## Response `200`

200

- object
  - `trackingId` string
  - `type` string
  - `state` string
  - `createdAt` string
  - `respectQuietHours` boolean
  - `scheduledDate` string
  - `senderInfoTrackingId` string
  - `senderInfoName` string
  - `to` string[]
  - `groups` string[]
  - `campaignName` string
  - `body` object
    - `text` string
    - `imageURL` string
    - `action` object
      - `caption` string
      - `targetUrl` string
  - `ttl` integer
  - `cost` integer
  - `totalMessages` integer
  - `viberAnalysis` object
    - `numberOfRecipients` integer
    - `recipientsPerCountry` object
      - `XX` integer
    - `recipientCountries` object
      - `+37xxxxxxxxxx` string
    - `contacts` object
    - `recipientsPerGroup` object
      - `Group name` integer
    - `totalInGroups` integer
    - `bodyAnalysis` object
      - `characters` integer
  - `inboundUrl` string
  - `callbackUrl` string
  - `isSessionMessage` boolean
  - `label` string

## Other responses

- `400` — 400

---

[API](https://skmtc.net/routee/apis/auth.md) · [All operations](https://skmtc.net/routee/apis/auth/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/routee/auth/versions/5cef04e8f7d8/schema)
