post https://connect.routee.net/viber/campaign
Send viber messages to multiple recipients. This is a paid service.
Account activated feature
Please note, the service is available for use after filling in Viber Application Form
RESPONSE PARAMETERS
KEY | DESCRIPTION |
---|---|
trackingId | The tracking id of the viber campaign. |
type | The service type of the campaign. |
state | The state of the campaign. |
createdAt | The time the campaign was created |
senderInfoTrackingId | The unique sender id. |
to | The recipients' numbers. |
campaignName | The name of the campaign. This value must be unique for your account. This is useful if you plan to sent the Viber message to multiple destination numbers or to a group of contacts. |
scheduledDate | The time the campaign is scheduled to run. |
body | Represents the viber message. |
body.text | The text of viber message. |
body.imageURL | 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:/) |
body.action | Represents the action(button) of the viber message. |
body.action.caption | The displayed text on the button. |
body.viberFile | Represents the file of the viber message. |
body.viberFile.fileName | File name of the viber message. |
body.viberFile.fileType | File type of the viber message. |
body.viberFile.fileUrl | The Url of the of the viber message file. (recommended file size: 600KB for optimal delivery) |
body.viberVideo.videoUrl | The URL where the video is hosted (1000 max chars, only https). To ensure that all videos will be validated and become downloadable, each video’s server host must allow Viber’s client to verify the file header to make sure the file meets Viber’s technical requirements. A video that will not allow headers investigation might not allow users that receive it to download the file or play the content. The video file must be hosted on a server that allows HEAD methods and includes the file “Content-Length“ in the server reply. |
body.viberVideo.videoThumbnail | The URL of a thumbnail for the Video(1000 max chars, only https). |
body.viberVideo.fileSize | The file size in MB(positive number, 200 max). |
body.viberVideo.duration | The video’s duration in seconds(positive number, 600 max). |
body.fallbackValues | 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. |
ttl | 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. |
cost | The cost of the campaign. |
totalMessages | The total messages of viber campaign. |
viberAnalysis | Contains information for viber campaign after being analyzed. |
viberAnalysis.numberOfRecipients | The total number of recipients. |
viberAnalysis.recipientsPerCountry | The total recipients per country (country format in ISO 3166-1 alpha-2). |
viberAnalysis.recipientCountries | For each recipient the country that the mobile belongs to (country format in ISO 3166-1 alpha-2). |
viberAnalysis.recipientsPerGroup | For each group the number of recipients that it contains, without the blacklisted contacts. |
viberAnalysis.totalInGroups | The total number of recipients in all given groups excluding the ones already specified and the blacklisted. |
viberAnalysis.bodyAnalysis | The body analysis of the viber message. |
viberAnalysis.bodyAnalysis.characters | The total number of characters of the message's body. |
callbackUrl | The defined callback URL that will receive all the individual messages' progress of the Viber campaign. Check here for details. |
inboundUrl | The defined callback URL that will receive the inbound messages. Check here for details. |
label | A generic label which can be used for tagging the Viber message. Maximum length is 350 characters. |
isSessionMessage | Indicates 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. Default value false. Supported session types are: Text-Only, Image and File. Learn more about session messaging at our documention. |
ERROR CODES
STATUS | CODE | DESCRIPTION |
---|---|---|
400 | 400001009 | You don't have enough balance to send the campaign. |
400 | 400019002 | (errorCode: 001) The recipient numbers are not in the correct format (mobile numbers) or your array of numbers contains at least one wrong number. |
400 | 400000000 | The provided image URL should be valid. |
400 | 400000000 | The image URL length must be up to 1000 characters. |
400 | 400000000 | The provided image URL should be secure, starting with https:/ |
400 | 400019002 | (errorCode: 007) Your campaign has wrong message type combination. The supported types are: Text, Image, File, Text + Action, Text + Action + Image. |
400 | 400000000 | The value of ttl must be less than or equal to 86400. |
404 | 404002001 | A contact id does not exist. |
404 | 404020001 | The sender ID is not correct. |
409 | 409009003 | Your account already has a campaign with the given name. |
400 | 400019002 | (errorCode: 019) Invalid file type (e.g. HTML) Supported types are: doc, docx, rtf, dot, dotx, odt, odf, fodt, txt, info" + "pdf, xps, pdax, eps, xls, xlsx, ods, fods, csv, xlsm, xltx |
400 | 400019002 | (errorCode: 016) File larger than 600 KB |
400 | 400019002 | (errorCode: 020) Provided ViberCampaign is a session one, but its type is invalid. Supported session types are: Text-Only, Image and File. |
400 | 400000000 | SRVC_BAD_THUMBNAIL In case the thumbnail URL is complied of more than 1000. |
400 | 400000000 | The size of the video file is bigger than 200MB. |
400 | 400000000 | The video duration is bigger than 600 seconds. |
400 | 400019002 | Campaign has wrong message type combination. The supported types are: Video, Video+Text, Video+Text+Image. |
400 | 400019002 | Viber Video message is not supported by Viber Session message. |