Callback (Webhook)

Viber Messaging status notifications

Callbacks are notifications that you 've asked Routee to send back to you when the status of your Viber campaign's messages change.

Viber Messaging Callbacks##

Your callback service will receive a POST HTTP request with the following request body for an individual message progress of the Viber campaign:

{
  "trackingId": "string",
  "campaignTrackingId": "string",
  "to": "string",
  "from": "string",
  "groups": ["string"],
  "country": "string",
  "status": {
    "name": "string",
    "reason": {
      "detailedStatus": "string",
      "description": "string"
    },
    "updatedDate": "string"
  },
  "body": {
      "text": "string",
      "imageURL": "string",
      "viberAction": {
           "caption": "string",
           "targetUrl": "string"
       }
  },
  "ttl": integer,
  "label":"label of campaign",
  "inboundUrl": "string",
  "applicationName": "string",
  "price": double,
  "direction": "string",
  "originatingService": "Viber",
  "createdAt": "string"
}
KEYDESCRIPTION
trackingIdThe tracking Id of the Viber message.
campaignTrackingIdThe tracking Id of the Viber campaign.
toThe recipient of the Viber message.
fromThe senderId of the Viber message.
groupsAll contact groups (tags) that this contact belongs to.
status.nameThe status name of the Viber message.
status.reasonThe reason of the status.
status.reason.detailedStatusThe detailed status.
status.reason.descriptionThe description of the detailed status.
status.updatedDateThe date of the last status change of the Viber message.
body.textThe text of Viber message.
body.iosFallbackTextAlternative message that will be sent after TTL range expiration.
body.imageURLThe url of the image.
body.viberAction.captionThe displayed text on the button.
body.viberAction.targetUrlThe target URL of the Viber action.
body.viberFileRepresents the file of the viber message.
body.viberFile.fileNameFile name of the viber message.
body.viberFile.fileTypeFile type of the viber message.
body.viberFile.fileUrlThe Url of the of the viber message file. (recommended file size: 600KB for optimal delivery)
ttlTime 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.
labelA generic label using for tagging the viber campaign.
inboundUrlThe defined callback URL that will receive the inbound messages. Check here for details.
applicationNameThe name of the application that was used to send this Viber message.
priceThe cost of the Viber message.
directionThe direction of the Viber message.
originatingServiceThe service that sent this Viber message.

👍

Callback retry policy

When Routee POSTs back to your service, an HTTP 200 OK response must be returned within 2 seconds. If Routee doesn't receive a 200 OK response within 2 seconds will drop the connection and will try to POST again (up 12 retries for 24 hours max) with the following retry policy after the initial callback attempt:

1st retry: 30 sec
2nd retry: 1 minute
3rd retry: 2 minutes
4th retry: 5 minutes
5th retry: 10 minutes
6th retry: 15 minutes
7th retry: 30 minutes
8th retry: 1 hour
9th retry: 2 hours
10th retry: 4 hours
11th retry: 8 hours
12th retry: 24 hours

🚧

Whitelist IP for callback service

Whitelist all the IPs that resolve to the following domain:
callbacksallow.routee.net
in order to be able to receive callback requests from Routee