Scrub Single Number
curl --request GET \
--url https://www.dncscrub.com/app/main/rpc/scrub \
--header 'loginId: <loginid>'import requests
url = "https://www.dncscrub.com/app/main/rpc/scrub"
headers = {"loginId": "<loginid>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {loginId: '<loginid>'}};
fetch('https://www.dncscrub.com/app/main/rpc/scrub', 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://www.dncscrub.com/app/main/rpc/scrub",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"loginId: <loginid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.dncscrub.com/app/main/rpc/scrub"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("loginId", "<loginid>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.dncscrub.com/app/main/rpc/scrub")
.header("loginId", "<loginid>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.dncscrub.com/app/main/rpc/scrub")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["loginId"] = '<loginid>'
response = http.request(request)
puts response.read_body[
{
"Phone": "7075276405",
"ResultCode": "D",
"Reserved": "",
"Reason": "National (USA) 2003-06-01;;;",
"RegionAbbrev": "CA",
"Country": "US",
"Locale": "Santa Rosa",
"CarrierInfo": "9740;RBOC;\"AT&T California:AT&T California\"",
"NewReassignedAreaCode": "",
"TZCode": "4",
"CallingWindow": "",
"UTCOffset": "-420",
"DoNotCallToday": "",
"CallingTimeRestrictions": "4",
"EBRType": "",
"IsWirelessOrVoIP": "0",
"LineType": "AllOther"
}
]
Full Scrub
Scrub Single Number
Scrub a single phone number via the API
GET
/
app
/
main
/
rpc
/
scrub
Scrub Single Number
curl --request GET \
--url https://www.dncscrub.com/app/main/rpc/scrub \
--header 'loginId: <loginid>'import requests
url = "https://www.dncscrub.com/app/main/rpc/scrub"
headers = {"loginId": "<loginid>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {loginId: '<loginid>'}};
fetch('https://www.dncscrub.com/app/main/rpc/scrub', 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://www.dncscrub.com/app/main/rpc/scrub",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"loginId: <loginid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.dncscrub.com/app/main/rpc/scrub"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("loginId", "<loginid>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.dncscrub.com/app/main/rpc/scrub")
.header("loginId", "<loginid>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.dncscrub.com/app/main/rpc/scrub")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["loginId"] = '<loginid>'
response = http.request(request)
puts response.read_body[
{
"Phone": "7075276405",
"ResultCode": "D",
"Reserved": "",
"Reason": "National (USA) 2003-06-01;;;",
"RegionAbbrev": "CA",
"Country": "US",
"Locale": "Santa Rosa",
"CarrierInfo": "9740;RBOC;\"AT&T California:AT&T California\"",
"NewReassignedAreaCode": "",
"TZCode": "4",
"CallingWindow": "",
"UTCOffset": "-420",
"DoNotCallToday": "",
"CallingTimeRestrictions": "4",
"EBRType": "",
"IsWirelessOrVoIP": "0",
"LineType": "AllOther"
}
]
Scrub a single phone number against all configured DNC lists and compliance databases.
Request
Headers
string
required
Your API Key
Query Parameters
string
required
The 10-digit phone number to scrub
string
default:"5"
required
API version. Use
5string
default:"json"
Response format:
json or csvstring
Optional. Project ID
string
Optional. Campaign ID
Example Request
curl --location --request GET \
'https://www.dncscrub.com/app/main/rpc/scrub?phoneList=7075276405&version=5&output=json' \
--header 'loginId: YOUR_API_KEY'
const phoneNumber = "7075276405";
const apiUrl = `https://www.dncscrub.com/app/main/rpc/scrub?phoneList=${phoneNumber}&version=5&output=json`;
fetch(apiUrl, {
method: "GET",
headers: {
loginId: "YOUR_API_KEY",
},
})
.then((response) => response.json())
.then((data) => {
console.log("Phone:", data[0].Phone);
console.log("Result Code:", data[0].ResultCode);
console.log("Reason:", data[0].Reason);
});
// Ensure TLS 1.2
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("loginId", "YOUR_API_KEY");
var phoneNumber = "7075276405";
var url = $"https://www.dncscrub.com/app/main/rpc/scrub?phoneList={phoneNumber}&version=5&output=json";
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
}
[
{
"Phone": "7075276405",
"ResultCode": "D",
"Reserved": "",
"Reason": "National (USA) 2003-06-01;;;",
"RegionAbbrev": "CA",
"Country": "US",
"Locale": "Santa Rosa",
"CarrierInfo": "9740;RBOC;\"AT&T California:AT&T California\"",
"NewReassignedAreaCode": "",
"TZCode": "4",
"CallingWindow": "",
"UTCOffset": "-420",
"DoNotCallToday": "",
"CallingTimeRestrictions": "4",
"EBRType": "",
"IsWirelessOrVoIP": "0",
"LineType": "AllOther"
}
]
Response Fields
string
The phone number that was scrubbed
string
The scrub result code (see Result
Codes)
string
Reserved field used for unique identifiers
string
Explanation of why the number is flagged
string
State/region abbreviation (e.g., “CA”)
string
Two-digit country code (e.g., “US”)
string
City or locality
string
Carrier information in format:
ID;TYPE;"Name"string
Timezone code
string
UTC offset in minutes
string
1 if wireless/VoIP, 0 otherwisestring
Line type:
Wireless, VoIP, or AllOtherHandling the Response. Make sure to handle all response codes. The sample below handles just a few
const data = await response.json();
const result = data[0];
switch (result.ResultCode) {
case "C":
// Clean - safe to call
console.log("Phone number is clean");
break;
case "D":
// Do Not Call
console.log("Do not call:", result.Reason);
break;
case "W":
// Wireless number detected
console.log("Wireless number detected");
break;
default:
console.log("Result:", result.ResultCode);
}
⌘I