Dokumentation ›
Kontakte › Kontakte im Stapel löschen
DELETE
Kontakte im Stapel löschen
DELETEhttps://app.sendapp.ai/api/contacts/bulk
Löscht viele Kontakte in einem Aufruf. IDs, die nicht zu Ihrem Konto gehören, werden stillschweigend ignoriert und als not_found gezählt — es ist kein kontoübergreifendes Datenleck möglich.
Parameter
apikey
erforderlich
La tua API Key (anche header
X-API-Key).
ids
erforderlich
Array von Kontakt-IDs (Ganzzahlen). Max. 10.000 pro Aufruf.
Anfrage
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());Antwort (200 OK)
{
"status": "success",
"requested": 3,
"deleted": 2,
"not_found": 1
}Fehler
{
"status": "error",
"message": "Error deleting contacts."
}