curl -X DELETE https://api.whaapy.com/contacts/v1/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer wha_TU_API_KEY"
const contactId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(
`https://api.whaapy.com/contacts/v1/${contactId}`,
{
method: 'DELETE',
headers: { 'Authorization': 'Bearer wha_TU_API_KEY' }
}
);
const data = await response.json();
console.log(data.success); // true
import requests
contact_id = '550e8400-e29b-41d4-a716-446655440000'
response = requests.delete(
f'https://api.whaapy.com/contacts/v1/{contact_id}',
headers={'Authorization': 'Bearer wha_TU_API_KEY'}
)
print(response.json())
$contactId = '550e8400-e29b-41d4-a716-446655440000';
$ch = curl_init("https://api.whaapy.com/contacts/v1/{$contactId}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer wha_TU_API_KEY'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
{
"success": true,
"message": "Contacto eliminado",
"contact_id": "550e8400-e29b-41d4-a716-446655440000"
}
Contactos
Eliminar Contacto
Elimina un contacto (soft delete)
DELETE
/
contacts
/
v1
/
{id}
curl -X DELETE https://api.whaapy.com/contacts/v1/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer wha_TU_API_KEY"
const contactId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(
`https://api.whaapy.com/contacts/v1/${contactId}`,
{
method: 'DELETE',
headers: { 'Authorization': 'Bearer wha_TU_API_KEY' }
}
);
const data = await response.json();
console.log(data.success); // true
import requests
contact_id = '550e8400-e29b-41d4-a716-446655440000'
response = requests.delete(
f'https://api.whaapy.com/contacts/v1/{contact_id}',
headers={'Authorization': 'Bearer wha_TU_API_KEY'}
)
print(response.json())
$contactId = '550e8400-e29b-41d4-a716-446655440000';
$ch = curl_init("https://api.whaapy.com/contacts/v1/{$contactId}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer wha_TU_API_KEY'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
{
"success": true,
"message": "Contacto eliminado",
"contact_id": "550e8400-e29b-41d4-a716-446655440000"
}
Elimina un contacto de tu base de datos. Esta operación es un soft delete: el contacto se marca como eliminado pero no se borra físicamente.
Esto asegura que:
Comportamiento de soft delete:
- El contacto no aparecerá en listados ni búsquedas
- Las conversaciones históricas se mantienen
- Si el contacto vuelve a escribir por WhatsApp, se restaurará automáticamente
Path Parameters
string
required
UUID del contacto a eliminar
Ejemplos
curl -X DELETE https://api.whaapy.com/contacts/v1/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer wha_TU_API_KEY"
const contactId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(
`https://api.whaapy.com/contacts/v1/${contactId}`,
{
method: 'DELETE',
headers: { 'Authorization': 'Bearer wha_TU_API_KEY' }
}
);
const data = await response.json();
console.log(data.success); // true
import requests
contact_id = '550e8400-e29b-41d4-a716-446655440000'
response = requests.delete(
f'https://api.whaapy.com/contacts/v1/{contact_id}',
headers={'Authorization': 'Bearer wha_TU_API_KEY'}
)
print(response.json())
$contactId = '550e8400-e29b-41d4-a716-446655440000';
$ch = curl_init("https://api.whaapy.com/contacts/v1/{$contactId}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer wha_TU_API_KEY'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
Respuesta Exitosa
{
"success": true,
"message": "Contacto eliminado",
"contact_id": "550e8400-e29b-41d4-a716-446655440000"
}
Errores
{
"error": "not_found",
"message": "Contacto no encontrado"
}
{
"error": "validation_error",
"message": "ID de contacto inválido"
}
Webhooks
Cuando eliminas un contacto, se dispara el webhookcontact.deleted:
{
"event": "contact.deleted",
"data": {
"contact_id": "550e8400-e29b-41d4-a716-446655440000",
"phone_number": "+5215512345678",
"deleted_at": "2026-01-28T12:00:00Z"
}
}
Restauración Automática
Si un contacto eliminado vuelve a enviar un mensaje por WhatsApp, Whaapy lo restaura automáticamente con todos sus datos anteriores.
- No pierdas contexto de clientes que vuelven
- El historial de conversaciones se mantiene intacto
- Los tags y campos personalizados se preservan
Eliminación Masiva
Para eliminar múltiples contactos a la vez, usa la API de operaciones masivas:{
"operation": "delete",
"contact_ids": [
"uuid-1",
"uuid-2",
"uuid-3"
]
}
Próximos Pasos
Operaciones Masivas
Eliminar múltiples contactos
Listar Contactos
Ver contactos activos
Crear Contacto
Agregar nuevo contacto
Webhooks
Ver eventos disponibles
Was this page helpful?