---
title: Deletar TODOS os Contatos
slug: deletar-todos-os-contatos
docTags: 
createdAt: 2024-07-19T17:26:30.657Z
---

:::hint{type="danger"}
Repita quantas vezes forem necessárias para que todos sejam excluídos

Isto pode levar horas dependendo da quantidade de mensagens e tickets

Faça por conta e risco e de preferência fora do horário comercial!
:::



```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://{BACKEND_URL}/contacts-delete',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'Authorization: seutokenaqui'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

```json
{
    "message": "All Contacts has been deleted!"
}
```

