# Bulk Delete Threads

> Delete up to 100 threads in one call.

Requires an API key with the `write` scope.

The threads are removed at once and each deletion writes an audit entry. Removing the messages from the mailboxes runs in the background and is best-effort. Ids that are not in this workspace are skipped. This cannot be undone.

## Body Parameters

<ParamField body="ids" type="string[]" required>
  Thread identifiers, 1 to 100.
</ParamField>

## Response

Returns `{ "data": { "deleted": 2 } }`.

<RequestExample>
```bash cURL
curl -X POST "https://api.foxreach.io/api/v1/inbox/threads/bulk-delete" \
  -H "X-API-Key: otr_your_key" \
  -H "Content-Type: application/json" \
  -d '{"ids": ["rpl_abc123", "rpl_def456"]}'
```

```python Python SDK
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
result = client.inbox.bulk_delete(["rpl_abc123", "rpl_def456"])
```

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

const client = new FoxReach({ apiKey: "otr_your_key" });
const result = await client.inbox.bulkDelete(["rpl_abc123", "rpl_def456"]);
```

</RequestExample>

<ResponseExample>
```json
{ "data": { "deleted": 2 } }
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `write` |
| `422` | `ids` is empty or has more than 100 items |

## Rate Limit

- **100 requests per minute, shared by every `bulk` 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` (`bulk`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns, see [Rate Limiting](/rate-limiting).
