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

Your endpoint must respond with HTTP 200 OK within 2 seconds. Otherwise Routee closes the connection and retries (up to 12 attempts over 24 hours).

AttemptDelay after previous try
1st30 sec
2nd1 min
3rd2 min
4th5 min
5th10 min
6th15 min
7th30 min
8th1 hour
9th2 hours
10th4 hours
11th8 hours
12th24 hours

Design your handler to be idempotent — the same event may be delivered more than once.

Secure your endpoint — Serve callbacks over HTTPS and include a hard-to-guess secret in the callback URL path or query string. Validate it on every request.
👍

Related

Viber Messaging Statuses