VertexSMS LLM-readable site index
We use cookies to improve your experience on this site and serve more relevant content to you. By continuing to browse our site you agree to our use of cookies, revised Privacy Policy and Terms of Service.  More information about cookies
api documentation

Build it your way.
We'll wire it up.

Clean documentation, simple authentication, real-time callbacks.

Sending Viber message

POSThttps://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.

Required parameters

FieldTypeDescription
tostringDestination address (recipient)
fromstringSource address (originator), The from approved in advance by VertexSMS. You can register new from via the senderID API.
messagestringMessage body. Max. text length is - 1000 charters.

Optional parameters

FieldTypeDescription
dlrUrlurlWhere to transfer delivery report of each submitted message. Delivery report will contain the same message ID, which is returned after submitting the message for sending.
prioritystringChange priority of sms. Possible values:
  • 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
scheduledstringMSchedule message sending in specified time. Date and time must be set in ISO 8601 ex.: 2015-01-01T13:00:00+02:00
testModestringUse this to test API without sending real message to handset. Possible values:
  • 1 - Use this value to emulate success delivery
  • 2 - Use this value to emulate failed delivery
correctBystringFix recipient number by a given country. Example: fix the 6xxxxxxx to 3706xxxxxxx if LT country iso passed.
Possible value: country code in ISO 3166-1 alpha-2 format

Request example:

REQUEST EXAMPLEPOST
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:

RESPONSE · 200 OK
HTTP/1.1 200 OK Content-Type: application/json Cache-control: no-cache X-VertexSMS-Amount-Sent: 1 ["1281532560"]

Button

To send the message with the button requires providing additional parameters as part of the interactive message (im) settings option

IM ACTION STRUCTURE
"im" : { "action" : { "url" : "https://example.com", "title" : "go to example.com" } }

Button parameters

FieldTypeDescription
urlurlThe value should be a valid URL address
titlestringTitle of the button

Request example:

REQUEST EXAMPLEPOST
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" } } }

Image

To send the message with the media requires providing additional parameters as part of the interactive message (im) settings option

IM IMAGE STRUCTURE
"im" : { "image" : { "url" : "https://example-cdn.com/image.png" } }

The image option could be combined with the button settings

COMBINED IMAGE + BUTTON
"im" : { "action" : { "url" : "https://example.com", "title" : "go to example.com" }, "image" : { "url" : "https://example-cdn.com/image.png" } }

Image parameters

FieldTypeDescription
urlurlURL of the image (JPEG, PNG, non-animated GIF). The URL must have a resource with a .jpeg, .png or .gif file extension as the last path segment. Max image size: 1MB

Request example:

REQUEST EXAMPLEPOST
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" } } }