curl --fail-with-body --max-time 30 -i -X DELETE "https://api.freshtalent.ai/v1/lists/hot" \
-H "Authorization: Bearer $FRESHTALENT_API_KEY"
const response = await fetch("https://api.freshtalent.ai/v1/lists/hot", {
method: "DELETE",
signal: AbortSignal.timeout(30_000), headers: { Authorization: `Bearer ${process.env.FRESHTALENT_API_KEY}` },
});
if (!response.ok && response.status !== 404) {
throw new Error(`${response.status}: ${await response.text()}`);
}
console.log(response.status === 204 ? "deleted" : "already absent");
import os
from urllib.error import HTTPError
from urllib.request import Request, urlopen
request = Request(
"https://api.freshtalent.ai/v1/lists/hot",
method="DELETE",
headers={"Authorization": f"Bearer {os.environ['FRESHTALENT_API_KEY']}"},
)
try:
with urlopen(request, timeout=30) as response:
print(response.status) # 204
except HTTPError as error:
if error.code != 404:
raise
print("already absent")
Delete list
Permanently delete a custom list and its memberships.
DELETE
/
lists
/
{id}
curl --fail-with-body --max-time 30 -i -X DELETE "https://api.freshtalent.ai/v1/lists/hot" \
-H "Authorization: Bearer $FRESHTALENT_API_KEY"
const response = await fetch("https://api.freshtalent.ai/v1/lists/hot", {
method: "DELETE",
signal: AbortSignal.timeout(30_000), headers: { Authorization: `Bearer ${process.env.FRESHTALENT_API_KEY}` },
});
if (!response.ok && response.status !== 404) {
throw new Error(`${response.status}: ${await response.text()}`);
}
console.log(response.status === 204 ? "deleted" : "already absent");
import os
from urllib.error import HTTPError
from urllib.request import Request, urlopen
request = Request(
"https://api.freshtalent.ai/v1/lists/hot",
method="DELETE",
headers={"Authorization": f"Bearer {os.environ['FRESHTALENT_API_KEY']}"},
)
try:
with urlopen(request, timeout=30) as response:
print(response.status) # 204
except HTTPError as error:
if error.code != 404:
raise
print("already absent")
Deletes one custom list for the authenticated organization. The database foreign key cascades to
list_memberships, so all memberships in the list are deleted with it. This does not delete the underlying people or any membership those people have on a Target or another list.
If a person was visible to Monitoring only through this list, deleting the list removes that list-based tracking membership. A Target membership continues to be tracked independently.
string
required
List UUID or case-insensitive name. Use the UUID to avoid ambiguity when names collide.
Response
204 No Content with an empty body. There is no response JSON, pagination metadata, or next link.
curl --fail-with-body --max-time 30 -i -X DELETE "https://api.freshtalent.ai/v1/lists/hot" \
-H "Authorization: Bearer $FRESHTALENT_API_KEY"
const response = await fetch("https://api.freshtalent.ai/v1/lists/hot", {
method: "DELETE",
signal: AbortSignal.timeout(30_000), headers: { Authorization: `Bearer ${process.env.FRESHTALENT_API_KEY}` },
});
if (!response.ok && response.status !== 404) {
throw new Error(`${response.status}: ${await response.text()}`);
}
console.log(response.status === 204 ? "deleted" : "already absent");
import os
from urllib.error import HTTPError
from urllib.request import Request, urlopen
request = Request(
"https://api.freshtalent.ai/v1/lists/hot",
method="DELETE",
headers={"Authorization": f"Bearer {os.environ['FRESHTALENT_API_KEY']}"},
)
try:
with urlopen(request, timeout=30) as response:
print(response.status) # 204
except HTTPError as error:
if error.code != 404:
raise
print("already absent")
Errors and retry safety
400(invalid_request): when using the platform API key, provide a validX-FreshTalent-Org-IdUUID.401(unauthorized): provide a valid API key.402(payment_required): restore entitlement.403(forbidden): the list is Gateway-managed (is_default: true) and cannot be deleted.404(not_found): no matching list exists in the organization.429or5xx: the outcome can be unknown. Reconcile with List lists before retrying. Once deletion has succeeded, a repeat returns404, so clients that want delete-if-present semantics can treat a confirmed404as already complete.