HTTP API v1.0 Documentation

With MS Group API 1.0 it is possible to integrate SMS information into your site or CRM system. Automatically notify your users of a balance change, order delivery or other significant event. All requests are available via HTTP GET method.

Send message

Send SMS messagessendsms.php
ParameterFormatUseDescription
usernamestringRequiredNickname
passwordstringRequiredPassword
client_idintegerRequiredUser unique identifier
service_idintegerRequiredSender ID
tostringRequiredPhone number in international format
textstringRequiredMessage body, (7bit encoding 160 characters, unicode 70 charaters)
utfintegerOptionalSending with Unicode (Georgian) characters
resultstringOptional json - response returned in JSON format xml - response returned in XML format Default is simple text format as "CODE-MESSAGE_ID"
Attention! If you send Georgian (unicode) text and do not specify the utf parameter, the user will receive "?" in message text instead of Georgian characters.

Example of sending a message:

curl http://bi.msg.ge/sendsms.php?to=995599XXXXXX&text=your+text&service_id=1&client_id=1&password=your+password&username=your+nickname&utf=1

The status code and message identifier are returned in response:

    0000-000001

Meaning of Response Codes:

CodeDescription
0000Message sent request accepted. Second parameter is message unique identifier in the system.
This status does not mean that the message has been delivered to the subscriber.
0001Invalid password or nickname or restricted IP address
0003Required fields are empty (username, password, client_id, service_id)
0005Blank message body
0007Invalid phone number
0008Insufficient balance
0009Invalid sender ID
0010The message contains banned word

Sending messages from Shared hosting and CLOUD servers

If your service is located on servers that have multiple IP addresses, you should notify your manager about it and the latter will provide you with an alternate password that you can provide in the header in the MSG_HEADER as setting

Example of request formatting on PHP
$opts = array(
  'http'=>array(
    'method'=>"GET",
    'header'=>"MSG_HEADER: your alternate password"
    ...
  )
);

$context = stream_context_create($opts);

$file = file_get_contents('http://bi.msg.ge/sendsms.php?
		to=995599000000&
		text=your+text&
		service_id=1&
		client_id=1&
		password=your+password&
		username=your+nickname', 
		false, $context);
// Replace settings with your real data provided by our service manager

Check message delivery status

Check SMS message delivery statustrack.php
ParameterFormatUseDescription
message_idintegerRequiredUnique identifier of sended message
usernamestringRequiredNickname
passwordstringRequiredPassword
client_idintegerRequiredUser unique identifier

Example of verifying notification status with GET method:

curl http://bi.msg.ge/track.php?message_id=1&client_id=1&password=your+password&username=your+nickname

The status code is returned in response:

    1

Meaning of error codes:

CodeDescription
0Pending
1Was sent to a subscriber
2Failed to sent to a subscriber
4Status pending
8Submitted to the SMS Center
16Rejected by SMS Center
64Incorrect password or nickname or restricted IP address