curl --fail-with-body --max-time 30 -X POST "https://api.freshtalent.ai/v1/targets/550e8400-e29b-41d4-a716-446655440000/retry" \
-H "Authorization: Bearer $FRESHTALENT_API_KEY"
const id = "550e8400-e29b-41d4-a716-446655440000";
const response = await fetch(`https://api.freshtalent.ai/v1/targets/${id}/retry`, {
method: "POST",
signal: AbortSignal.timeout(30_000), headers: { Authorization: `Bearer ${process.env.FRESHTALENT_API_KEY}` },
});
const body = await response.json();
if (response.status !== 202) throw new Error(`${response.status}: ${JSON.stringify(body)}`);
console.log(body.data.job.id, body.data.job.status);
import json
import os
import urllib.request
request = urllib.request.Request(
"https://api.freshtalent.ai/v1/targets/550e8400-e29b-41d4-a716-446655440000/retry",
method="POST",
headers={"Authorization": f"Bearer {os.environ['FRESHTALENT_API_KEY']}"},
)
with urllib.request.urlopen(request, timeout=30) as response:
body = json.load(response)
print(body["data"]["id"], body["data"]["job"]["status"]) # inspect progress, do not assert it is still queued
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"kind": "people",
"name": "Palantir FDE leavers",
"linkedin_url": null,
"auto_admit": false,
"watching_count": 12,
"proposed_count": 5,
"excluded_count": 1,
"current_count": 12,
"alum_count": 0,
"enriched_count": 12,
"member_count": 18,
"allocation_used": 12,
"in_graph_count": 0,
"query": { "input": "Palantir FDE leavers" },
"job": {
"id": "7b1d9b3c-0b8f-4d4d-a8b4-72ef8fbb4c81",
"status": "pending",
"phase": "queued",
"total": 0,
"completed": 0,
"failed": 0,
"error": null
}
}
}
Retry target
Enqueue a fresh discovery job for a Target whose latest work needs another run.
POST
/
targets
/
{id}
/
retry
curl --fail-with-body --max-time 30 -X POST "https://api.freshtalent.ai/v1/targets/550e8400-e29b-41d4-a716-446655440000/retry" \
-H "Authorization: Bearer $FRESHTALENT_API_KEY"
const id = "550e8400-e29b-41d4-a716-446655440000";
const response = await fetch(`https://api.freshtalent.ai/v1/targets/${id}/retry`, {
method: "POST",
signal: AbortSignal.timeout(30_000), headers: { Authorization: `Bearer ${process.env.FRESHTALENT_API_KEY}` },
});
const body = await response.json();
if (response.status !== 202) throw new Error(`${response.status}: ${JSON.stringify(body)}`);
console.log(body.data.job.id, body.data.job.status);
import json
import os
import urllib.request
request = urllib.request.Request(
"https://api.freshtalent.ai/v1/targets/550e8400-e29b-41d4-a716-446655440000/retry",
method="POST",
headers={"Authorization": f"Bearer {os.environ['FRESHTALENT_API_KEY']}"},
)
with urllib.request.urlopen(request, timeout=30) as response:
body = json.load(response)
print(body["data"]["id"], body["data"]["job"]["status"]) # inspect progress, do not assert it is still queued
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"kind": "people",
"name": "Palantir FDE leavers",
"linkedin_url": null,
"auto_admit": false,
"watching_count": 12,
"proposed_count": 5,
"excluded_count": 1,
"current_count": 12,
"alum_count": 0,
"enriched_count": 12,
"member_count": 18,
"allocation_used": 12,
"in_graph_count": 0,
"query": { "input": "Palantir FDE leavers" },
"job": {
"id": "7b1d9b3c-0b8f-4d4d-a8b4-72ef8fbb4c81",
"status": "pending",
"phase": "queued",
"total": 0,
"completed": 0,
"failed": 0,
"error": null
}
}
}
Re-queues discovery for either a
No query parameters or body.
If a
people or company Target. This is not limited to the dashboard’s “Couldn’t finish” state.
Request
string
required
Target UUID.
pending or running job already exists for this Target, the service does not insert another job and returns the current Target. Otherwise it inserts track_people for a people Target or track_company for a company Target. The new job starts with phase queued.
Response
202 Accepted returns { "data": Target }, with the current counts and latest job summary. 202 means a job is pending or already active; it does not mean discovery or enrichment completed. job.id, job.phase, and job.error are nullable; linkedin_url is nullable for people Targets and unresolved companies.
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"kind": "people",
"name": "Palantir FDE leavers",
"linkedin_url": null,
"auto_admit": false,
"watching_count": 12,
"proposed_count": 5,
"excluded_count": 1,
"current_count": 12,
"alum_count": 0,
"enriched_count": 12,
"member_count": 18,
"allocation_used": 12,
"in_graph_count": 0,
"query": { "input": "Palantir FDE leavers" },
"job": {
"id": "7b1d9b3c-0b8f-4d4d-a8b4-72ef8fbb4c81",
"status": "pending",
"phase": "queued",
"total": 0,
"completed": 0,
"failed": 0,
"error": null
}
}
}
Examples
curl --fail-with-body --max-time 30 -X POST "https://api.freshtalent.ai/v1/targets/550e8400-e29b-41d4-a716-446655440000/retry" \
-H "Authorization: Bearer $FRESHTALENT_API_KEY"
const id = "550e8400-e29b-41d4-a716-446655440000";
const response = await fetch(`https://api.freshtalent.ai/v1/targets/${id}/retry`, {
method: "POST",
signal: AbortSignal.timeout(30_000), headers: { Authorization: `Bearer ${process.env.FRESHTALENT_API_KEY}` },
});
const body = await response.json();
if (response.status !== 202) throw new Error(`${response.status}: ${JSON.stringify(body)}`);
console.log(body.data.job.id, body.data.job.status);
import json
import os
import urllib.request
request = urllib.request.Request(
"https://api.freshtalent.ai/v1/targets/550e8400-e29b-41d4-a716-446655440000/retry",
method="POST",
headers={"Authorization": f"Bearer {os.environ['FRESHTALENT_API_KEY']}"},
)
with urllib.request.urlopen(request, timeout=30) as response:
body = json.load(response)
print(body["data"]["id"], body["data"]["job"]["status"]) # inspect progress, do not assert it is still queued
Lifecycle, retry safety, and recovery
The worker discovers members, preserves existing member status on URL conflicts, enricheswatching members, and records the latest job’s progress. It may internally retry failed enrichment rounds, but the API does not provide a completion time or monitoring freshness guarantee. A Target can finish with job.status: "done" and a non-zero job.failed count; inspect job.error.
A repeated request while a job is pending or running is usually a no-op at the service layer. It is still a POST without an idempotency key, and a timeout can occur before the caller sees whether the job was inserted. After an uncertain response, Get target and compare the latest job before retrying. Do not use retry as a polling loop; read the Target instead.
Errors
401 unauthorized,402 payment_required, and platform-key400 invalid_request: fix authentication, access, or the required organization header.404 not_found: the Target does not exist in the authenticated organization. Do not retry unchanged.409 conflict: the route preserves a service conflict if returned; reconcile the Target and latest job before another write.429/5xx: back off. For an uncertain POST, reconcile first rather than blindly creating another job.
Next
- Get target to inspect job progress.
- List target members to inspect results after discovery.
- Accept target members to make selected
proposedmembers eligible for enrichment.