curl --fail-with-body --max-time 30 -X DELETE "https://api.freshtalent.ai/v1/targets/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer $FRESHTALENT_API_KEY"
const id = "550e8400-e29b-41d4-a716-446655440000";
const response = await fetch(`https://api.freshtalent.ai/v1/targets/${id}`, {
method: "DELETE",
signal: AbortSignal.timeout(30_000), headers: { Authorization: `Bearer ${process.env.FRESHTALENT_API_KEY}` },
});
if (response.status !== 204) {
const body = await response.text();
throw new Error(`${response.status}: ${body}`);
}
import os
import urllib.error
import urllib.request
request = urllib.request.Request(
"https://api.freshtalent.ai/v1/targets/550e8400-e29b-41d4-a716-446655440000",
method="DELETE",
headers={"Authorization": f"Bearer {os.environ['FRESHTALENT_API_KEY']}"},
)
with urllib.request.urlopen(request, timeout=30) as response:
assert response.status == 204
Delete target
Delete a Target, cancel its active jobs, and release exclusive graph audience membership.
DELETE
/
targets
/
{id}
curl --fail-with-body --max-time 30 -X DELETE "https://api.freshtalent.ai/v1/targets/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer $FRESHTALENT_API_KEY"
const id = "550e8400-e29b-41d4-a716-446655440000";
const response = await fetch(`https://api.freshtalent.ai/v1/targets/${id}`, {
method: "DELETE",
signal: AbortSignal.timeout(30_000), headers: { Authorization: `Bearer ${process.env.FRESHTALENT_API_KEY}` },
});
if (response.status !== 204) {
const body = await response.text();
throw new Error(`${response.status}: ${body}`);
}
import os
import urllib.error
import urllib.request
request = urllib.request.Request(
"https://api.freshtalent.ai/v1/targets/550e8400-e29b-41d4-a716-446655440000",
method="DELETE",
headers={"Authorization": f"Bearer {os.environ['FRESHTALENT_API_KEY']}"},
)
with urllib.request.urlopen(request, timeout=30) as response:
assert response.status == 204
Deletes the Target in the authenticated organization’s scope. This is destructive and cannot be undone through the API.
No query parameters or body.
Request
string
required
Target UUID.
Response
204 No Content with an empty body means the Target was deleted. There is no response JSON, data object, or pagination metadata.
Side effects and lifecycle
The service:- Marks this Target’s
pendingandrunningingest jobs asfailedwith errorwatch deleted. - Finds members that are exclusive to this Target within the organization and releases their graph audience access.
- Deletes the Target. Its
watch_membersrows cascade from the foreign key, and jobs retain a nullable reference.
source_watch_id is set to null by the foreign key. Do not assume deleting a Target removes every List-based event-visibility path. The route does not promise deletion of global person/profile data, and it does not delete another Target or its members.
There is no soft-delete or undo endpoint. If you need to preserve a Target’s query, call Get target first and save its query.
Examples
curl --fail-with-body --max-time 30 -X DELETE "https://api.freshtalent.ai/v1/targets/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer $FRESHTALENT_API_KEY"
const id = "550e8400-e29b-41d4-a716-446655440000";
const response = await fetch(`https://api.freshtalent.ai/v1/targets/${id}`, {
method: "DELETE",
signal: AbortSignal.timeout(30_000), headers: { Authorization: `Bearer ${process.env.FRESHTALENT_API_KEY}` },
});
if (response.status !== 204) {
const body = await response.text();
throw new Error(`${response.status}: ${body}`);
}
import os
import urllib.error
import urllib.request
request = urllib.request.Request(
"https://api.freshtalent.ai/v1/targets/550e8400-e29b-41d4-a716-446655440000",
method="DELETE",
headers={"Authorization": f"Bearer {os.environ['FRESHTALENT_API_KEY']}"},
)
with urllib.request.urlopen(request, timeout=30) as response:
assert response.status == 204
Errors and recovery
401 unauthorized,402 payment_required, and platform-key400 invalid_requesthave the shared authentication/access meanings.404 not_foundmeans the Target was not found in the authenticated organization. A second delete after a successful delete also returns404; treat that as already absent only if your workflow can safely reconcile it.429/5xx: do not blindly repeat a destructive request after a timeout. First List targets or Get target. If the Target is absent, the desired state is already reached; otherwise investigate before retrying.
Next
- List targets to verify that the Target is absent.
- Create target to create a new Target from a saved query or input.