View Template Blocklists

View Template Blocklists

View all Blocklists

API Endpoint

http://portal.thundersms.com/api/v2/

Note: Few elements in the endpoint may change from service to service.

GET

{endpoint}sms/suppressions/templates

Example Request

cURL - cURL
curl --location --globoff '{endpoint}api/v2/sms/suppressions/templates'

Kindly replace the token with your respective access_token and other params.

Example Response

{
    "status": "OK",
    "code": 200,
    "message": "Block templates list",
    "data": [
        {
            "id": "2",
            "template_id": "12xxxxx",
            "status": 1,
        },
        ....
    ],
    "links": {
        "first": "{endpoint}sms/suppressions/templates?page=1",
        "last": "{endpoint}sms/suppressions/templates?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "« Previous",
                "active": false
            },
            {
                "url": "{endpoint}sms/suppressions/templates?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "Next »",
                "active": false
            }
        ],
        "path": "{endpoint}sms/suppressions/templates",
        "per_page": 15,
        "to": 3,
        "total": 3
    }
}

Create block template using POST method.

API Endpoint

http://portal.thundersms.com/api/v2/

Note: Few elements in the endpoint may change from service to service.

POST

{endpoint}sms/suppressions/templates

PARAMETERS

Name optional Descriptions
template_id No Enter the template_id that you want to create
status Mixed 1 or 0

Example Request

cURL - cURL
curl --location --globoff '{endpoint}api/v2/sms/suppressions/templates' \
--data '{
    "template_id": "{block_template_id}",
    "status": "1"
}'

Example Response

{
  "status": "OK",
  "code": 200,
  "message": "Block template added successfully",
  "data": {
    "id": "2",
    "template_id": "12xxxxx",
    "status": 1
  }
}

Edit block template using put method.

API Endpoint

http://portal.thundersms.com/api/v2/

Note: Few elements in the endpoint may change from service to service.

PUT

{endpoint}sms/suppressions/templates/{id}

Replace the {id} with the actual id of the receiver that you would like to Edit.

PARAMETERS

Name optional Descriptions
template_id No Enter the receiver that you want to edit
status Mixed 1 or 0

Example Request

cURL - cURL
curl --location --globoff --request PUT '{endpoint}api/v2/sms/suppressions/templates/{created_block_template_id}' \
--data '{
    "template_id": "435353453"
}'

Example Response

{
  "status": "OK",
  "code": 200,
  "message": "Block template updated successfully",
  "data": {
    "id": "2",
    "template_id": "12xxxxx",
    "status": 1
  }
}

View one created block template

API Endpoint

http://portal.thundersms.com/api/v2/

Note: Few elements in the endpoint may change from service to service.

GET

{endpoint}sms/suppressions/templates/{id}

Example Request

cURL - cURL
curl --location --globoff '{endpoint}api/v2/sms/suppressions/templates/{created_block_template_id}'

Kindly replace the token with your respective access_token .

Example Response

{
  "status": "OK",
  "code": 200,
  "message": "Block template data",
  "data": {
    "id": 2,
    "template_id": "12xxxxx",
    "status": 1
  }
}

Import block templates by uploading a file

API Endpoint

http://portal.thundersms.com/api/v2/

Note: Few elements in the endpoint may change from service to service.

POST

{endpoint}/sms/suppressions/templates/import

Example Request

cURL - cURL
curl --location --globoff '{endpoint}api/v2/sms/suppressions/templates/import' \
--form 'file=@"/C:/Users/Pavithra/Downloads/CorrectBlockTemplate.csv"'

PARAMETERS

Name Description Limits Required
url Public url of the receiver file. Either HTTP/HTTPS link. 100 MB Yes
caption some text for reciver caption N/A No
filename Receiver file name N/A No

EXAMPLE RESPONSE

{
  "status": "OK",
  "message": "Blocked templates accepted for import"
}

Delete block template using delete method

API Endpoint

http://portal.thundersms.com/api/v2/

Note: Few elements in the endpoint may change from service to service.

DELETE

{endpoint}sms/suppressions/templates/{id}

Replace the {id} with the actual id of the block template’s id that you would like to delete.

Example Request

cURL - cURL
curl --location --globoff --request DELETE '{endpoint}api/v2/sms/suppressions/templates/{created_block_template_id}'

Example Response

{
  "status": "OK",
  "code": 200,
  "message": "Deleted Successfully",
  "data": []
}

Delete all templates at once

API Endpoint

http://portal.thundersms.com/api/v2/

Note: Few elements in the endpoint may change from service to service.

POST

{endpoint}sms/suppressions/templates

Example Request

cURL - cURL
curl --location --globoff --request DELETE '{endpoint}api/v2/sms/suppressions/templates'

Example Response

{
  "status": "OK",
  "code": 200,
  "message": "Deleted Successfully",
  "data": []
}