API
Accedi
Documentazione › Contatti › Elimina contatti in blocco
DELETE

Elimina contatti in blocco

DELETEhttps://app.sendapp.ai/api/contacts/bulk
Elimina molti contatti in una chiamata. Gli ID che non appartengono al tuo account vengono ignorati silenziosamente e conteggiati come not_found — nessuna fuga di dati cross-account è possibile.
Parametri
apikey obbligatorio
La tua API Key (anche header X-API-Key).
ids obbligatorio
Array di ID contatto (interi). Max 10.000 per chiamata.
Richiesta
curl -X DELETE 'https://app.sendapp.ai/api/contacts/bulk' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "ids": [12, 34, 56, 78] }'
<?php
$ch = curl_init('https://app.sendapp.ai/api/contacts/bulk');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => ['X-API-Key: YOUR_API_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode(['ids' => [12, 34, 56, 78]]),
]);
echo curl_exec($ch);
curl_close($ch);
const res = await fetch('https://app.sendapp.ai/api/contacts/bulk', {
  method: 'DELETE',
  headers: { 'X-API-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({ ids: [12, 34, 56, 78] })
});
console.log(await res.json());
Risposta (200 OK)
{
  "status": "success",
  "requested": 3,
  "deleted": 2,
  "not_found": 1
}
Errore
{
  "status": "error",
  "message": "Error deleting contacts."
}