> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dncscrub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scrub Single Number

> Scrub a single phone number via the API

Scrub a single phone number against all configured DNC lists and compliance databases.

## Request

### Headers

<ParamField header="loginId" type="string" required>
  Your API Key
</ParamField>

### Query Parameters

<ParamField query="phoneList" type="string" required>
  The 10-digit phone number to scrub
</ParamField>

<ParamField query="version" type="string" required default="5">
  API version. Use `5`
</ParamField>

<ParamField query="output" type="string" default="json">
  Response format: `json` or `csv`
</ParamField>

<ParamField query="projId" type="string">
  Optional. Project ID
</ParamField>

<ParamField query="campaignId" type="string">
  Optional. Campaign ID
</ParamField>

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl --location --request GET \
    'https://www.dncscrub.com/app/main/rpc/scrub?phoneList=7075276405&version=5&output=json' \
    --header 'loginId: YOUR_API_KEY'
  ```

  ```javascript JavaScript theme={null}
  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);
    });
  ```

  ```csharp C# theme={null}
  // 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);
  }
  ```
</CodeGroup>

<ResponseExample>
  ```json Response theme={null}
  [
    {
      "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"
    }
  ]
  ```
</ResponseExample>

## Response Fields

<ResponseField name="Phone" type="string">
  The phone number that was scrubbed
</ResponseField>

<ResponseField name="ResultCode" type="string">
  The scrub result code (see [Result
  Codes](/api-reference/scrub/overview#result-codes))
</ResponseField>

<ResponseField name="Reserved" type="string">
  Reserved field used for unique identifiers
</ResponseField>

<ResponseField name="Reason" type="string">
  Explanation of why the number is flagged
</ResponseField>

<ResponseField name="RegionAbbrev" type="string">
  State/region abbreviation (e.g., "CA")
</ResponseField>

<ResponseField name="Country" type="string">
  Two-digit country code (e.g., "US")
</ResponseField>

<ResponseField name="Locale" type="string">
  City or locality
</ResponseField>

<ResponseField name="CarrierInfo" type="string">
  Carrier information in format: `ID;TYPE;"Name"`
</ResponseField>

<ResponseField name="TZCode" type="string">
  Timezone code
</ResponseField>

<ResponseField name="UTCOffset" type="string">
  UTC offset in minutes
</ResponseField>

<ResponseField name="IsWirelessOrVoIP" type="string">
  `1` if wireless/VoIP, `0` otherwise
</ResponseField>

<ResponseField name="LineType" type="string">
  Line type: `Wireless`, `VoIP`, or `AllOther`
</ResponseField>

## Handling the Response. Make sure to handle all response codes. The sample below handles just a few

```javascript theme={null}
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);
}
```
