Skip to content

Blacklist API

A blacklist is a map of caller ID numbers that you want to prevent from calling into the hosted PBX. Use the Blacklist API to manage blacklists in your VoIP account.

API calls

Click on each call to view the endpoint, method, and request example.

Parameters

The table shows the possible parameters available for blacklist requests.

Key Description Type Options/Min/Max/Default
name Required. A friendly name for the temporal rule set. string (1..128)
flags.[] Specific flags. string Not applicable
flags Flags set by external applications. array, string Not applicable
numbers Map of caller ID number to block. object Not applicable
should_block_anonymous Indicates if anonymous calls should be blocked. boolean

Get blacklists

Returns a list of blacklists on the account.

Endpoint and method

  GET /v2/accounts/{ACCOUNT_ID}/blacklists

Request

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

Create a blacklist

Creates a blacklist.

Endpoint and method

  PUT /v2/accounts/{ACCOUNT_ID}/blacklists

Request

  curl -v -X PUT \
      -H "X-Auth-Token: {AUTH_TOKEN}" \
      http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/blacklists

Get a blacklist

Returns a specific blacklist using the blacklist ID.

Endpoint and method

  GET /v2/accounts/{ACCOUNT_ID}/blacklists/{BLACKLIST_ID}

Request

curl -v -X GET \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/blacklists/{BLACKLIST_ID}

Change a blacklist

Updates a blacklist.

Endpoint and method

POST /v2/accounts/{ACCOUNT_ID}/blacklists/{BLACKLIST_ID}

Request

curl -v -X POST \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/blacklists/{BLACKLIST_ID}

Patch a blacklist

Partially updates a blacklist.

Endpoint and method

  PATCH /v2/accounts/{ACCOUNT_ID}/blacklists/{BLACKLIST_ID}

Request

curl -v -X PATCH \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/blacklists/{BLACKLIST_ID}

Remove a blacklist

Removes a specific blacklist from the account.

Endpoint and method

  DELETE /v2/accounts/{ACCOUNT_ID}/blacklists/{BLACKLIST_ID}

Request

  curl -v -X DELETE \
      -H "X-Auth-Token: {AUTH_TOKEN}" \
      http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/blacklists/{BLACKLIST_ID}