{
"SubscriberId": "SID-C7AB61E0-9AD9-4512-ACA8-EDA284131441",
"Phone": "+1234567890",
"FilterMode": "WHITELIST",
"AllowedNumbers": ["+1111111111", "+2222222222"],
"BlockedNumbers": ["+3333333333"],
"EnableTranscription": true,
"KeywordFilter": "{\"CustomKeywords\":[\"inappropriate\",\"banned\"],\"SystemKeywords\":{\"Profanity\":[\"word1\",\"word2\"],\"Violence\":[\"threat1\"]},\"SeverityMap\":{\"Word1\":\"HIGH\",\"Inappropriate\":\"MEDIUM\"}}",
"TranscriptionAction": "WARNING",
"WarningMessage": "This call may be terminated",
"NotificationPhones": ["+9999999999"]
}curl -X POST https://api.telegent.com/v1.0/subscribers/call-filter \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"SubscriberId": "SID-C7AB61E0-9AD9-4512-ACA8-EDA284131441",
"Phone": "+1234567890",
"FilterMode": "WHITELIST",
"AllowedNumbers": ["+1111111111", "+2222222222"],
"BlockedNumbers": ["+3333333333"],
"EnableTranscription": true,
"TranscriptionAction": "WARNING",
"WarningMessage": "This call may be terminated",
"NotificationPhones": ["+9999999999"]
}'import requests
url = "https://api.telegent.com/v1.0/subscribers/call-filter"
payload = {
"SubscriberId": "TSUID-C7AB61E0-9AD9-4512-ACA8-EDA284131441",
"Phone": "+1234567890",
"FilterMode": "WHITELIST",
"AllowedNumbers": ["<string>"],
"BlockedNumbers": ["<string>"],
"EnableTranscription": True,
"KeywordFilter": "<string>",
"WarningMessage": "<string>",
"NotificationPhones": ["<string>"],
"ApplyToOutbound": True,
"ApplyToInbound": True,
"BlockUnknownNumbers": True,
"BlockInternational": True,
"RecordFlaggedCalls": True,
"TimeRestrictions": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
SubscriberId: 'TSUID-C7AB61E0-9AD9-4512-ACA8-EDA284131441',
Phone: '+1234567890',
FilterMode: 'WHITELIST',
AllowedNumbers: ['<string>'],
BlockedNumbers: ['<string>'],
EnableTranscription: true,
KeywordFilter: '<string>',
WarningMessage: '<string>',
NotificationPhones: ['<string>'],
ApplyToOutbound: true,
ApplyToInbound: true,
BlockUnknownNumbers: true,
BlockInternational: true,
RecordFlaggedCalls: true,
TimeRestrictions: {}
})
};
fetch('https://api.telegent.com/v1.0/subscribers/call-filter', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telegent.com/v1.0/subscribers/call-filter",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'SubscriberId' => 'TSUID-C7AB61E0-9AD9-4512-ACA8-EDA284131441',
'Phone' => '+1234567890',
'FilterMode' => 'WHITELIST',
'AllowedNumbers' => [
'<string>'
],
'BlockedNumbers' => [
'<string>'
],
'EnableTranscription' => true,
'KeywordFilter' => '<string>',
'WarningMessage' => '<string>',
'NotificationPhones' => [
'<string>'
],
'ApplyToOutbound' => true,
'ApplyToInbound' => true,
'BlockUnknownNumbers' => true,
'BlockInternational' => true,
'RecordFlaggedCalls' => true,
'TimeRestrictions' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.telegent.com/v1.0/subscribers/call-filter"
payload := strings.NewReader("{\n \"SubscriberId\": \"TSUID-C7AB61E0-9AD9-4512-ACA8-EDA284131441\",\n \"Phone\": \"+1234567890\",\n \"FilterMode\": \"WHITELIST\",\n \"AllowedNumbers\": [\n \"<string>\"\n ],\n \"BlockedNumbers\": [\n \"<string>\"\n ],\n \"EnableTranscription\": true,\n \"KeywordFilter\": \"<string>\",\n \"WarningMessage\": \"<string>\",\n \"NotificationPhones\": [\n \"<string>\"\n ],\n \"ApplyToOutbound\": true,\n \"ApplyToInbound\": true,\n \"BlockUnknownNumbers\": true,\n \"BlockInternational\": true,\n \"RecordFlaggedCalls\": true,\n \"TimeRestrictions\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.telegent.com/v1.0/subscribers/call-filter")
.header("Content-Type", "application/json")
.body("{\n \"SubscriberId\": \"TSUID-C7AB61E0-9AD9-4512-ACA8-EDA284131441\",\n \"Phone\": \"+1234567890\",\n \"FilterMode\": \"WHITELIST\",\n \"AllowedNumbers\": [\n \"<string>\"\n ],\n \"BlockedNumbers\": [\n \"<string>\"\n ],\n \"EnableTranscription\": true,\n \"KeywordFilter\": \"<string>\",\n \"WarningMessage\": \"<string>\",\n \"NotificationPhones\": [\n \"<string>\"\n ],\n \"ApplyToOutbound\": true,\n \"ApplyToInbound\": true,\n \"BlockUnknownNumbers\": true,\n \"BlockInternational\": true,\n \"RecordFlaggedCalls\": true,\n \"TimeRestrictions\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/subscribers/call-filter")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"SubscriberId\": \"TSUID-C7AB61E0-9AD9-4512-ACA8-EDA284131441\",\n \"Phone\": \"+1234567890\",\n \"FilterMode\": \"WHITELIST\",\n \"AllowedNumbers\": [\n \"<string>\"\n ],\n \"BlockedNumbers\": [\n \"<string>\"\n ],\n \"EnableTranscription\": true,\n \"KeywordFilter\": \"<string>\",\n \"WarningMessage\": \"<string>\",\n \"NotificationPhones\": [\n \"<string>\"\n ],\n \"ApplyToOutbound\": true,\n \"ApplyToInbound\": true,\n \"BlockUnknownNumbers\": true,\n \"BlockInternational\": true,\n \"RecordFlaggedCalls\": true,\n \"TimeRestrictions\": {}\n}"
response = http.request(request)
puts response.read_body{
"FilterId": "CFID-05c3d6d2-21c2-4fab-8c7c-12746cad1499",
"SubscriberId": "TSUID-C7AB61E0-9AD9-4512-ACA8-EDA284131441",
"Phone": "+1234567890",
"FilterMode": "WHITELIST",
"AllowedNumbers": [
"+1111111111",
"+2222222222"
],
"BlockedNumbers": [
"+3333333333"
],
"EnableTranscription": true,
"KeywordFilter": "{\"CustomKeywords\":[\"inappropriate\",\"banned\"],\"SystemKeywords\":{\"Profanity\":[\"word1\",\"word2\"],\"Violence\":[\"threat1\"]},\"SeverityMap\":{\"Word1\":\"HIGH\",\"Inappropriate\":\"MEDIUM\"}}",
"TranscriptionAction": "WARNING",
"WarningMessage": "This call may be terminated",
"NotificationPhones": [
"+9999999999"
],
"ApplyToOutbound": false,
"ApplyToInbound": false,
"BlockUnknownNumbers": false,
"BlockInternational": false,
"RecordFlaggedCalls": false,
"TimeRestrictions": null
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Create Call Filter
Create a new call filter that controls who can place or receive calls for a subscriber.
Prerequisites:
- Bearer token —
POST /v1.0/oauth2/tokens - An existing Subscriber (
TSUID-) —POST /v1.0/subscribers/create - AI Guardian enabled for calls —
POST /v1.0/subscribers/guardian-features - (Optional) For age-preset modes (
CHILD,TEENAGER,ADOLESCENT): a parent-child guardian relation —POST /v1.0/subscribers/guardians/relation
What this does: Creates a call filter and returns a CallFilterId (CFID-). Choose mode: WHITELIST (only allowed numbers ring through), BLACKLIST (block listed numbers, allow others), or an age preset that applies Telegent-recommended defaults. Configure transcription, keyword alerts, action on detection (warn/terminate/notify), and time-based restrictions. The filter takes effect immediately.
Next steps:
- Verify it was saved —
GET /v1.0/subscribers/call-filter - Add allowed callers —
POST /v1.0/subscribers/call-filter/allowed-numbers/add - Add blocked callers —
POST /v1.0/subscribers/call-filter/blocked-numbers/add - Review keyword rules —
GET /v1.0/subscribers/call-filter/keywords - Update later —
POST /v1.0/subscribers/call-filter/update
{
"SubscriberId": "SID-C7AB61E0-9AD9-4512-ACA8-EDA284131441",
"Phone": "+1234567890",
"FilterMode": "WHITELIST",
"AllowedNumbers": ["+1111111111", "+2222222222"],
"BlockedNumbers": ["+3333333333"],
"EnableTranscription": true,
"KeywordFilter": "{\"CustomKeywords\":[\"inappropriate\",\"banned\"],\"SystemKeywords\":{\"Profanity\":[\"word1\",\"word2\"],\"Violence\":[\"threat1\"]},\"SeverityMap\":{\"Word1\":\"HIGH\",\"Inappropriate\":\"MEDIUM\"}}",
"TranscriptionAction": "WARNING",
"WarningMessage": "This call may be terminated",
"NotificationPhones": ["+9999999999"]
}curl -X POST https://api.telegent.com/v1.0/subscribers/call-filter \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"SubscriberId": "SID-C7AB61E0-9AD9-4512-ACA8-EDA284131441",
"Phone": "+1234567890",
"FilterMode": "WHITELIST",
"AllowedNumbers": ["+1111111111", "+2222222222"],
"BlockedNumbers": ["+3333333333"],
"EnableTranscription": true,
"TranscriptionAction": "WARNING",
"WarningMessage": "This call may be terminated",
"NotificationPhones": ["+9999999999"]
}'import requests
url = "https://api.telegent.com/v1.0/subscribers/call-filter"
payload = {
"SubscriberId": "TSUID-C7AB61E0-9AD9-4512-ACA8-EDA284131441",
"Phone": "+1234567890",
"FilterMode": "WHITELIST",
"AllowedNumbers": ["<string>"],
"BlockedNumbers": ["<string>"],
"EnableTranscription": True,
"KeywordFilter": "<string>",
"WarningMessage": "<string>",
"NotificationPhones": ["<string>"],
"ApplyToOutbound": True,
"ApplyToInbound": True,
"BlockUnknownNumbers": True,
"BlockInternational": True,
"RecordFlaggedCalls": True,
"TimeRestrictions": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
SubscriberId: 'TSUID-C7AB61E0-9AD9-4512-ACA8-EDA284131441',
Phone: '+1234567890',
FilterMode: 'WHITELIST',
AllowedNumbers: ['<string>'],
BlockedNumbers: ['<string>'],
EnableTranscription: true,
KeywordFilter: '<string>',
WarningMessage: '<string>',
NotificationPhones: ['<string>'],
ApplyToOutbound: true,
ApplyToInbound: true,
BlockUnknownNumbers: true,
BlockInternational: true,
RecordFlaggedCalls: true,
TimeRestrictions: {}
})
};
fetch('https://api.telegent.com/v1.0/subscribers/call-filter', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telegent.com/v1.0/subscribers/call-filter",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'SubscriberId' => 'TSUID-C7AB61E0-9AD9-4512-ACA8-EDA284131441',
'Phone' => '+1234567890',
'FilterMode' => 'WHITELIST',
'AllowedNumbers' => [
'<string>'
],
'BlockedNumbers' => [
'<string>'
],
'EnableTranscription' => true,
'KeywordFilter' => '<string>',
'WarningMessage' => '<string>',
'NotificationPhones' => [
'<string>'
],
'ApplyToOutbound' => true,
'ApplyToInbound' => true,
'BlockUnknownNumbers' => true,
'BlockInternational' => true,
'RecordFlaggedCalls' => true,
'TimeRestrictions' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.telegent.com/v1.0/subscribers/call-filter"
payload := strings.NewReader("{\n \"SubscriberId\": \"TSUID-C7AB61E0-9AD9-4512-ACA8-EDA284131441\",\n \"Phone\": \"+1234567890\",\n \"FilterMode\": \"WHITELIST\",\n \"AllowedNumbers\": [\n \"<string>\"\n ],\n \"BlockedNumbers\": [\n \"<string>\"\n ],\n \"EnableTranscription\": true,\n \"KeywordFilter\": \"<string>\",\n \"WarningMessage\": \"<string>\",\n \"NotificationPhones\": [\n \"<string>\"\n ],\n \"ApplyToOutbound\": true,\n \"ApplyToInbound\": true,\n \"BlockUnknownNumbers\": true,\n \"BlockInternational\": true,\n \"RecordFlaggedCalls\": true,\n \"TimeRestrictions\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.telegent.com/v1.0/subscribers/call-filter")
.header("Content-Type", "application/json")
.body("{\n \"SubscriberId\": \"TSUID-C7AB61E0-9AD9-4512-ACA8-EDA284131441\",\n \"Phone\": \"+1234567890\",\n \"FilterMode\": \"WHITELIST\",\n \"AllowedNumbers\": [\n \"<string>\"\n ],\n \"BlockedNumbers\": [\n \"<string>\"\n ],\n \"EnableTranscription\": true,\n \"KeywordFilter\": \"<string>\",\n \"WarningMessage\": \"<string>\",\n \"NotificationPhones\": [\n \"<string>\"\n ],\n \"ApplyToOutbound\": true,\n \"ApplyToInbound\": true,\n \"BlockUnknownNumbers\": true,\n \"BlockInternational\": true,\n \"RecordFlaggedCalls\": true,\n \"TimeRestrictions\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telegent.com/v1.0/subscribers/call-filter")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"SubscriberId\": \"TSUID-C7AB61E0-9AD9-4512-ACA8-EDA284131441\",\n \"Phone\": \"+1234567890\",\n \"FilterMode\": \"WHITELIST\",\n \"AllowedNumbers\": [\n \"<string>\"\n ],\n \"BlockedNumbers\": [\n \"<string>\"\n ],\n \"EnableTranscription\": true,\n \"KeywordFilter\": \"<string>\",\n \"WarningMessage\": \"<string>\",\n \"NotificationPhones\": [\n \"<string>\"\n ],\n \"ApplyToOutbound\": true,\n \"ApplyToInbound\": true,\n \"BlockUnknownNumbers\": true,\n \"BlockInternational\": true,\n \"RecordFlaggedCalls\": true,\n \"TimeRestrictions\": {}\n}"
response = http.request(request)
puts response.read_body{
"FilterId": "CFID-05c3d6d2-21c2-4fab-8c7c-12746cad1499",
"SubscriberId": "TSUID-C7AB61E0-9AD9-4512-ACA8-EDA284131441",
"Phone": "+1234567890",
"FilterMode": "WHITELIST",
"AllowedNumbers": [
"+1111111111",
"+2222222222"
],
"BlockedNumbers": [
"+3333333333"
],
"EnableTranscription": true,
"KeywordFilter": "{\"CustomKeywords\":[\"inappropriate\",\"banned\"],\"SystemKeywords\":{\"Profanity\":[\"word1\",\"word2\"],\"Violence\":[\"threat1\"]},\"SeverityMap\":{\"Word1\":\"HIGH\",\"Inappropriate\":\"MEDIUM\"}}",
"TranscriptionAction": "WARNING",
"WarningMessage": "This call may be terminated",
"NotificationPhones": [
"+9999999999"
],
"ApplyToOutbound": false,
"ApplyToInbound": false,
"BlockUnknownNumbers": false,
"BlockInternational": false,
"RecordFlaggedCalls": false,
"TimeRestrictions": null
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}{
"StatusCode": 123,
"Message": "<string>"
}Body
Controls how the call filter behaves. WHITELIST: only allowed numbers can call — everyone else is blocked. BLACKLIST: blocked numbers are rejected, all others ring through. CHILD, TEENAGER, ADOLESCENT: age-based presets that apply Telegent's recommended defaults for that age group (combination of allowed/blocked rules and keyword sensitivity).
WHITELIST, BLACKLIST, CHILD, TEENAGER, ADOLESCENT "WHITELIST"
Stringified JSON defining keyword rules. Structure: {"CustomKeywords":[...],"SystemKeywords":{"Profanity":[...],"Violence":[...]},"SeverityMap":{"keyword":"HIGH|MEDIUM|LOW"}}. CustomKeywords are user-added words; SystemKeywords are platform-provided categories; SeverityMap assigns a risk level to each term.
What happens when a flagged keyword is detected during live transcription. WARNING: play WarningMessage to the caller but allow the call to continue. TERMINATE: end the call immediately. NOTIFY: alert NotificationPhones without interrupting the call.
WARNING, TERMINATE, NOTIFY Response
Call Filter Created
The response is of type object.