Overview

The Do-Not-Call-DNC API allows developers to check a US phone number against the DNC database and determine whether it is listed DNC or NOT DNC.

Each successful lookup consumes one API credit. The API is designed for real-time, individual lookups and returns results in JSON, making it easy to integrate with websites, applications, CRMs, and other software.

Access to this API is available exclusively to users with an active DNC API Prepaid Credits.

Credit Balance

To view current API credit balance, use this link format:

https://www.donotcalldnc.com/api/prepaid/YOUR_API_KEY/

Remaining credits are also included in every successful API response through the credits_remaining field.

Credit Protection

This API uses a database transaction and row-level locking to safely validate accounts, perform DNC lookups, and deduct credits.

If only one credit remains and multiple requests arrive simultaneously, only one request can use the final credit. The others will receive an insufficient credits response.

Credits are deducted only after successful API key validation and DNC lookup, helping maintain accurate credit balances during concurrent requests.

Authentication

Every request requires a valid API key with available API credits. You can provide your API key in either of the following ways.

Header:

X-API-KEY: API KEY

Query String:

?apikey=API_KEY

Using the HTTP header is recommended because it keeps the API key separate from the URL.

Endpoint

https://www.donotcalldnc.com/api/v1/check-1/

Query Parameters

apikey (string): Required unless provided in X-API-KEY header field.
phone (string): Required Phone number to check (10-digits only recommended)

Responses

If the number is found as DNC:
{
    "success": true,
    "phone": "9254047311",
    "is_dnc": true,
    "status": "DNC",
    "credits_remaining": 59999,
    "timestamp": "2026-08-10T00:25:31.1234567Z"
}

If the number is found not DNC:
{
    "success": true,
    "phone": "9254047311",
    "is_dnc": false,
    "status": "NOT DNC",
    "credits_remaining": 59999,
    "timestamp": "2026-08-10T00:25:31.1234567Z"
}

Field Descriptions

Field Type Description
success Boolean Indicates whether the request was successfully processed.
phone String The normalized 10-digit phone number.
is_dnc Boolean true if the phone number is found in the DNC database.
status String Either DNC or NOT DNC.
credits_remaining Integer Number of API credits remaining after this lookup.
timestamp String UTC timestamp when the request was processed.

Missing Parameters

{
  "error": "Missing parameters"
}

Cause: Missing X-API-KEY or phone

Invalid API Key
{
  "error": "Invalid API Key"
}

Cause: API key is incorrect

Invalid Phone Number
{
  "error": "Invalid phone number"
}

Accepted format: digits only (e.g. 9254047311)

Example Request

cURL
curl -X GET "https://donotcalldnc.com/api/v1/check-1/?phone=9254047311" ^
-H "X-API-KEY: API KEY"
Javascript
fetch("https://www.donotcalldnc.com/api/v1/check-1/?phone=9254047311", {
    method: "GET",
    headers: {
        "X-API-KEY": "YOUR_API_KEY"
    }
})
.then(response => response.json())
.then(data => {
    console.log(data);
});
PHP
<?php

$apiKey = "YOUR_API_KEY";
$phone = "9254047311";

$url = "https://www.donotcalldnc.com/api/v1/check-1/?phone=" . urlencode($phone);

$ch = curl_init($url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "X-API-KEY: " . $apiKey
]);

$response = curl_exec($ch);

curl_close($ch);

$data = json_decode($response, true);

print_r($data);

?>

Error Codes

  • 200 - Success
  • 400 - Missing or invalid request parameters
  • 401 - Invalid API key
  • 403 - Insufficient API Credit
  • 500 - Internal processing error

Single Lookup Workflow

A typical API request follows this process:

1. Receive API request
        ↓
2. Read API key
        ↓
3. Read phone number
        ↓
4. Normalize phone number
        ↓
5. Validate phone number
        ↓
6. Validate API key
        ↓
7. Check available credits
        ↓
8. Search phone number in DNC database
        ↓
9. Deduct 1 API credit
        ↓
10. Return JSON response

Notes

  • Phone numbers are normalized automatically
  • Invalid requests are rejected immediately
  • Optimized for fast real-time lookup