---
title: "Mass approve or unapprove DNC"
method: POST
path: "/{sub_domain}/api/dnc/mass"
tags: ["DNCs"]
---

# Mass approve or unapprove DNC

`POST /{sub_domain}/api/dnc/mass`

## Request

- Base URL: `https://api.commpeak.com/dialer`
- URL: `https://api.commpeak.com/dialer/{sub_domain}/api/dnc/mass`
- Auth: API key in header `Authorization`

Approve or unapprove many Do Not Call (DNC) entries in a single request, and optionally create any that do not exist yet.

**When to use.** Update the approval status of many numbers at once. For a single number, use `POST /dnc` to add one, or the `{id}/approve` and `{id}/unapprove` endpoints to change one entry.

**Request body.**

- `dnc` (array, required): the entries to process. Each item has:
    - `phone` (string, required): the phone number.
    - `approved` (integer, required): target approval status, 0 for unapproved or 1 for approved.
    - `country_iso` (string): the two-letter country code (for example `US`) used to normalize the number.
    - `permanent` (integer): whether the entry is permanent, 0 for no or 1 for yes.
- `create_missing` (boolean): set to true to create entries that are not found. A number is created only when it can be normalized.

**Returns.** `{ "dnc": [ ... ] }` with one processed entry per input item. Returns an error if the `dnc` list is empty, or an item is missing its `approved` value.

**Example.** `{ "create_missing": true, "dnc": [ { "phone": "12125551234", "country_iso": "US", "approved": 1 } ] }`

## Path parameters

- `sub_domain` string, required: Dialer Name (subdomain)

## Request body

- MassDNCInput
  - `create_missing` boolean, nullable: Set to true to create DNC entries that do not yet exist.
  - `dnc` MassDNCEntry[], required: Array of DNC entries to process.
    - `phone` string, required: Phone number for the DNC entry.
    - `country_iso` string, required: Country ISO2 code for the phone number.
    - `approved` integer, nullable: Approval status: 0 = unapproved, 1 = approved.
    - `permanent` integer, nullable: Permanence status: 0 = no, 1 = yes.

## Response `200`

Successful Response

- DNCResponse
  - `dnc` DNCItem[], required
    - `id` integer, nullable: DNC ID.
    - `phone` string, nullable: DNC phone number.
    - `lead_id` integer, nullable: Lead ID that the DNC was created from.
    - `campaign_lead_id` integer, nullable: Campaign Lead ID that the DNC was created from, can be null.
    - `approved` integer, nullable: Whether the DNC is approved: 0 = unapproved, 1 = approved.
    - `approved_by_user_id` integer, nullable: ID of the user who approved the DNC.
    - `permanent` integer, nullable: Whether the DNC is permanent: 0 = no, 1 = yes.
    - `first_name` string, nullable: Lead's first name.
    - `last_name` string, nullable: Lead's last name.
    - `username` string, nullable: Username of the user who approved the DNC.
    - `phone_normalized` string, nullable: Lead's phone number normalized.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/commpeak/apis/commpeak-dialer-api.md) - [All operations](https://skmtc.dev/commpeak/apis/commpeak-dialer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/commpeak/apis/commpeak-dialer-api/revisions/18c5edc07544?raw)
