Developer Docs

Table of contents

The upload data is stored on the server for one month from the date the request was created. One client can only have 5 requested uploads on the server. To make the sixth, the previous one must be deleted by a separate method. In a request to generate unload, a string with null equals an unspecified parameter and vice versa.

Statistics upload request

Detailed message statistics

The upload data is stored on the server for one month from the date the request was created. One client can only have 5 requested uploads on the server. To make the sixth, the previous one must be deleted by a separate method. In a request to generate an upload, a string with null equals an unspecified parameter and vice versa.

Query URL

POST https://api.bsg.world/rest/stat/create

Query body

One of the following mandatory parameters is passed:

  • message_id – set to “message_id”. If this value is set, all subsequent fields are ignored, even if data is specified there. Array. 300 values in an array maximum. If an empty array is specified, or if there is a parameter, but the key is not an array, then the parameter is ignored.

OR a timespan:

  • time_in_from – date and time when messages were received on the platform. 
  • time_in_to – date and time when messages were received on the platform.

Optional parameters are passed

ParameterTypeDescription
msisdnAn array of values to specify numbers. If an empty array is specified, or if there is a parameter, but the key is not an array, then the parameter is ignored.
originatorstringSender name.
source_typestringThe message source from where the message came to the platform. Can take one of the following values: api, web, smpp, xml, http, json.
message_typestringMessage type. Can take one of the following values: sms, hlr, viber.
time_sent_fromTime of sending messages from the platform “from”.
time_sent_toTime of sending messages from the platform “to”.
country_namestringThe name of the country for search.
operator_idIndication of the country operator, if the Country_name field is present. If an operator without a country is specified, it is ignored.
statusstringThe status of the messages to display. Can take one of the following values: Delivered, Rejected, Scheduled, Moderation, Accepted, Sending, Sent, Expired, Failed, Undelivered, Unknown, Read, not-viber-user.
sl_clicksIt is necessary to consider the number of clicks or not. The field is available only to the clients who have enabled Short URL service.
sl_clicks_compComparison operator with the clicks count value. Can take one of the following values: “<”, “>”, “=”. The field is available only to the clients who have enabled Short URL service.
sl_clicks_countThe value to compare. Upper character limit – 999999. The field is available only to the clients who have enabled Short URL service.

Sample response

Response in case of a successful query:

{
"error":0,
"key": {}
}

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.