Documentation ›
Contacts › Remove tag
DELETE
Remove tag
DELETEhttps://app.sendapp.ai/api/contacts/{id}/tags
Rimuove uno o più tag da un contatto. I tag che il contatto non ha vengono ignorati.
Parameters
apikey
required
La tua API Key (anche header
X-API-Key).
id
required
Contact ID (integer, in the path). Use
GET /api/contacts to find it.
tags
required
Array o stringa di tag separati da virgole.
Request
curl -X DELETE 'https://app.sendapp.ai/api/contacts/42/tags' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ "tags": ["newsletter"] }'<?php
$ch = curl_init('https://app.sendapp.ai/api/contacts/42/tags');
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(['tags' => ['newsletter']]),
]);
echo curl_exec($ch);
curl_close($ch);const res = await fetch('https://app.sendapp.ai/api/contacts/42/tags', {
method: 'DELETE',
headers: { 'X-API-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({ tags: ['newsletter'] })
});
console.log(await res.json());Response (200 OK)
{
"status": "success",
"removed": ["newsletter"],
"tags": ["cliente", "vip"],
"contact": { "id": 42, "...": "..." }
}Error
{
"status": "error",
"message": "Contact not found."
}