# How to bulk delete contacts

{% hint style="info" %}
Note: You will need to have data flows enabled for this in your workspace
{% endhint %}

This article covers how you can bulk delete contacts in Bird using a file upload.

* Go to **Settings > AI and Automation > Data flows.**
* Create a new data flow with following source and destination

1. **Source:** CSV Upload
2. **Destination:** Delete contact

<figure><img src="/files/TNjBYp58d75cPDM2rs48" alt="" width="375"><figcaption></figcaption></figure>

* Once created, go to **Configuration > Source** (left-hand panel)
* you can upload a csv containing either email, phone or contact IDs to be deleted
* You can export contacts from a list or segment or the contacts page, and upload here in the data flow.&#x20;

<figure><img src="/files/FjcJ1f7MzymyfhDme37Y" alt=""><figcaption></figcaption></figure>

* Click on **Save Configuration** after upload
* Move to **Transformation** section and click on **Open transformation editor**

<figure><img src="/files/ifDXHJZsGyTRZtIyTZHp" alt=""><figcaption></figcaption></figure>

* Then, click on **JSONata** under Transformation

<figure><img src="/files/CbovAGP7OrzoPBc9rYwb" alt=""><figcaption></figcaption></figure>

#### Adding JSONata

* You will need to add the following in JSONATA expression if your key identifier is phonenumber:

```jsonata
{
 "identifierKey": "phonenumber",
 "identifierValue": $.Phone
}
```

* If your key identifier is email, then use below

```
{
 "identifierKey": "emailaddress",
 "identifierValue": $.Email
}
```

* You can also delete contacts based on simply Contact ID irrespective of any identifier, in this case you would need to change the column name on csv to **Id** and use below:

```
{
 "contactId": $.Id
}
```

Once done click on **Save.**

**Enable and Run the data flow**

* Click on **Enabled** and then click on **Run Now**
* You can **Edit data flow** to upload more files under Source and then again click on **Save configuration > Run Now**.

<figure><img src="/files/XvvhCMa09KEgdmI98et6" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/applications/audience/contacts/how-to/how-to-bulk-delete-contacts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
