> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sixtyfour.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Legacy

> Use older routes and find their replacements.

## Route changes

| Old route | Current route | Input |
| - | - | - |
| `POST /find-email` and its async and bulk variants | `POST /v1/people/contacts` | `person`, `people` or `input_file_id`; choose `work_email` or `personal_email` in `find`. |
| `POST /find-phone` and its async and bulk variants | `POST /v1/people/contacts` | Choose `phone` in `find`. |
| `POST /reverse-email` and its async and bulk variants | `POST /v1/people/contacts/reverse` | `email`, `items` or `input_file_id`. |
| `POST /reverse-phone` and its async and bulk variants | `POST /v1/people/contacts/reverse` | `phone`, `items` or `input_file_id`. |
| `POST /people-intelligence`, `POST /people-intelligence-async`, `POST /bulk-intelligence/people` | `POST /v1/people/intelligence` | `person`, `people` or `input_file_id`; `fields` replaces `struct`. |
| `POST /company-intelligence`, `POST /company-intelligence-async`, `POST /bulk-intelligence/company` | `POST /v1/companies/intelligence` | `company`, `companies` or `input_file_id`; `fields` replaces `struct`. |
| `POST /verify-email` | `POST /v1/verify/emails` | One `email`. |
| `POST /search/query`, `POST /search/start-filter-search` | `POST /v1/people/search` or `POST /v1/companies/search` | `filters`, `query` or `search_id`. |
| `POST /search/start-deep-search` | `POST /v1/people/search` or `POST /v1/companies/search` | `query`. |
| `POST /search/lookalike` | `POST /v1/people/search` | `seeds`. |
| `GET /job-status/{task_id}`, `GET /search/status/{task_id}` | `GET /v1/jobs/{job_id}` | Use the `job_id` from the new start response. |
| `POST /search/export` | `POST /v1/exports` | `from.job_id` and `format`. |
| `GET /search/download` | `GET /v1/files/{file_id}` | Read `download_url` from the file. |

The older routes keep their original bodies and status names. New starts return a `job_id` and finish as `succeeded`, `failed` or `canceled`. Store IDs exactly as returned.

Deprecated aliases keep their response bodies and HTTP behavior. Their `Deprecation` and `Link` headers identify the replacement route.

| Deprecated alias | Replacement |
| - | - |
| `POST /v1/people-intelligence` | `POST /v1/people/intelligence` |
| `POST /v1/company-intelligence` | `POST /v1/companies/intelligence` |
| `POST /v1/find-email`, `POST /v1/find-email/bulk` | `POST /v1/people/contacts` |
| `POST /v1/find-phone`, `POST /v1/find-phone/bulk` | `POST /v1/people/contacts` |
| `POST /v1/reverse-email`, `POST /v1/reverse-email/bulk` | `POST /v1/people/contacts/reverse` |
| `POST /v1/reverse-phone`, `POST /v1/reverse-phone/bulk` | `POST /v1/people/contacts/reverse` |

