# POST /api/v1/transactions/batch/delete

> Delete selected transactions

- **Tag:** transactions
- **Operation ID:** `bulk_delete_transactions_api_v1_transactions_batch_delete_post`

## Description

Permanently delete manual/bulk-uploaded transactions, hard-delete Plaid transactions on the Teal engine (via Teal API), or soft-delete (hide) Plaid transactions on the DayZero local engine, by explicit IDs.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Request body

Schema: `TransactionBulkDeleteRequest`

- `transaction_ids` (array · string · required) — Array of transaction UUIDs to delete or hide.

## Responses

### 201 — Successful Response

Schema: `TransactionBulkDeleteResponse`

- `deleted` (integer) — Manual/bulk-upload rows permanently removed.
- `hidden` (integer) — Plaid rows soft-deleted (hidden) on the local engine.
- `failed` (array · TransactionBulkDeleteFailure) → `TransactionBulkDeleteFailure` — Rows that could not be deleted, with reasons.
  - `transaction_id` (string · required) — Transaction UUID that failed.
  - `message` (string · required) — Human-readable failure reason.

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X POST 'https://api.ondayzero.com/api/v1/transactions/batch/delete' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "transaction_ids": []
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/transactions/batch/delete', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "transaction_ids": []
}),
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {
  "transaction_ids": []
}

response = httpx.post("https://api.ondayzero.com/api/v1/transactions/batch/delete", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/transactions/bulk-delete-transactions
- OpenAPI slice: https://www.ondayzero.com/docs/reference/transactions/bulk-delete-transactions/openapi.json
- Other endpoints in **transactions**: https://www.ondayzero.com/docs/reference/transactions
