Send a 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 sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters. Required
The body of the SMS message. Required
The telephone number. Required
A client reference. Required
The array of recipients msisdn’s & reference’s. Required Set only for multiple message request (“destination”: “phones”).
OPTIONAL PARAMETERS
The amount of seconds that the message is valid.
Tariff code of a price grid.
DEFINITION
PUT (POST) https://app.bsg.hk/rest/sms/create
RETURNS
Returns a message object if the request was successful. If the request failed, an error object will be returned.
EXAMPLE REQUEST (SINGLE MESSAGE)
{ “destination”:”phone”,
“originator”:”alpha name”,
“body”:”message text”,
“msisdn”:”380972000000″,
“reference”:”ext_id_16″,
“validity”:”1″,
“tariff”:”0″
}
EXAMPLE RESPONSE (SINGLE MESSAGE)
{ “result”:{
“error”:0,
“errorDescription”:”No errors”,
“reference”:”ext_id_16″,
“id”:”213″,
“price”:0.23,
“currency”:”EUR”
}
}
EXAMPLE REQUEST (MULTIPLE MESSAGES)
{ “validity”:”1″,
“tariff”:”0″,
“destination”:”phones”,
“originator”:”alpha_name”,
“body”:”message text”,
“phones”:[
{
“msisdn”:”380972000000″,
“reference”:”ext_id_17″
},
{
“msisdn”:”380972000001″,
“reference”:”ext_id_18″
}
]
}
ATTRIBUTES
An unique random ID which is created for multiple request.
EXAMPLE RESPONSE (MULTIPLE MESSAGES)
{ “task_id”:”6″,
“result”:[
{
“error”:0,
“errorDescription”:”No errors”,
“reference”:”ext_id_17″,
“id”:”214″,
“price”:0.23,
“currency”:”EUR”
},
{
“error”:0,
“errorDescription”:”No errors”,
“reference”:”ext_id_18″,
“id”:”215″,
“price”:0.23,
“currency”:”EUR”
}
],
“total_price”:0.46,
“currency”:”EUR”
}