[People Intelligence](https://docs.sixtyfour.ai/api-reference/legacy/people-intelligence.md), [Company Intelligence](https://docs.sixtyfour.ai/api-reference/legacy/company-intelligence.md), [Bulk Intelligence](https://docs.sixtyfour.ai/api-reference/legacy/bulk-intelligence.md) and the [Search guides](https://docs.sixtyfour.ai/api-reference/legacy/search-overview.md) retain the older parameters, tiers, examples and options. Age Verification and the QA Agent have no replacement route.

For legacy error bodies, see [Handling Errors](https://docs.sixtyfour.ai/api-reference/legacy/errors.md#legacy-errors).

## Job status and callbacks

These starts return a `task_id`. Use it to check status and match callbacks.

### Job status

```http theme={null}
GET https://api.sixtyfour.ai/job-status/{task_id}
```

| Field | Present | Description |
| - | - | - |
| `status` | Always | See [Statuses](#statuses). |
| `id` | Always | The job's `task_id`. |
| `run_id` | Always | The ID of this execution of the job, not the `run_id` of a bulk callback. Refer to the job by `task_id`. |
| `start_time` | Always | When the job started (ISO 8601). |
| `close_time` | `completed` | When the job finished. |
| `result` | `completed` | The job's output. See [Results by job type](#results-by-job-type). Bulk jobs return files in `results` instead. |
| `task_type` | `completed` | The job type. See [Results by job type](#results-by-job-type). Not returned for bulk jobs. |
| `charge_credits` | `completed` | Credits the job charged, including any billed tools its research used. Omitted when the charge is unavailable, and on bulk jobs once it [expires](#retention). `charge_amount` is deprecated. |
| `results`, `results_url` | `completed` bulk jobs | Signed links to the output files, and the run in the Sixtyfour app. See [Bulk Intelligence](https://docs.sixtyfour.ai/api-reference/legacy/bulk-intelligence.md#polling-for-results). |
| `progress` | `running` bulk jobs | Rows enriched so far, such as `{"completed": 120, "total": 500}`. |
| `investigation` | Atlas runs | `{"id", "workspace_url"}` of the run's [Atlas investigation](https://docs.sixtyfour.ai/atlas/integrations.md). |
| `error` | `failed` | Set only when the job was refused for insufficient credits. |

```json Completed job theme={null}
{
  "status": "completed",
  "id": "3f8b2c1e-...",
  "run_id": "7d41a0c2-...",
  "start_time": "2026-11-02T19:30:12Z",
  "close_time": "2026-11-02T19:34:48Z",
  "result": {
    "structured_data": {
      "title": "CEO & Co-Founder",
      "linkedin": "https://www.linkedin.com/in/saarthshah"
    },
    "notes": "Confirmed current role from the LinkedIn profile and the company site.",
    "references": {
      "https://www.linkedin.com/in/saarthshah": "LinkedIn profile with current title"
    },
    "confidence_score": 9
  },
  "charge_amount": 10,
  "charge_credits": 1,
  "task_type": "lead_enrichment"
}
```

### Statuses

| Status | Meaning |
| - | - |
| `running` | Waiting for capacity or in progress. |
| `completed` | Finished. The response carries the result and the charge. |
| `failed` | Ended without a result; see `error`. A People Intelligence, Company Intelligence or QA Agent job that does not start within 24 hours also ends `failed`. |
| `cancelled`, `terminated` | Stopped before it finished. |
| `timed_out` | Ran past its time limit. |

`running` is the only status in progress; every other status is final. A `failed` single-record job is not charged, except for [billed tool](https://docs.sixtyfour.ai/guides/credits-and-pricing.md#billed-tools) calls an Atlas run completed successfully before it failed.

An Atlas run (`xhigh`, or `scout` with `graph`) that the agents decline still reports `completed`: its `notes` start with `Declined:`, `structured_data` repeats the input, and nothing is charged. Check `notes` before you store `structured_data`. See [Declined runs](https://docs.sixtyfour.ai/atlas/integrations.md#declined-runs).

### Results by job type

| Started by | `task_type` | `result` |
| - | - | - |
| `POST /people-intelligence-async` | `lead_enrichment` | `structured_data`, `notes`, `references`, and `confidence_score` or `field_confidence`. Atlas runs add research notes, the graph and workspace files. See [People Intelligence](https://docs.sixtyfour.ai/api-reference/legacy/people-intelligence.md#response) and [Atlas](https://docs.sixtyfour.ai/atlas/integrations.md#response). |
| `POST /company-intelligence-async` | `company_enrichment` | `structured_data`, with the people found in `structured_data.leads`, plus `notes`, `references`, `findings`, `org_chart`, and `confidence_score` or `field_confidence`. See [Company Intelligence](https://docs.sixtyfour.ai/api-reference/legacy/company-intelligence.md#response). |
| `POST /qa-agent-async` | `qa_agent` | `structured_data`, `notes` and `references`. See [QA Agent](https://docs.sixtyfour.ai/api-reference/endpoint/qa-agent.md). |
| `POST /find-email-async`, `/find-phone-async`, `/reverse-email-async`, `/reverse-phone-async` | `find_email`, `find_phone`, `reverse_enrichment` | The lead itself, with `cost_cents` and `cost_credits`: the object the sync endpoint returns. |
| `POST /find-email-bulk-async`, `/find-phone-bulk-async`, `/reverse-email-bulk-async`, `/reverse-phone-bulk-async` | `find_email`, `find_phone`, `reverse_enrichment` | `{ leads, total_leads, <count>, cost_cents, cost_credits }`: the object the sync bulk endpoint returns. The count is `emails_found`, `phones_found` or `successful_lookups`, and Find Email adds `mode`. |
| `POST /bulk-intelligence/people`, `/bulk-intelligence/company` | None | No `result`. A completed job carries file links in `results`. See [Bulk Intelligence](https://docs.sixtyfour.ai/api-reference/legacy/bulk-intelligence.md#polling-for-results). |

Find Email reports `find_email`, Find Phone reports `find_phone`, and Reverse Email and Reverse Phone both report `reverse_enrichment`.

### Contact lookups in job status and webhooks

A single-lead contact job returns the lead itself in job status. Its [webhook](#webhooks) callback wraps the lead in `result.leads`, with the totals:

```json Job status theme={null}
{
  "status": "completed",
  "id": "3f8b2c1e-...",
  "run_id": "7d41a0c2-...",
  "start_time": "2026-11-02T19:30:12Z",
  "close_time": "2026-11-02T19:30:19Z",
  "result": {
    "name": "Saarth Shah",
    "company": "Sixtyfour",
    "email": [["saarth.work@example.com", "OK", "COMPANY"]],
    "other_emails": [],
    "cost_cents": 5,
    "cost_credits": 0.5
  },
  "charge_amount": 5,
  "charge_credits": 0.5,
  "task_type": "find_email"
}
```

```json Webhook theme={null}
{
  "task_id": "3f8b2c1e-...",
  "status": "completed",
  "task_type": "find_email",
  "result": {
    "leads": [
      {
        "name": "Saarth Shah",
        "company": "Sixtyfour",
        "email": [["saarth.work@example.com", "OK", "COMPANY"]],
        "other_emails": []
      }
    ],
    "total_leads": 1,
    "emails_found": 1,
    "cost_cents": 5,
    "cost_credits": 0.5,
    "mode": "PROFESSIONAL"
  },
  "error": null,
  "event_id": "f7c2a4e0-...",
  "attempt": 1
}
```

### Polling

* Poll each job every 10 seconds or slower; bulk `progress` updates at most every 10 seconds.
* Job status shares one organization budget with [workflow live status](https://docs.sixtyfour.ai/api-reference/workflows/workflows-execution.md#get-live-status); see [Status polling](https://docs.sixtyfour.ai/api-reference/rate-limits.md#status-polling).
* A `429` or `503` on a status read does not affect the job: wait `Retry-After` seconds and poll again.
* To follow many jobs, poll them from one loop that stays within the budget, or pass `webhook_url` and poll only the jobs whose callback is late.

This example waits for one job and honors `Retry-After`:

```bash cURL theme={null}
TASK_ID="3f8b2c1e-..."

# Requires jq.
while true; do
  code=$(curl -s -o job.json -D headers.txt -w "%{http_code}" \
    -H "x-api-key: YOUR_API_KEY" \
    "https://api.sixtyfour.ai/job-status/$TASK_ID")
  if [ "$code" = "429" ] || [ "$code" = "503" ]; then
    retry_after=$(awk 'tolower($1) == "retry-after:" { print $2 + 0 }' headers.txt)
    sleep "${retry_after:-10}"
  elif [ "$code" != "200" ] || [ "$(jq -r .status job.json)" != "running" ]; then
    break
  else
    sleep 10
  fi
done

cat job.json
```

```python Python theme={null}
import time
import requests

API = "https://api.sixtyfour.ai"
HEADERS = {"x-api-key": "YOUR_API_KEY"}


def wait_for_job(task_id, interval=10, timeout=2 * 60 * 60):
    deadline = time.monotonic() + timeout
    while time.monotonic() < deadline:
        response = requests.get(f"{API}/job-status/{task_id}", headers=HEADERS, timeout=30)
        if response.status_code in (429, 503):
            # Over the polling budget, or status briefly unavailable: the job keeps running.
            time.sleep(float(response.headers.get("Retry-After", interval)))
            continue
        response.raise_for_status()
        job = response.json()
        if job["status"] != "running":
            return job
        time.sleep(interval)
    raise TimeoutError(f"Job {task_id} still running after {timeout} seconds")


job = wait_for_job("3f8b2c1e-...")
if job["status"] != "completed":
    raise RuntimeError(f"Job {job['status']}: {job.get('error', 'no reason given')}")
print(job["result"])  # bulk jobs carry file links in job["results"] instead
```

```javascript JavaScript theme={null}
const API = "https://api.sixtyfour.ai";
const headers = { "x-api-key": "YOUR_API_KEY" };
const sleep = (seconds) => new Promise((resolve) => setTimeout(resolve, seconds * 1000));

async function waitForJob(taskId, { interval = 10, timeout = 2 * 60 * 60 } = {}) {
  const deadline = Date.now() + timeout * 1000;
  while (Date.now() < deadline) {
    const response = await fetch(`${API}/job-status/${taskId}`, {
      headers,
      signal: AbortSignal.timeout(30_000),
    });
    if (response.status === 429 || response.status === 503) {
      // Over the polling budget, or status briefly unavailable: the job keeps running.
      await sleep(Number(response.headers.get("Retry-After") ?? interval));
      continue;
    }
    if (!response.ok) throw new Error(`Job status ${response.status}: ${await response.text()}`);
    const job = await response.json();
    if (job.status !== "running") return job;
    await sleep(interval);
  }
  throw new Error(`Job ${taskId} still running after ${timeout} seconds`);
}

const job = await waitForJob("3f8b2c1e-...");
if (job.status !== "completed") {
  throw new Error(`Job ${job.status}: ${job.error ?? "no reason given"}`);
}
console.log(job.result); // bulk jobs carry file links in job.results instead
```

### Webhooks

Pass `webhook_url` to receive the result by POST instead of polling. [Outgoing Webhooks](https://docs.sixtyfour.ai/api-reference/webhooks/outgoing.md) documents the payload, signing and retries. Callbacks relate to job status as follows:

* Job status can read `running` briefly after the callback arrives.
* People Intelligence, Company Intelligence and QA Agent callbacks carry no charge; read `charge_credits` from job status once it reads `completed`. Their sync endpoints also send the callback when the request has a `webhook_url`.
* Contact lookup callbacks carry the final `result.cost_credits`. Their `result` differs from job status; see [Contact lookups in job status and webhooks](#contact-lookups-in-job-status-and-webhooks).
* Bulk Intelligence sends a workflow run payload whose `run_id` equals the `task_id`. See [Bulk Intelligence](https://docs.sixtyfour.ai/api-reference/legacy/bulk-intelligence.md#webhook-callback).
* Only completed jobs send a callback. If none arrives by your deadline, poll job status.
* A job can send more than one callback, each with a new `event_id`; deduplicate on `task_id`.

### Sync calls and retries

> [!WARNING]
>
> A sync endpoint runs the same job and waits for it. If your client times out or disconnects, the job keeps running and is charged when it finishes, and a retry starts and charges a second job.

* Use the async endpoint for long research: when Sixtyfour is at capacity, a sync call returns [`503`](https://docs.sixtyfour.ai/api-reference/legacy/errors#503-service-unavailable) and an async job waits.
* Send `dispatch_id` (8 to 128 characters) to `POST /people-intelligence-async` or `POST /qa-agent-async` to make a start safe to retry. A repeat with the same key, whatever the body, returns the original `task_id` with `status: "RUNNING"` and charges nothing while the job is [retained](#retention); poll it for the real status. Keys are unique per organization across People Intelligence, QA Agent and the [Atlas API](https://docs.sixtyfour.ai/atlas/api.md).
* Company Intelligence and the contact lookups take no `dispatch_id`, so a repeated start runs and charges again. A `dispatch_id` sent to `POST /company-intelligence-async` comes back in `unrecognized_fields`.
* Bulk Intelligence takes an `Idempotency-Key` header. See [Bulk Intelligence](https://docs.sixtyfour.ai/api-reference/async-jobs.md#retry-safely).

### Retention

Job status is not long-term storage: save each result when its job completes.

| Data | Available |
| - | - |
| A job in `GET /job-status/{task_id}` | For a limited time after it finishes, with no guaranteed window. After that the request returns `404`, as it does for an unknown ID. |
| `charge_credits` and `charge_amount` on bulk jobs | 2 days after the job starts, then omitted. |
| `download_url` links in bulk `results` | 15 minutes. Poll again for fresh links. |
| Bulk result files | With the run in the Sixtyfour app, at `results_url`. |

## Search billing

Legacy deep searches with `output_mode: "query_only"` create no result file. They charge when results are read with `POST /search/query`. Legacy lookalike starts are free; reading their results with `POST /search/query` or exporting them with `POST /search/export` charges for the rows returned. Viewing lookalike results in the web app is free.

Search Jobs instead save and charge for their retrieved results before those results are read. Saved-result exports add no charge. See [Credit Costs](https://docs.sixtyfour.ai/guides/credits-and-pricing.md#search).

## Related

* [Batch Processing](https://docs.sixtyfour.ai/guides/batch-processing.md)
* [Async Jobs](https://docs.sixtyfour.ai/api-reference/async-jobs.md)
* [Handling Errors](https://docs.sixtyfour.ai/api-reference/errors.md)
* [Credit Costs](https://docs.sixtyfour.ai/guides/credits-and-pricing.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.