Developer Docs

Table of contents

Get SMS status

Method allows getting information about the status of campaigns that were sent via the API. It is implemented both for a single SMS, in which the status of one message is displayed, and for a bulk campaign (referring to the message ID or the campaign ID, or the referrer ID).

To get SMS status, make a request to this URL:


Request parameters:

id YesintegerMessage ID – a unique random identifier generated on the BSG platform and returned when the object is created

or use alternative request:

referenceYesintegerSMS external ID. String up to 32 characters containing /a-zA-Z0-9/

Response parameters:

id integerSMS ID
msisdnintegerphone number to which the SMS was sent
referencestringSMS external ID
time_indatetimedate and time the SMS was created
time_sentdatetimeSMS sending scheduled date and time
time_drdatetimeDate and time the delivery report was received
statusstringSMS status
pricefloatSMS price
currencystringAccount currency in which the SMS price is specified

If request is successful, you will receive a response:

   "errorDescription":"No errors",
   "time_in":"2017-01-17 09:11:41″,
   "time_sent":"2017-01-17 09:11:41″,
   "time_dr":"2017-01-17 09:11:41″,

Request SMS status URL by task ID


Request parameters:

task_idYesintegerA unique random identifier that is created for bulk campaign.

Response parameters:

originatorstringSender name
bodystringSMS message text
validitystringSMS message validity period
totalpricefloatSMS campaign price
currencystringcurrency of the user’s account, in which the cost of sending an SMS campaign is specified.
sentintegernumber of messages sent within the SMS campaign.
deliveredintegernumber of delivered messages within the SMS campaign.
expiredintegernumber of undelivered messages (the recipient’s phone is turned off) within the SMS campaign.
undeliverableintegernumber of undelivered messages (incorrect recipient phone number) within the SMS campaign.
unknownintegernumber of messages within the SMS campaign with an unknown status ― no delivery report.

If request is successful, you will receive a response:

   "body":"message text",

Errors relevant for all types of SMS messaging

20 – SMS not found
21 – an incorrect phone number
22 – the external ID of the SMS request is missing
23 – SMS with this ID is already present
24 – invalid query payload
25 – incorrect originator
26 – empty or too long SMS text
27 – incorrect external SMS ID
28 – incorrect value of SMS duration
29 – the task id is incorrect
30 – task not found
31 – the phone is already in the messaging list
32 – sender not allowed
33 – unresolved direction
34 – invalid OTP, code generation error
35 – 2WAY service is not activated
36 – incorrect sender for 2WAY

Error response sample:

   "errorDescription":"Invalid originator"

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.