Documentation ›
Contacts › Supprimer un contact
DELETE
Supprimer un contact
DELETEhttps://app.sendapp.ai/api/contacts/{id}
Supprime un seul contact par ID. Seuls les contacts appartenant à votre compte peuvent être supprimés — tout autre ID renvoie 404.
Paramètres
apikey
obligatoire
La tua API Key (anche header
X-API-Key).
id
obligatoire
ID du contact (entier, dans le chemin). Utilisez
GET /api/contacts pour le trouver. Requête
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());Réponse (200 OK)
{
"status": "success",
"message": "Contact deleted."
}Erreur
{
"status": "error",
"message": "Contact not found."
}