Sending Viber message
POST https://api.vertexsms.com/viber
Submits viber message(s) for sending. If successful - returns HTTP status code 200 OK and an array of IDs of messages added to the sending queue.
• high - use this for registration forms, password reminders and other important sms.
• normal - default priority for sms’es
• low - use this priority for mass messages
• 1 - Use this value to emulate success delivery
• 2 - Use this value to emulate failed delivery
Possible value: country code in ISO 3166-1 alpha-2 format
Request example:
POST /viber HTTP/1.1
Host: api.vertexsms.com
Content-Type: application/json
Accept: application/json
X-VertexSMS-Token: eB52vNTPL9fO3rDrx8pYmVnj6nqceHNhnqceHNh
{ “to”: “37069912345”, “from”: “Test”, “message”: “Test Viber message” }
Response example:
HTTP/1.1 200 OK
Content-Type: application/json
Cache-control: no-cache
X-VertexSMS-Amount-Sent: 1
[”1281532560”]
To send the message with the button requires providing additional parameters as part of the interactive message (im) settings option
"im" : { "action" : { "url" : "https://example.com", "title" : "go to example.com" } }
Request example:
POST /viber HTTP/1.1
Host: api.vertexsms.com
Content-Type: application/json
Accept: application/json
X-VertexSMS-Token: eB52vNTPL9fO3rDrx8pYmVnj6nqceHNhnqceHNh
{ "to" : "+370...", "from" : "Test", "message" : "Hello World!", "im" : { "action": { "url" : "https://example.com", "title" : "go to example.com" } } }
To send the message with the media requires providing additional parameters as part of the interactive message (im) settings option
"im" : { "image" : { "url" : "https://example-cdn.com/image.png" } }
The image option could be combined with the button settings
"im" : { "action" : { "url" : "https://example.com", "title" : "go to example.com" }, "image" : { "url" : "https://example-cdn.com/image.png" } }
Request example:
POST /viber HTTP/1.1
Host: api.vertexsms.com
Content-Type: application/json
Accept: application/json
X-VertexSMS-Token: eB52vNTPL9fO3rDrx8pYmVnj6nqceHNhnqceHNh
{ "to" : "+370...", "from" : "Test", "message" : "Hello World!", "im" : { "image" : { "url" : "https://example-cdn.com/image.png" }, "action": { "url" : "https://example.com", "title" : "go to example.com" } } }