> ## 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.

# Handling Opt-Outs and Opt-Ins

> How Internal DNC and Permission EBR records work together when a consumer opts out and later opts back in

Consumers change their minds. A person may ask to be placed on your Do Not Call
list today and opt back in next month through a web form. This guide explains
how DNCScrub's Internal DNC list and EBR/Consent records work together so the
scrub result always reflects the consumer's **most recent** choice — and the
exact API calls to make for each event.

## The two lists involved

| List                    | What it represents                                                                                | API                                                    |
| ----------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| **Internal DNC (IDNC)** | The consumer asked *your organization* not to call them                                           | [Internal DNC List](/api-reference/scrub/internal-dnc) |
| **EBR / Consent**       | You have an exemption to DNC rules — a purchase, an inquiry, or the consumer's express permission | [EBR and Consent](/api-reference/scrub/ebr-list)       |

A phone number can have records on **both** lists at the same time. When that
happens, the scrubber decides which one wins using the rules below.

<Note>
  **Use a Permission (`P`) EBR for opt-ins backed by express written consent** —
  for example, a signed web consent form, a checked consent box with the
  required disclosures, or a recorded verbal agreement where allowed. Sale
  (`S`) and Inquiry (`I`) EBRs represent business activity, not consent, and
  they do **not** override an Internal DNC entry.
</Note>

## How the scrubber decides: dates matter

When a number is on your Internal DNC list *and* has a Permission EBR, the
scrubber compares dates:

* If the Permission EBR's `dateOfLastContact` (the consent date) is **later**
  than the date the number was added to your Internal DNC list, the consent
  wins. The number is returned as callable with an **EBR Override** result
  code (`O`).
* If the Internal DNC entry is **newer** than the consent, the opt-out wins and
  the number is returned as Internal DNC (`P` result code) — not callable.

In other words: **the most recent expression of the consumer's intent wins**,
as long as the dates you send are accurate.

<Warning>
  Sale and Inquiry EBRs never override an Internal DNC entry, regardless of
  dates. Only a Permission EBR — express consent — can do that.
</Warning>

## Recommended lifecycle

A typical sequence, using a consumer who opts out through your dialer or CRM
disposition and later opts back in through a web consent form:

<Steps>
  <Step title="Consumer opts out (e.g., dispositioned as DNC in your dialer)">
    Add the number to your Internal DNC list:

    ```bash theme={null}
    curl --request GET \
      'https://www.dncscrub.com/app/main/rpc/pdnc?phoneList=5039367187&actionType=add' \
      --header 'loginId: YOUR_API_KEY'
    ```

    Scrubs now return the number as Internal DNC (`P`) — do not call.
  </Step>

  <Step title="Consumer opts back in (express written consent on a web form)">
    Do **two** things:

    **1. Add a Permission EBR** with `dateOfLastContact` set to the actual
    date the consumer gave consent:

    ```bash theme={null}
    curl --request POST 'https://www.dncscrub.com/app/main/rpc/ebr' \
      --header 'loginId: YOUR_API_KEY' \
      --header 'Content-Type: application/json' \
      --data '{
        "ebrList": [
          {
            "phoneNumber": "5039367187",
            "type": "P",
            "dateOfLastContact": "07/15/2026",
            "referenceNum": "consent-form-84213"
          }
        ]
      }'
    ```

    **2. Remove the number from your Internal DNC list:**

    ```bash theme={null}
    curl --request GET \
      'https://www.dncscrub.com/app/main/rpc/pdnc?phoneList=5039367187&actionType=remove' \
      --header 'loginId: YOUR_API_KEY'
    ```

    Scrubs now return the number as callable under the Permission EBR.
  </Step>

  <Step title="Consumer opts out again later">
    Add the number back to your Internal DNC list (same call as step 1). The
    new Internal DNC entry is dated later than the consent, so the opt-out
    wins again.
  </Step>
</Steps>

## Why remove the Internal DNC entry on opt-in?

Strictly speaking, a Permission EBR dated after the Internal DNC entry already
overrides it — the scrubber's date comparison handles that. But we still
recommend removing the Internal DNC entry when the consumer opts back in, for
one important reason:

**Adding a number that is already on your Internal DNC list does not refresh
its added-on date.** The add is idempotent — the record keeps its original
date. So if you leave the stale Internal DNC entry in place and the consumer
later opts out *again*, your new "add" would be a no-op against the old entry,
the Permission EBR would still look newer, and the number would keep scrubbing
as callable. That is a compliance risk.

Removing the entry on opt-in and adding a fresh one on the next opt-out keeps
the dates truthful in both directions.

<Tip>
  Keep the Permission EBR in place when the consumer opts out again — there is
  no need to delete it. The newer Internal DNC entry takes precedence, and the
  EBR record preserves your audit trail of the earlier consent.
</Tip>

## Rules of thumb

* **Opt-out** → add to Internal DNC.
* **Opt-in with express written consent** → add a Permission (`P`) EBR *and*
  remove the number from Internal DNC.
* **Purchase or inquiry** → add a Sale (`S`) or Inquiry (`I`) EBR. These
  create DNC exemptions for numbers on the National/state registries but never
  override your Internal DNC list.
* **Always send true event dates.** `dateOfLastContact` must be the date
  consent was actually given — not the date you happened to load the record.
  The scrubber's precedence logic is only as accurate as the dates you send,
  so load opt-outs and opt-ins promptly.
* **Keep records for your audit trail.** Use `referenceNum` on EBR records to
  tie the consent back to the form submission or recording that proves it.
