Skip to content

Blocked Call List API Guide

Feature Overview

The Global Block Call Table (Setup Guide) can be managed via the REST API. This allows you to create, update, delete, and list and query blocked numbers. This is useful for integrating with other systems, or for bulk management of the block list.

Customers have used this API to scrape and import numbers from other systems, or to integrate with their own internal systems for managing blocked numbers.

Feature Requirements

Postman API Documentation and Collection

The API is fully documented with Postman, and includes examples of how to submit and manage blocked numbers. You can also fork the Postman collection to your own Postman account.

Postman API Documentation

Obtaining your API Key

To use the API, you will need to obtain your API Key from the Call Telemetry Server. This is a unique key that is used to authenticate your requests. You can obtain this key by logging into the Call Telemetry Server and navigating to the Settings page, under the Blocking Tab.

Screenshot showing the API Key

The API key must be included in the Authorization header of your requests. The value of the header should be the API key above.

API Base URL

This is the base URL for the REST API. All requests should be made to this URL, with your authentication token.

http://server/api/org/1/blocklist

Headers: Authentication: YOUR_API_TOKEN

API Endpoint: Create Blocked Call Number

Request Type: POST Endpoint: /blocklist

This endpoint allows you to create a new blocked call number. The request body should include the following details:

  • calling_number: The number to be blocked
  • called_number: The number that was attempted to be called

Request Example:

json
{
  "calling_number": "1234567",
  "called_number": ""
}

API Endpoint: List Blocked Call Numbers

Request Type: GET Endpoint: /blocklistQuery Parameters:

  • calling_number: Filter the list by the blocked number
  • called_number: Filter the list by the number that was attempted to be called Response Status: 200 OK

This endpoint returns a list of all blocked call numbers. You can filter the list by providing calling_number and/or called_number as query parameters. Each entry in the response includes the following details:

  • id: Unique identifier for the blocked number
  • calling_number: The blocked number
  • called_number: The number that was attempted to be called
  • expires: Boolean indicating if the block is temporary
  • expires_datetime: The date and time when the block will be lifted (if applicable)
  • description: Additional information about the block
  • hit_count: The number of times the block has been triggered
  • last_seen: The last time the block was triggered
  • devicename: The device associated with the blocked number

Response Example:

json
[
  {
    "id": 676,
    "calling_number": "1234567",
    "called_number": "",
    "expires": false,
    "expires_datetime": null,
    "description": null,
    "hit_count": 0,
    "last_seen": null,
    "devicename": null
  }
]

## API Endpoint: View Blocked Call Number

**Request Type:** GET
**Endpoint:** `/blocklist/{id}`

This endpoint allows you to view the details of a specific blocked call number. Replace `{id}` with the unique identifier of the blocked number you wish to view.

**Response Status:** 200 OK

The response includes the details of the blocked call number:

- `id`: Unique identifier for the blocked number
- `calling_number`: The blocked number
- `called_number`: The number that was attempted to be called
- `expires`: Boolean indicating if the block is temporary
- `expires_datetime`: The date and time when the block will be lifted (if applicable)
- `description`: Additional information about the block
- `hit_count`: The number of times the block has been triggered
- `last_seen`: The last time the block was triggered
- `devicename`: The device associated with the blocked number

**Response Example:**

```json
{
  "id": 676,
  "calling_number": "1234567",
  "called_number": "",
  "expires": false,
  "expires_datetime": null,
  "description": null,
  "hit_count": 0,
  "last_seen": null,
  "devicename": null
}

API Endpoint: Delete Blocked Call Number

Request Type: DELETE Endpoint: /blocklist/{id}

This endpoint allows you to delete a specific blocked call number. Replace {id} with the unique identifier of the blocked number you wish to delete.

Response Status: 204 No Content

The response does not include a body.


API Endpoint: Update Blocked Call Number

Request Type: PUT Endpoint: /blocklist/{id}

This endpoint allows you to update the details of a specific blocked call number. Replace {id} with the unique identifier of the blocked number you wish to update. The request body should include the updated details:

  • calling_number: The blocked number
  • called_number: The number that was attempted to be called

Request Example:

json
{
  "calling_number": "1234567",
  "called_number": "1234555"
}