> ## 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 + Add EBR

> Scrub phone numbers and add or refresh their EBR records in a single API call

Scrub one or more phone numbers **and** add or refresh their Existing Business Relationship (EBR) records in a single request. This is the combined version of the [Scrub](/api-reference/scrub/scrub-multiple) and [EBR and Consent](/api-reference/scrub/ebr-list) endpoints: each number is checked against the DNC lists, and any EBR records you include in the same request are written before the result is returned, so the scrub result reflects the EBR you just submitted.

Use this when your system establishes (or re-establishes) a business relationship at the same moment it needs a compliance decision — for example, logging an inquiry and immediately deciding whether the number is callable.

<Warning>
  Each EBR you submit sets that number's date of last contact to the date you
  provide and recalculates its expiration from that date. If you submit an EBR
  for the same number on every contact, its expiration window will roll forward
  each time and will not expire. Only submit an EBR when a genuine new business
  relationship event occurs, or use `keepBetterEBR` (see below) to avoid
  shortening or unintentionally extending an existing EBR. See
  [EBR Expiration](/api-reference/scrub/ebr-list#ebr-expiration).
</Warning>

## Request

### Headers

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

<ParamField header="Content-Type" type="string" required>
  Must be `application/json`
</ParamField>

### Request Body

<ParamField body="phoneList" type="string" required>
  Comma-separated list of 10-digit phone numbers (e.g.,
  `5039367187,7075276405`). To include a system identifier with each result,
  append `|{id}` to the phone number (e.g.,
  `5039367187|abc-10232,7075276405|abc-10233`).
</ParamField>

<ParamField body="version" type="string" required default="7">
  API version. Use `7` (latest). Version `6` adds `EBRExpiresOn` — useful here
  to see the expiration of the EBR you just submitted; version `7` also adds
  `WirelessPortDate` and `VoIPDate`.
</ParamField>

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

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

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

<ParamField body="keepBetterEBR" type="integer" default="0">
  When set to `1`, if an EBR record already exists for a number being submitted
  and the existing EBR is "better" than the one being added, the existing EBR is
  not overwritten. Federal EBR expiration dates determine which is better
  (longer remaining validity = better). Defaults to `0`, which overwrites the
  existing EBR and resets its expiration window.
</ParamField>

<ParamField body="ebrList" type="array">
  Optional. EBR records to add or refresh as part of this scrub. Each record
  applies to the `phoneNumber` it names, which should also appear in
  `phoneList`.

  <Expandable title="EBR Record Object">
    <ParamField body="phoneNumber" type="string" required>
      10-digit phone number(s). For multiple numbers, comma-separate them (e.g., `"5039367187,7075276405"`).
    </ParamField>

    <ParamField body="type" type="string" required>
      EBR type. See [EBR Types](/api-reference/scrub/ebr-list#ebr-types) for the
      full list (e.g., `S` - Sale/Purchase, `I` - Inquiry, `P` - Permission).
    </ParamField>

    <ParamField body="dateOfLastContact" type="string" required>
      Date of last contact in `MM/DD/YYYY` format (e.g., `"11/11/2020"`).
    </ParamField>

    <ParamField body="dateObligationEnds" type="string">
      Date when written obligation ends (New Jersey only).
    </ParamField>

    <ParamField body="referenceNum" type="string">
      Your internal tracking string.
    </ParamField>

    <ParamField body="brand" type="string">
      Company/product/brand name used to establish the EBR.
    </ParamField>

    <ParamField body="email" type="string">
      Email address (100 characters max).
    </ParamField>
  </Expandable>
</ParamField>

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl --location --request POST \
    'https://www.dncscrub.com/app/main/rpc/scrub' \
    --header 'loginId: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "phoneList": "5039367187,7075276405",
      "version": "7",
      "output": "json",
      "keepBetterEBR": 0,
      "ebrList": [
        {
          "phoneNumber": "5039367187",
          "type": "I",
          "dateOfLastContact": "11/11/2020",
          "referenceNum": "OrderID-12345"
        }
      ]
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://www.dncscrub.com/app/main/rpc/scrub", {
    method: "POST",
    headers: {
      loginId: "YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      phoneList: "5039367187,7075276405",
      version: "7",
      output: "json",
      keepBetterEBR: 0,
      ebrList: [
        {
          phoneNumber: "5039367187",
          type: "I",
          dateOfLastContact: "11/11/2020",
          referenceNum: "OrderID-12345",
        },
      ],
    }),
  });

  const results = await response.json();
  results.forEach((result) => {
    console.log(`${result.Phone}: ${result.ResultCode} (EBR: ${result.EBRType})`);
  });
  ```

  ```csharp C# theme={null}
  System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;

  using (var client = new HttpClient())
  {
      client.DefaultRequestHeaders.Add("loginId", "YOUR_API_KEY");

      var requestBody = new
      {
          phoneList = "5039367187,7075276405",
          version = "7",
          output = "json",
          keepBetterEBR = 0,
          ebrList = new[]
          {
              new
              {
                  phoneNumber = "5039367187",
                  type = "I",
                  dateOfLastContact = "11/11/2020",
                  referenceNum = "OrderID-12345"
              }
          }
      };

      var json = System.Text.Json.JsonSerializer.Serialize(requestBody);
      var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");

      var response = await client.PostAsync(
          "https://www.dncscrub.com/app/main/rpc/scrub",
          content
      );
      var responseString = await response.Content.ReadAsStringAsync();
  }
  ```
</CodeGroup>

<ResponseExample>
  ```json Response theme={null}
  [
    {
      "Phone": "5039367187",
      "ResultCode": "E",
      "Reserved": "",
      "Reason": "EBR",
      "RegionAbbrev": "OR",
      "Country": "US",
      "Locale": "Portland",
      "CarrierInfo": "9740;RBOC;\"CenturyLink:CenturyLink\"",
      "NewReassignedAreaCode": "",
      "TZCode": "4",
      "CallingWindow": "",
      "UTCOffset": "-420",
      "DoNotCallToday": "",
      "CallingTimeRestrictions": "4",
      "EBRType": "I",
      "IsWirelessOrVoIP": "0",
      "LineType": "AllOther",
      "EBRExpiresOn": "2021-02-09 23:59:00",
      "WirelessPortDate": "0",
      "VoIPDate": ""
    }
  ]
  ```
</ResponseExample>

## Response Fields

The response is identical to the standard [Scrub](/api-reference/scrub/scrub-multiple#response-fields) response, one row per number in `phoneList`. Because the EBR is written before the scrub result is computed, the result reflects the EBR you submitted.

<ResponseField name="ResultCode" type="string">
  The scrub result code. Numbers with a valid EBR return an EBR-related code such
  as `E`, `F`, `G`, `H`, or `O` (see
  [Output Guide](/api-reference/scrub/output-guide)).
</ResponseField>

<ResponseField name="EBRType" type="string">
  The type of EBR currently on the record (e.g., `I` for Inquiry), or blank if
  the record has no EBR.
</ResponseField>

<ResponseField name="EBRExpiresOn" type="string">
  When the EBR expires, format `YYYY-MM-DD HH:MM:SS`. The earlier of the
  federal and state expiration dates — reflects the EBR you just submitted.
  Empty if no EBR. Requires `version=6` or higher. The time portion is always
  `23:59:00` (end of day) and no timezone is included — treat the value as a
  date and compare against your local calendar date rather than parsing it as a
  UTC timestamp
</ResponseField>

## How It Works

1. Any records in `ebrList` are added or refreshed, honoring `keepBetterEBR`.
2. Every number in `phoneList` is scrubbed against the DNC lists.
3. The scrub result — including any EBR exemption applied in step 1 — is returned.

A number can appear in `phoneList` without a matching `ebrList` entry (scrub only), and you can submit multiple EBR records in one request.

## Best Practices

<AccordionGroup>
  <Accordion title="Submit EBRs Only on Real Contact Events">
    Submit an EBR when an actual business relationship event occurs (an inquiry,
    sale, or grant of permission) — not on every scrub. Re-submitting an EBR for
    the same number repeatedly resets its date of last contact and rolls the
    expiration window forward, which can keep an exemption alive longer than the
    relationship justifies.
  </Accordion>

  <Accordion title="Use keepBetterEBR to Avoid Downgrades">
    Set `keepBetterEBR: 1` to preserve an existing EBR that has longer remaining
    validity instead of overwriting it with a shorter one.
  </Accordion>

  <Accordion title="Use Accurate Dates">
    The `dateOfLastContact` should be the actual date of the business
    relationship event, not the current date.
  </Accordion>

  <Accordion title="Output Format">
    Use `output=csv` for large batches. CSV parsing is more efficient for
    high-volume processing.
  </Accordion>
</AccordionGroup>
