BSG utilizes HTTP cookies (and similar or complementary technologies) to 1) make this website safe, functional, and accessible (through the use of mandatory cookies) and 2) understand how you use our website (through the use of optional cookies) in order to improve your experience and to provide you with personalized content.

The information in the cookie text files may be related to your personal preferences or your device and is intended to make the site operate according to your expectations. The information contained in cookies does not usually identify your identity directly but is helpful in providing you with a more personalized user experience.

In accordance with the requirements of the General Data Protection Regulation (GDPR) privacy and security law that governs how the personal data of individuals in the EU may be processed and transferred, we provide you the possibility to prohibit the use of certain types of cookies when you use our website.

Read our Cookie Notice and the Privacy Policy for detailed information on how BGS collects and uses cookies. Please note that prohibiting the use of certain types of cookies may affect your interaction with the website and limit the accessibility of services we offer you. Choose the appropriate category below to learn more and to disable cookies.

Accept All cookies*
*Recommended for comfortable use of the site
Accept only necessary cookies
Accept only selected cookies
Necessary cookies
Social media
Analytics
Marketing
Developer Docs
Number Intelligence

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:

GET https://api.bsg.world/rest/sms/{id}

Request parameters:

Parameter Requirerd Type Description
id Yes integer Message ID – a unique random identifier generated on the BSG platform and returned when the object is created

or use alternative request:

GET https://api.bsg.world/rest/sms/reference/{reference}
Parameter Required Type Description
reference Yes integer SMS external ID. String up to 32 characters containing /a-zA-Z0-9/

Response parameters:

Parameter Type Description
id integer SMS ID
msisdn integer phone number to which the SMS was sent
reference string SMS external ID
time_in datetime date and time the SMS was created
time_sent datetime SMS sending scheduled date and time
time_dr datetime Date and time the delivery report was received
status string SMS status
price float SMS price
currency string Account currency in which the SMS price is specified

If request is successful, you will receive a response:


{
   "error":0,
   "errorDescription":"No errors",
   "id":"211″,
   "msisdn":"380972000001″,
   "reference":"ext_id_19″,
   "time_in":"2017-01-17 09:11:41″,
   "time_sent":"2017-01-17 09:11:41″,
   "time_dr":"2017-01-17 09:11:41″,
   "status":"delivered",
   "price":0.23,
   "currency":"EUR"
}

Request SMS status URL by task ID

GET https://api.bsg.world/rest/sms/{task_id}

Request parameters:

Parameter Required Type Description
task_id Yes integer A unique random identifier that is created for bulk campaign.

Response parameters:

Parameter Type Description
originator string Sender name
body string SMS message text
validity string SMS message validity period
totalprice float SMS campaign price
currency string currency of the user’s account, in which the cost of sending an SMS campaign is specified.
sent integer number of messages sent within the SMS campaign.
delivered integer number of delivered messages within the SMS campaign.
expired integer number of undelivered messages (the recipient’s phone is turned off) within the SMS campaign.
undeliverable integer number of undelivered messages (incorrect recipient phone number) within the SMS campaign.
unknown integer number of messages within the SMS campaign with an unknown status ― no delivery report.

If request is successful, you will receive a response:


{
   "originator":"alpha_name",
   "body":"message text",
   "validity":72,
   "totalprice":0.23,
   "currency":"EUR",
   "sent":1,
   "delivered":1,
   "expired":0,
   "undeliverable":0,
   "unknown":0
}

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:


{
   "error":"25",
   "errorDescription":"Invalid originator"
}

Interested in a special offer?

Ready to reach further?
Let’s talk

I agree to BSG privacy policy
Submit

Useful Materials

What Is Number Verifier — And Why It’s More Than Just an “HLR Lookup”

30% of SMS fail — not because of content, but numbers. Verify before you send.

10 Awesome Back-to-School Marketing Ideas 2025

The start of the school year: when parents trade in their summer margaritas for the

What Is CPaaS? Communications Platform as a Service

Talking to customers these days is more than just emails or phone calls. Businesses need