Send a VIBER message
Creates a new message object. BSG returns the created message object with each request. Per request, a max of 50 phones can be entered.
REQUIRED PARAMETERS
The array of VIBER message objects.
The array of recipients msisdn's & reference's.
The telephone number.
The body of the VIBER message.
The sender of the message.
OPTIONAL PARAMETERS
The amount of seconds that the message is valid.
Tariff code of a price grid.
A client reference.
An hash with VIBER options.
DEFINITION
PUT (POST) https://app.bsg.hk/rest/viber/create
RETURNS
Returns a message object if the request was successful. If the request failed, an error object will be returned.
EXAMPLE REQUEST
{ “tariff”:”0″,
“validity”:”1″,
“messages”:[
{
“to”:[
{
“msisdn”:”380972920000″,
“reference”:”ext_id_19″
}
],
“text”:”My Viber messages is shinier than your SMS messages”,
“alpha_name”:”BSG”,
“is_promotional”:false,
“options”:{
“viber”:{
“img”:”http://mysite.com/logo.png”,
“caption”:”See Details”,
“action”:”http://mysite.com/”
}
}
}
]
}
EXAMPLE RESPONSE
{ “result”:[
{
“error”:0,
“errorDescription”:”No errors”,
“reference”:”ext_id_19″,
“id”:”217″,
“price”:0.23,
“currency”:”EUR”
}
],
“currency”:”EUR”,
“total_price”:0.23
}
IN ERROR CASE
{ “result”:[
{
“error”:43,
“errorDescription”:”External ID already exists”,
“reference”:”ext_id_19″
}
]
}