User Tools

Site Tools


api:pbx:numberblacklist:list

API : PBX : Number blacklist list

Introduction

A number blacklist is a named list of phone numbers that a dialplan item will not accept calls from.

A blacklist belongs to a single customer and is never shared between customers. It can be selected on TRUNK and EXTENSION dialplan items through their numberBlacklist property. When such an item is invoked and the callers number is on the selected blacklist, the PBX rejects the call with busy.

Numbers are stored in E.164 format and matched exactly - a blacklisted number blocks that number and nothing else. On an extension the blacklist is only checked for external callers; local extensions are never filtered, and the extensions own blacklist array is checked as well.

This request returns the customers number blacklists. The numbers themselves are not included - only how many there are. Use Get to read the numbers of a single blacklist.

Request

URL https://api.telecomx.dk/pbx/numberblacklist
Method GET
Access level VIEWER, MANAGER or OWNER if user belongs to the customer.
RESELLER if customer belongs to the reseller.
ADMIN.
Query customer [optional] Customer to list blacklists for. Defaults to the users own customer.
offset [optional] Index of the first item to return, default 0, max 10000.
limit [optional] The number of items to return, default 50, min 1, max 100.
filter [optional] Search query that will match against the blacklist name.

Query examples

https://api.telecomx.dk/pbx/numberblacklist
https://api.telecomx.dk/pbx/numberblacklist?customer=1234567890ABCDEF12345678
https://api.telecomx.dk/pbx/numberblacklist?offset=10&limit=25
https://api.telecomx.dk/pbx/numberblacklist?filter=spam

Response

JSON object
offset Number Index of the first blacklist returned.
limit Number Number of blacklists requested. The actual number of returned items may be lower.
total Number Number of blacklists that can be returned when offset and limit is not considered. This is to be used for paging through the data.
numberBlacklists Array Array of blacklists, see definition below.
Number blacklist object
_id Id Unique id of the blacklist.
name String Name of the blacklist, unique within the customer.
notes String Notes about what the blacklist is used for, null if none.
numbers Number Number of phone numbers on the blacklist.
createdAt Date When the blacklist was created.
updatedAt Date When the blacklist was last changed.

Example

{
  offset: 0,
  limit: 50,
  total: 2,
  numberBlacklists: [
    {
      _id: '12345678901234567890ABCD',
      name: 'Cold callers',
      notes: 'Sales calls the reception should never see',
      numbers: 34,
      createdAt: '2026-09-10T08:12:44.000Z',
      updatedAt: '2026-09-10T11:02:09.000Z'
    },
    {
      ...
    }
  ]
}

Errors

Error code Message Description
403 access_denied Insufficient access level
404 not_found Customer not found
500 internal_error <Unspecified>
api/pbx/numberblacklist/list.txt · Last modified: by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki