About Blacklists

A blacklist is a map of caller id numbers that can be then apply to the account to block these callers to call the system.


Schema for a blacklists

Key Description Type Default Required
name A friendly name for the temporal rule set string(1..128) true
numbers Map of caller id number to block object {} false
should_block_anonymous Should block Anonymous call boolean false


The structure is really simple:

  • name: A freindly name for your blacklist.
  • numbers: A map of caller id to block


    "name": "Main Blacklist",
    "numbers": {
        "+14151234567": {

When you upload numbers they will be converted to e164 format.


Once you created your blacklists using the api you can apply them to the account by adding the blacklist ids to the account, like the following:

"blacklists": [
    "dbfc14854a06bab3014898b6b4e1ffa0", // Main blacklist
    "davb14854a06bab3542132b6b4e1ffa0"  // Secondary blacklist


Using Crossbar to modify Blacklist is very simple:

  • GET - Gets the current set(s).
  • PUT - Add a set.
  • POST - Updates a set.
  • DELETE - Removes a set.
Account Blacklist URI


GET - Fetch account blacklists:
curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" http://server:8000/v2/accounts/{ACCOUNT_ID}/blacklists

curl -v -X GET -H "X-Auth-Token: {AUTH_TOKEN}" http://server:8000/v2/accounts/{ACCOUNT_ID}/blacklists/{ID}
PUT - Add account blacklists:
curl -v -X PUT -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://server:8000/v2/accounts/{ACCOUNT_ID}/blacklists -d '{"data": {"name": "Main Blacklist","numbers": {"+14151234567": {}}}}'
POST - Update account blacklists:
curl -v -X POST -H "X-Auth-Token: {AUTH_TOKEN}" -H "Content-Type: application/json" http://server:8000/v2/accounts/{ACCOUNT_ID}/blacklists/{ID} -d '{"data": {"name": "Main Blacklist","numbers": {"+14151234567": {}}}}'
DELETE - Remove account blacklists:
curl -v -X DELETE -H "X-Auth-Token: {AUTH_TOKEN}" http://server:8000/v2/accounts/{ACCOUNT_ID}/blacklists/{ID}

Edit this page here