# Bulk delete integrated accounts

> Source: https://truto.one/docs/api-reference/admin/integrated-accounts/bulk-delete/

`POST /integrated-account/bulk-delete`

Resource: **Integrated accounts**

## Request body

- **`query`** _(object)_
  The query to filter the integrated accounts by. This supports the same set of filters as the List endpoint. Specify the filters as an object.
- **`dry_run`** _(boolean)_
  Whether to perform a dry run of the batch job or not. In a dry run, the integrated accounts are not deleted, but the results are sent via the webhooks.

## Response body

- **`success`** _(boolean)_

## Code examples

### curl

```bash
curl -X POST 'https://api.truto.one/integrated-account/bulk-delete' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "query": "{\n  \"tenant_id\": \"acme-1\"\n}\n",
  "dry_run": false
}'
```

### JavaScript

```javascript
const body = {
  "query": "{\n  \"tenant_id\": \"acme-1\"\n}\n",
  "dry_run": false
};

const response = await fetch('https://api.truto.one/integrated-account/bulk-delete', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/integrated-account/bulk-delete"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "query": "{\n  \"tenant_id\": \"acme-1\"\n}\n",
    "dry_run": False
}

response = requests.post(url, headers=headers, params=params, json=payload)
print(response.json())
```
