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

# Do Not Call (DNC)

> Platform blocklist for API outbound calls — with examples.

## What DNC means

**DNC** = **Do Not Call**. In Ondial it is a **phone number blocklist** for your account (and any platform-wide entries ops add).

Before the Public API arms an **outbound call**, Ondial checks this list. If the lead’s number is listed, the request fails with:

```json theme={"system"}
{
  "error": "…",
  "reasonCode": "dnc_blocked"
}
```

HTTP status: **422**. No PSTN dial is queued.

Manage the list in the dashboard: **API Access → Do Not Call**.

## Consent vs DNC

| Check   | Meaning                                                      | Failure code      |
| ------- | ------------------------------------------------------------ | ----------------- |
| Consent | You assert permission to call (`consent.outboundCall: true`) | `consent_missing` |
| DNC     | Number must never be called via API                          | `dnc_blocked`     |

A live API **call** needs **both**: consent present **and** number not on DNC.

## Examples

### 1. Call blocked by DNC

CRM posts a call lead for a number you previously added to DNC:

```bash theme={"system"}
curl -sS -X POST "$ONDIAL_BASE_URL/api/v1/leads" \
  -H "Authorization: Bearer $ONDIAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "campaignId": "YOUR_CAMPAIGN_ID",
    "phone": "+919876543210",
    "channel": "call",
    "consent": {
      "outboundCall": true,
      "capturedAt": "2026-08-11T10:00:00Z",
      "source": "crm"
    }
  }'
```

Response when `+919876543210` is on DNC:

```json theme={"system"}
{
  "error": "Number is on Do Not Call list",
  "reasonCode": "dnc_blocked"
}
```

### 2. WhatsApp-only (no PSTN dial)

```json theme={"system"}
{
  "campaignId": "YOUR_CAMPAIGN_ID",
  "phone": "+919876543210",
  "channel": "whatsapp"
}
```

DNC is aimed at the **call** path. Messaging-only requests follow WhatsApp/email rules (templates, unsubscribe), not a live phone dial.

### 3. Consent missing (number not on DNC)

```json theme={"system"}
{
  "campaignId": "YOUR_CAMPAIGN_ID",
  "phone": "+919811122233",
  "channel": "call"
}
```

Typical failure:

```json theme={"system"}
{
  "error": "…",
  "reasonCode": "consent_missing"
}
```

## Platform DNC vs national NDNC

|               | Ondial DNC (this product)               | National NDNC / DND registries                    |
| ------------- | --------------------------------------- | ------------------------------------------------- |
| What          | Your (and platform) blocklist in Ondial | Government / carrier registries (e.g. India NDNC) |
| Where managed | Dashboard **API Access → Do Not Call**  | External legal/ops integration                    |
| Enforced on   | Public API call arming                  | Only if separately wired (business decision)      |

## When to add numbers

* Customer opted out of calls
* Wrong number / harassment complaint
* Legal hold
* Internal numbers that must never be live-dialed

Remove a tenant entry from the same UI when policy allows calling again.
