Skip to Content

Outbound Messages

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Send message request

POST
https://services.viber.com/vibersrvc/1/send_message

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Send message request

{ "service_id": 3001, "dest": "972511887887", "tag": "SaleCamp 12", "seq": 123456, "label": "promotion", "ttl": 60, "type": 206, "message": { "#txt": "a message for our viber user.", "#tracking_data": "tracking_id:100035" } }

General message request

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

ParameterDescriptionValidation

Service ID

(Mandatory)

String

The ID is a unique value in each sent request that each business account receives when it’s created. Each ID is given only to the partner the account belongs to and this account can be utilized only with its dedicated sender ID.

ID must correspond to the appropriate BM service

TTL

( Optional )

Read more

Integer 60…1209600

The TTL value ( in seconds) specifies how long the API should try to deliver the message for. If no TTL value is set, the API will try to deliver the message for up to 14 days.

 
Message parameters

#txt

(Mandatory)

String 1…1000 UTF-8

The text sent to the user.

 

TTL

Each business message can be sent with a predefined Time to Live (TTL) value. This value will determine the maximum amount of time delivery attempts will be made for. The TTL value is set per message and usually depends on the content of the message. For example, it’s better to send more sensitive content (such as bank transaction details) with a shorter TTL.

The TTL can be set between 30 seconds (minimum) and 1,209,600 seconds (maximum). 

Transactional message types best practices:

  • A low TTL should be used for transactional message types only.
  • Don’t use a low TTL if you need to send a large number of messages at the same time. This will help prevent cases where users will receive the messages, however, the delivery status will not be sent back in time, making the message appear as expired. 
  • Set your TTL for a minimum of 60 seconds.

Playground

Loading...
Last updated at