API
Anmelden
Dokumentation › Kontakte › Kontakt löschen
DELETE

Kontakt löschen

DELETEhttps://app.sendapp.ai/api/contacts/{id}
Löscht einen einzelnen Kontakt anhand der ID. Nur Kontakte, die zu Ihrem Konto gehören, können gelöscht werden — jede andere ID gibt 404 zurück.
Parameter
apikey erforderlich
La tua API Key (anche header X-API-Key).
id erforderlich
Kontakt-ID (Ganzzahl, im Pfad). Verwenden Sie GET /api/contacts, um sie zu finden.
Anfrage
curl -X DELETE 'https://app.sendapp.ai/api/contacts/42' \
  -H 'X-API-Key: YOUR_API_KEY'
<?php
$ch = curl_init('https://app.sendapp.ai/api/contacts/42');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => ['X-API-Key: YOUR_API_KEY'],
]);
echo curl_exec($ch);
curl_close($ch);
const res = await fetch('https://app.sendapp.ai/api/contacts/42', {
  method: 'DELETE',
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
console.log(await res.json());
Antwort (200 OK)
{
  "status": "success",
  "message": "Contact deleted."
}
Fehler
{
  "status": "error",
  "message": "Contact not found."
}