For the best experience turn off the battery saving mode.

Welcome to the
BSG Developer Docs.

Whether you're looking to use our REST APIs, receive
notifications with webhooks, or build an app for the
Intercom Messenger, you've come to the right place.

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

Parameter
Type
Description
destination
type: string

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

body
type: string

The body of the SMS message. Required

msisdn
type: string

The telephone number. Required

reference
type: string

A client reference. Required

phones
type: array

The array of recipients msisdn’s & reference’s. Required Set only for multiple message request („destination“: „phones“).

OPTIONAL PARAMETERS

Parameter
Type
Description
validity
type: int

The amount of seconds that the message is valid.

tariff
type: int

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

Attribute
Type
Description
task_id
type: int

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“
}

Rate this post