Developer Docs

Table of contents

Get contacts from the Stoplist

The method allows getting a list of contacts that were added to the SMS and/or Viber stop list.

Request URL:

GET http://one-api.bsg.world/api/stoplist

Request parameters:

ParameterRequiredTypeDescription 
pageNointegerPaginator page, minimum ― 1. Default ― 1
per_pageNointegerThe number of entries in the response. Minimum ― 10, maximum ― 1000. Default ― 20
typesNostringSpecify the type of the stop list for which we need to return the contact list. Possible values: sms, viber.If the stop list type is not specified, the method will return data for both stop list types

Response parameters:

ParameterTypeDescription 
idintegerID of the contact added to the stop list
phonestringContact’s phone number
created_atdatetimeDate of adding the contact to the stop list
sms_stoplistbooleanWhether the contact was added to the SMS stop list. Possible values: true or false
viber_stoplistbooleanWhether the contact was added to the Viber stop list. Possible values: true or false
totalstringThe total number of contacts in the stop list

Response sample

If request is successful, you will receive a response:

{
  "data": [
    {
      "id": 9392897,
      "phone": 85267202829,
      "created_at": "2022-04-18 19:22:16",
      "sms_stoplist": true,
      "viber_stoplist": false
    }
  ],
  "total": 1
}

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.