Developer Docs

Table of contents

Add a contact to the Stoplist

Performs adding one or more contacts to the SMS or Viber stop list. When sending SMS or Viber, messages will not be sent to numbers added to the stop list.

To add contact to the stoplist, make a request to this URL:

POST http://one-api.bsg.world/api/stoplist/attach

Request parameters:

ParameterRequiredTypeDescription 
phonesYesarrayArray of the phone numbers
typesYesarraySpecify the stop list type: sms, viber

Request sample:

{
  "phones": [
    85226010227,
    85236016161
  ],
  "types": [
    "sms"
  ]
}

Response parameters

If the query is successful, you will get a 201 Successful attached.

{
    "data": [
        {
            "id": 18815384,
            "phone": 380662939860,
            "created_at": "2023-02-06 12:30:26",
            "sms_stoplist": true,
            "viber_stoplist": true
        }
    ]
}

If the query fails, an error object will be returned.