Skip to main content

1. Trigger the leavers pipeline

curl -X POST https://api.automindz.co/hiring-signals/leavers \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "limit": 5,
    "org_name": "my-company",
    "ai_ark_api_key": "<your-ai-ark-key>",
    "exa_api_key": "<your-exa-key>",
    "openrouter_api_key": "<your-openrouter-key>",
    "industries": ["staffing and recruiting"],
    "job_titles": ["ceo", "coo", "managing director"],
    "geography": ["United States"],
    "dm_titles": ["founder", "ceo", "president"]
  }'
Response:
{
  "run_id": "019d678b-c737-213f-f6b2-ed713064874d",
  "status": "QUEUED",
  "poll_url": "/runs/019d678b-c737-213f-f6b2-ed713064874d"
}

2. Poll for results

curl https://api.automindz.co/runs/<run_id> \
  -H "Authorization: Bearer <your-api-key>"
Poll every 10 seconds for small runs (limit 10 or less). For larger runs, poll every 30 seconds. Most runs with limit=5 complete within 2-3 minutes.

3. Get the results

When status is COMPLETED, the response includes the full results:
{
  "run_id": "019d678b-c737-213f-f6b2-ed713064874d",
  "status": "COMPLETED",
  "result": {
    "costs": {
      "exa_cost": 0.072,
      "openrouter_cost": 0.001564,
      "ai_ark_credits_consumed": -30186.2
    },
    "summary": {
      "leavers_count": 1,
      "new_company_dms_count": 3,
      "old_company_dms_count": 3
    },
    "leavers_url": "https://example.com/leavers.csv",
    "new_company_dms_url": "https://example.com/new_company_dms.csv",
    "old_company_dms_url": "https://example.com/old_company_dms.csv"
  },
  "started_at": "2026-04-07T11:36:38.725680Z",
  "finished_at": "2026-04-07T11:37:18.319535Z"
}