Developer Docs

Table of contents

The BSG API allows you to create single and bulk SMS campaigns via the REST API. Each message and campaign is identified by a unique identifier for checking the message or campaign status using the appropriate method or callback.

Get incoming 2Way SMS

The method allows to get information about incoming messages of the 2Way SMS service:

  • for the period irrespective of the sender;
  • for the period by the sender.

Request URL

GET https://api.bsg.world/rest/sms/2wayIncoming

Request parameters:

ParameterRequiredTypeDescription
start_dateYesdatetimePeriod start date (date of reply to incoming SMS). Format: dd.mm.yyyy hh:mm:ss
end_dateYesdatetimePeriod end date (date of reply to incoming SMS). Format: dd.mm.yyyy hh:mm:ss
senderNostringSender name

Response parameters:

ParameterTypeDescription
senderstringThe name of the sender who sent the outgoing SMS
phonestringPhone number of the contact from the Contact Book who replied the outgoing SMS
textstringIncoming SMS text
datestringDate and time of the reply to the incoming SMS
total_countintegerTotal number of incoming messages for a given period

Example of a response in case of a successful request:

{"error":0, "errorDescription":"No errors",
"result": [
{
"sender":"447766379483",
"phone":"447520651640",
"text":"Yessss",
"date":"2022-06-23 14:19:11"
},
{
"sender":"447766379483",
"phone":"447520651791",
"text":"Hi",
"date":"2022-08-05 11:14:32"
},
{
"sender":"447766379483",
"phone":"447520651791",
"text":"Knock-knock",
"date":"2022-08-05 14:24:56"
}
],
"total_count":"3"
}

We use cookies (and other similar technologies) to collect data to improve your experience on our site. By using our website, you’re agreeing to the collection of data as described in our Website Data Collection Policy.