Developer Docs

Table of contents

Get SMS Campaign Report

The method allows you to get detailed information about the campaign with the statistics of messages sent.

Request URL

GET      http://one-api.bsg.world/api/campaigns/{id}/detail

Request parameters:

ParameterRequiredTypeDefaultDescription
idYesintegernoCampaign ID created using:
  • POST /api/campaigns/sms/send

  • POST /api/campaigns/sms/send-groups

  • POST /api/campaigns/sms/send-individual

Response parameters

ParameterTypeDescription
idintegerID of the task created for a bulk campaign
namestringCampaign name
senderstringSMS Sender name
statusstringCampaign current status. Possible values:
  • creation – created

  • spam – campaign did not pass moderation

  • scheduled – campaign is scheduled

  • sending – campaign began to be sent

  • paused – campaign is paused

  • stopped – campaign is stopped

  • done – campaign is completed
typestringcampaign type – sms
start_datestringDate and time of the campaign start (scheduled). Format ISO 8601: yyyy-mm-dd hh:mm:ss
actual_start_atstringActual date and time the campaign started. Format ISO 8601: yyyy-mm-dd hh:mm:ss
finished_atstringDate and time the campaign is completed. Format ISO 8601: yyyy-mm-dd hh:mm:ss
created_atstringDate and time the campaign is created. Format ISO 8601: yyyy-mm-dd hh:mm:ss
statisticsobjectCampaign statistics containing:
deliveredintegerNumber of messages received by the recipient
scheduledintegerNumber of messages scheduled for the campaign
moderationintegerNumber of messages in moderation
acceptedintegerNumber of messages accepted by the operator
sendingintegerNumber of messages in the queue for sending
sentintegerNumber of messages that have been sent and are expecting to be delivered
expiredintegerNumber of undelivered messages (phone switched off)
failedintegerNumber of messages with a send error (probably a missing prefix)
undeliveredintegerNumber of undelivered messages
unknownintegerNumber of messages for which there is no delivery report
total_messagesintegerTotal number of messages created within the campaign
total_phonesintegerNumber of contacts in the campaign
total_pricestringTotal campaign price
currencystringThe currency in which the campaign cost is specified. ISO 4217 format

Response sample

If the request is successful, you will receive a response:

{
 "data": {
   “id”: “12345”,
   “name”: “string”
   “sender”: “testsms”,
   “status”: “done”,
   “type”: “instant”,
   “start_at”: “2022-01-01 00:01:02”,
   “actual_start_at”: “2022-01-01 00:01:03”,
   “creation_at”: “2022-01-01 00:00:01”,
   “finished_at”: “2022-01-01 00:10:03”,
   “statistics”: [
{ 
  “delivered”: 0,
  “scheduled”: 0,
  “moderation”: 0,
  “accepted”: 0,
  “sending”: 20,
  “sent”: 100,
  “expired”: 0,
  “failed”: 0,
  “undelivered”: 0,
  “unknown”: 0
}
]
   “total_messages”: 120,
   “total_phones”: 120,
   “total_price”: “35,0987645”,
   “currency”: “USD”
}
}

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.