---
title: "Mass unassign leads"
method: PUT
path: "/{sub_domain}/api/campaign-leads/mass-unassign"
tags: ["Campaign-Leads"]
---

# Mass unassign leads

`PUT /{sub_domain}/api/campaign-leads/mass-unassign`

## Request

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

Remove many leads from a campaign in a single request.

**When to use.** Take a set of leads off a campaign without deleting the leads themselves. This is the reverse of `PUT /campaign-leads/mass-assign`.

**Parameters.**

- `campaign_id` (integer, required): the campaign to unassign the matched leads from.
- `where` (object, required): conditions selecting the leads to unassign, typically by their `id` values. Each value may be a single value (exact match) or an array (matches any of the listed values).

**Returns.** `204 No Content` on success.

**Example.**

```json
{ "campaign_id": 12, "where": { "id": [1, 2, 3] } }
```

## Path parameters

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

## Request body

- MassUnassignInput
  - `campaign_id` integer, required: Campaign to unassign the matched leads from.
  - `where` IdsWhereClause, required
    - `id` unknown[], nullable: Lead IDs.
      - unknown

## Response `204`

Successful Response

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