# Bulk Delete Impact

> Preview which running campaigns would lose leads if these leads were deleted.

Requires an API key with the `read` scope.

Read only. Counts the leads that are still in a running sequence, per campaign, and how many running leads each campaign keeps. Nothing is changed.

## Body Parameters

<ParamField body="leadIds" type="string[]">Lead IDs, up to 50,000. Send this or `filter`, not both.</ParamField>
<ParamField body="filter" type="object">Select leads by filter instead. Keys: `search`, `status`, `tags` (comma separated; a lead must carry all of them), `provider`, `interestStatus`, `labelId`. Matches at most 50,000 leads, newest first.</ParamField>

## Response

<ResponseField name="data" type="object">
  <Expandable title="data">
    <ResponseField name="campaigns" type="array">One entry per affected campaign: `id`, `name`, `status`, `leads` (how many of the selected leads are still running there) and `leftAfter` (running leads it would keep; `0` means the delete empties it).</ResponseField>
    <ResponseField name="leadsInCampaigns" type="integer">Total of `leads` across the campaigns.</ResponseField>
    <ResponseField name="leadCount" type="integer">Leads the selection resolved to.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
```bash cURL
curl -X POST "https://api.foxreach.io/api/v1/leads/bulk/delete/impact" \
  -H "X-API-Key: otr_your_key" \
  -H "Content-Type: application/json" \
  -d '{"filter": {"tags": "old-list"}}'
```

```python Python SDK
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
impact = client.leads.bulk_delete_impact(filter={"tags": "old-list"})
```

```typescript TypeScript SDK
import { FoxReach } from "foxreach";

const client = new FoxReach({ apiKey: "otr_your_key" });
const impact = await client.leads.bulkDeleteImpact({ filter: { tags: "old-list" } });
```
</RequestExample>

<ResponseExample>
```json
{
  "data": {
    "campaigns": [
      { "id": "cmcamp1", "name": "Q4 outreach", "status": "active", "leads": 312, "leftAfter": 0 }
    ],
    "leadsInCampaigns": 312,
    "leadCount": 480
  }
}
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `read` |
| `422` | Neither or both of `leadIds` and `filter` were sent |

## Rate Limit

- **300 requests per minute, shared by every `read` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`read`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns (`Retry-After`, exponential backoff, monitoring `X-RateLimit-Remaining`), see [Rate Limiting](/rate-limiting).
