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

# Migrating to v2

> Map each earlier endpoint to its v2 equivalent

Most earlier endpoints live under `/v1/api`. A few later ones, such as partner applications and assessment links, were added under `/v2/api` before v2 had its own conventions. v2 brings all of them under one base URL, `https://api.alex.com/v2`, with one set of conventions. The earlier paths keep working.

## What changes everywhere

* **Base URL.** Every endpoint lives under `https://api.alex.com/v2`, with no `/api` segment: `/v2/api/partner-applications` becomes `/v2/partner-applications`.
* **Same API key, same header.** Your existing key works in the `X-API-Key` or `api-key` header you send today. You can also send it as `Authorization: Bearer <key>`.
* **snake\_case.** Every request and response field is snake\_case: `externalJobId` becomes `external_id`, `firstName` becomes `first_name`.
* **Positions are jobs.** `positionId` and `interviewerId` become `job_id`.
* **Same ids.** Jobs, candidates and interviews keep their ids, so ids stored from v1 work in v2. A v1 `reportId` is the interview's `id`.
* **Resource paths and methods.** Verbs leave the path: `POST /deleteCandidate` becomes `DELETE /candidates/{id}`.
* **Strict bodies.** Unknown fields return `400` `parameter_unknown` instead of being ignored. Bodies must be JSON.
* **One error shape.** Errors use the [error envelope](https://docs.alex.com/api-reference/v2/errors.md). Responses no longer carry a `success` flag: use the HTTP status.
* **Typed objects.** Every response object has an `object` field, and lists use the [list envelope](https://docs.alex.com/api-reference/v2/pagination.md).
* **ISO timestamps.** Times are ISO 8601 strings, not Unix epochs.
* **Retries.** Send an [`Idempotency-Key`](https://docs.alex.com/api-reference/v2/idempotency) on writes.

## Endpoint map

### `/v1/api`

| Earlier endpoint | v2 endpoint | Notable differences |
| - | - | - |
| `GET /v1/api/positions` | [`GET /jobs`](https://docs.alex.com/api-reference/v2/jobs/list) | Paginated. Filter by `status` (`active` or `inactive`, any case), `label` (trimmed, then matched case-insensitively against the label's name) and `updated_since`. |
| `GET /v1/api/interviewers` | [`GET /jobs`](https://docs.alex.com/api-reference/v2/jobs/list) | `interviewerId` is the job's `id`; `role` is `name`. Deleted jobs aren't listed. |
| `POST /v1/api/createJob` | [`POST /jobs`](https://docs.alex.com/api-reference/v2/jobs/create) | Returns `202` with `generation_status: pending`; poll `GET /jobs/{id}`. `active` becomes `status`, default `active`. A duplicate `external_id` returns `409`. See [Creating jobs](#creating-jobs). |
| `GET /v1/api/templates` | [`GET /templates`](https://docs.alex.com/api-reference/v2/templates/list) | Paginated. |
| `POST /v1/api/templates` | [`POST /templates`](https://docs.alex.com/api-reference/v2/templates/create) | `estimatedDuration` becomes `estimated_duration_seconds`, in seconds. Returns `201` with the template. A duplicate name returns `409`. |
| `GET /v1/api/candidates` | [`GET /candidates`](https://docs.alex.com/api-reference/v2/candidates/list) and [`GET /candidates/{id}`](https://docs.alex.com/api-reference/v2/candidates/get) | `positionId` becomes `job_id`. Use `GET /candidates/{id}` instead of `candidateId`. Candidates deleted in your ATS are listed only with `include_deleted=true`. v1's 10-year `resumeUrl` is not reproduced: a link that can't be revoked would outlive a key rotation, an opt-out or an erasure. Store [`GET /candidates/{id}/resume`](https://docs.alex.com/api-reference/v2/candidates/resume) instead: it never expires, takes your API key, and redirects to a fresh download. `GET /candidates/{id}` returns a short-lived `resume_url`; lists return none. |
| `POST /v1/api/inviteCandidate` | [`POST /invitations`](https://docs.alex.com/api-reference/v2/invitations/create) | `firstName`, `lastName` and `candidateExternalId` become `candidate.first_name`, `candidate.last_name` and `candidate.external_id`. `email` and `mobile` become `contact.email` and `contact.phone`. `interviewerId` and `jobExternalId` become `job_id` and `job_external_id`. Candidates are invited again as before, rejected ones included, but an undecided application on the job is reused rather than a new one opened on every call, so check `invite_sent`: when it is `false`, `skipped_reason` says why, such as `already_in_progress` while an earlier invitation's outreach runs, or `do_not_contact`. Returns `201` for a new application, `200` for an existing one. A job with no rounds yet returns `409` `job_not_ready`. `contact.phone` must have 10 to 15 digits. |
| `POST /v1/api/deleteCandidate` | [`DELETE /candidates/{id}`](https://docs.alex.com/api-reference/v2/candidates/delete) | Takes the candidate's `id`, and deletes a candidate deleted in your ATS too. To delete every match for an email or external id, list them with `GET /candidates?email=...&include_deleted=true` or `?external_id=...&include_deleted=true`, then delete each: see [Erasing a person](https://docs.alex.com/api-reference/v2/candidates/delete.md#erasing-a-person). Returns `200` with `cleanup_succeeded`, or `404` when there is nothing to delete. |
| `GET /v1/api/reports` | [`GET /interviews`](https://docs.alex.com/api-reference/v2/interviews/list) and [`GET /interviews/{id}/evaluation`](https://docs.alex.com/api-reference/v2/interviews/get-evaluation) | See [Reports](#reports) below. |
| `GET /v1/api/interviews` | [`GET /interviews`](https://docs.alex.com/api-reference/v2/interviews/list) and [`GET /interviews/{id}`](https://docs.alex.com/api-reference/v2/interviews/get) | `interviewId` is the `id`. Filter by `job_id`, `candidate_id`, `application_id`, `round_number`, `status`, `include_test` and `include_archived`. See [Reports](#reports). |
| `POST /v1/api/data-exports` | [`POST /data-exports`](https://docs.alex.com/api-reference/v2/data-exports/create) | See [Data exports](#data-exports) below. |
| `GET /v1/api/data-exports/{id}` | [`GET /data-exports/{id}`](https://docs.alex.com/api-reference/v2/data-exports/get) | `downloadUrl` becomes `download_url`, with `download_url_expires_at`. Adds a `failed` status. |

### `/v2/api`

| Earlier endpoint | v2 endpoint | Notable differences |
| - | - | - |
| `POST /v2/api/candidates` | [`POST /candidates`](https://docs.alex.com/api-reference/v2/candidates/create) | Returns the candidate object: `201` when created, `200` when an existing candidate matched. A match by email with no `external_id` takes the one you send. A match by email with a different `external_id` is another ATS record, so it returns `409` `candidate_email_conflict` instead of that candidate. A match deleted in your ATS returns `409` `candidate_deleted`. `email` must be a valid address. A blank `phone` or `external_id` counts as not sent. |
| `POST /v2/api/partner-applications` | [`POST /partner-applications`](https://docs.alex.com/api-reference/v2/partner-applications/create) | `atsApplicantId`, `atsJobId` and `atsCandidateId` become `external_applicant_id`, `external_job_id` and `external_candidate_id`. The response's `applicationId` becomes `application_id`. Callbacks are unchanged. |
| `POST /v2/api/assessment-links` | [`POST /assessment-links`](https://docs.alex.com/api-reference/v2/assessment-links/create) | `applicationId`, `jobId`, `candidateId`, `orderId` and `assessmentUrl` become `external_application_id`, `external_job_id`, `external_candidate_id`, `order_id` and `assessment_url`. The response says whether the link was `delivered` or `discarded`. An account without the feature gets `403` `feature_not_enabled` instead of `409`. |
| `POST /v2/api/resume-fit` | [`POST /resume-fit`](https://docs.alex.com/api-reference/v2/resume-fit/create) | `alexJobId` becomes `job_id`. The writeback fields move into a `writeback` object. Errors that won't change on retry return `400`, `404` or `409`. |
| `POST /v2/api/vectorize-candidate` | None | Removed. Alex keeps Talent Match up to date from your ATS on its own. |
| `POST /v2/api/vectorize-candidates-bulk` | None | Removed. Alex keeps Talent Match up to date from your ATS on its own. |
| `POST /v2/api/update-candidate-dnc` | [`PATCH /talent-match-candidates/{external_candidate_id}`](https://docs.alex.com/api-reference/v2/talent-match/update-candidate) | The ATS id moves to the path. `dncStatus` becomes `do_not_contact`. There is no `alwaysReturn200`: handle the status code. |

### `/ams`

| Earlier endpoint | v2 endpoint | Notable differences |
| - | - | - |
| `POST /ams/inviteCandidate` | [`POST /invitations`](https://docs.alex.com/api-reference/v2/invitations/create) | `firstName`, `lastName` and `candidateExternalId` go in `candidate` as `first_name`, `last_name` and `external_id`; `email` goes in `contact`. `jobExternalId` becomes `job_external_id`, or name the job by `job_id`. |
| `POST /ams/createJob` | [`POST /jobs`](https://docs.alex.com/api-reference/v2/jobs/create) | As `POST /v1/api/createJob`. See [Creating jobs](#creating-jobs). |
| `POST /ams/updateJobStatus` | [`PATCH /jobs/{id}`](https://docs.alex.com/api-reference/v2/jobs/update) | Find the job's `id` with `GET /jobs?external_id=...`, then send `{"status": "active"}` or `{"status": "inactive"}`. Returns the job. |
| `POST /ams/deleteCandidate` | [`DELETE /candidates/{id}`](https://docs.alex.com/api-reference/v2/candidates/delete) | As `POST /v1/api/deleteCandidate`: find the candidate with `GET /candidates?external_id=...` first. |
| `POST /ams/deleteJob` | [`DELETE /jobs/{id}?permanent=true`](https://docs.alex.com/api-reference/v2/jobs/delete) | Find the job's `id` with `GET /jobs?external_id=...`. Only `permanent=true` removes the job with its applications, interviews and transcripts, as `/ams/deleteJob` did, and **this cannot be undone**. Without it the job is soft-deleted and its history kept. Returns `204`. |

## Creating jobs

* **Human interview rounds need recruiters.** Give each human interview round of the workflow `recruiter_user_ids`, the users candidates are handed to; list them with [`GET /users`](https://docs.alex.com/api-reference/v2/users/list). The earlier `createJob` created such a round with no recruiter, so no candidate reaching it could be handed over until someone set one in Alex. v2 refuses that with `400` `parameter_missing` instead of creating a job that stalls. To change a round's recruiters later, use [`PATCH /jobs/{id}/rounds/{number}`](https://docs.alex.com/api-reference/v2/jobs/update-round).
* **The workflow needs an Alex interview round,** as before: one without returns `409` `workflow_without_alex_round`, where the earlier API returned `422`.

## Reports

v2 has no report object and no reports endpoints: a request for one returns `404` `route_not_found`. A report's content is split between the [interview](https://docs.alex.com/api-reference/v2/interviews/get.md), which says where the interview stands, and its [evaluation](https://docs.alex.com/api-reference/v2/interviews/get-evaluation.md), which holds the results. The interview's `id` is the v1 `reportId`.

The same fields carry over from `GET /v1/api/interviews`, where `interviewId` is the interview's `id`.

| v1 field | v2 | Change |
| - | - | - |
| `reportId`, `interviewId` | interview `id` | |
| `candidateId` | interview `candidate_id` | |
| `positionId`, `interviewerId` | interview `job_id` | An interview on a deleted job is still listed, as before, and so is its résumé fit, though `GET /jobs/{id}` and `GET /applications/{id}` return `404`. |
| `externalJobId` | none | Fetch the job with `GET /jobs/{id}` and read its `external_id`. |
| `overallScore` | interview `score`, evaluation `score` | `null` until evaluated, rather than `0`. |
| `overallFeedback` | evaluation `summary` | |
| `skills`, `report` | evaluation `criteria` | A list of `{ name, score, rationale }`: `feedback` becomes `rationale`. `report.overall_evaluation` is the evaluation's `score` and `summary`. |
| `tags` | evaluation `tags` | The same `name`, `value` and `evidence`. |
| `questionSummary` | evaluation `question_answers` | Ordered as asked. Each has `question`, `answer_summary`, `was_answered`, `unanswered_reason`, `analysis_failed` and, for multiple choice, `choice`. `question_time` and `answer_time` become `question_offset_seconds` and `answer_offset_seconds`: seconds into the recording, not `"mm:ss"` text. |
| `resumeFit` | [`GET /applications/{id}/resume-fit`](https://docs.alex.com/api-reference/v2/applications/get-resume-fit) | Read from the interview's application, since the résumé is scored once per application. `experienceSummary` becomes `summary`, and `explanation` becomes `key_fit_points`, `areas_for_discussion` and `breakdown`. `409` `resume_fit_not_ready` instead of `null` when there is none. |
| `timeCompleted` | interview `completed_at` | An ISO 8601 timestamp instead of Unix seconds, and `null` until the interview completes. |
| `pdfUrl`, `pdfURL` | [`POST /interviews/{id}/report-link`](https://docs.alex.com/api-reference/v2/interviews/report-link) | See [Report links](#report-links). To download the PDF with your API key, use [`GET /interviews/{id}/pdf`](https://docs.alex.com/api-reference/v2/interviews/pdf). |
| `videoUrl`, `videoURL` | interview `recording_page_url` | The same link to the recording's page in Alex, which needs an Alex login, and `null` instead of `""` when there is no recording. To download the recording with your API key, use [`GET /interviews/{id}/video`](https://docs.alex.com/api-reference/v2/interviews/video). |

`GET /interviews` leaves out test interviews and interviews from earlier attempts unless you pass `include_test=true` or `include_archived=true`, and lists every status, not only completed interviews: pass `status=completed` for what v1 returned.

### Report links

v1 made every report it returned public: reading it published a link to the PDF report that anyone could open without logging in. v2 never publishes a report as a side effect. When you need that link, for example to put it in your ATS, call [`POST /interviews/{id}/report-link`](https://docs.alex.com/api-reference/v2/interviews/report-link) for that interview. It publishes the report the same way v1 did and returns the same `url`. Anyone holding the link can read the candidate's report until `expires_at`, so request it only for reports you mean to share. It answers once the interview is `completed` and `evaluated`, including a human interview round with its notetaker summary. Calling it again is safe, and restarts the expiry window as each v1 read did.

An interview's `evaluation_status` says whether its evaluation is ready: fetch the evaluation once it is `evaluated`. Until then, `GET /interviews/{id}/evaluation` returns `409` `interview_not_ready`. A human interview round's evaluation can move from `not_applicable` back to `pending` when its handoff is reopened or rebooked.

Lists of interviews are paginated, and `updated_since` lets you poll for new and changed interviews instead of re-reading them all. To hear about results as they're ready, subscribe to `interview.evaluated`. See [Events and webhooks](https://docs.alex.com/api-reference/v2/webhooks.md).

## Application stages

v2 tracks a candidate's progress on a job through their application's **stage**, the same stages your team uses in Alex. Read it on [`GET /applications/{id}`](https://docs.alex.com/api-reference/v2/applications/get), move it with [`PATCH /applications/{id}`](https://docs.alex.com/api-reference/v2/applications/update), and filter lists by `stage_category`. `stage` is `null` only when the application has no stage yet.

## Data exports

* **Never emailed.** v2 has no `emails` field. Download the file from `download_url`.
* **snake\_case names.** Entities are `jobs`, `candidates`, `interviews`, `activity`, `tasks`, `unanswered_questions`, `interview_qa` and `analytics`. Filter names are snake\_case too: `createdDate` becomes `created_date`, `jobIds` becomes `job_ids`, and the `unansweredQuestions` and `interviewQA` groups become `unanswered_questions` and `interview_qa`.
* **Filter by stage.** `stages` splits in two. The `candidates` and `interviews` filters take `stage`, a list of stage categories (`not_started`, `in_progress`, `complete_successful`, `complete_unsuccessful`), and `stage_ids`, a list of your stage ids. An application in any of them matches. Legacy decision values, such as `REJECTED`, are no longer accepted: use the category.
* **Other filter values are unchanged.** Date ranges, activity kinds and Interview Q\&A column names take the same values as before, except the Interview Q\&A stage column, which is `stage` in v2.
* **Fresh links.** Each read of a completed export signs a new `download_url`, valid until `download_url_expires_at`.
* **Failures are visible.** An export that stops has `status: failed` and a `failure_reason`.

## New in v2

v2 adds resources the earlier API didn't have: [applications](https://docs.alex.com/api-reference/v2/applications/list.md) with their notes, activity, messages and verifications; [interviews](https://docs.alex.com/api-reference/v2/interviews/list.md) and [handoffs](https://docs.alex.com/api-reference/v2/handoffs/list.md); a job's [rounds](https://docs.alex.com/api-reference/v2/jobs/list-rounds.md) and [workflows](https://docs.alex.com/api-reference/v2/workflows/list.md); [custom fields](https://docs.alex.com/api-reference/v2/custom-fields/list.md); [users](https://docs.alex.com/api-reference/v2/users/list.md); Talent Match [matches](https://docs.alex.com/api-reference/v2/talent-match/list-matches.md); and [events and webhooks](https://docs.alex.com/api-reference/v2/webhooks.md).

## Migration checklist

1. Point your client at `https://api.alex.com/v2`.
2. Rename request and response fields to snake\_case, and positions to jobs.
3. Replace `success` checks with HTTP status checks, and branch on `error.code`.
4. Page through lists with `cursor`, and poll with `updated_since`, or subscribe to events.
5. Read reports from interviews and their evaluations.
6. Add an `Idempotency-Key` to writes, and reuse it when you retry.
7. Handle `429` by waiting for `Retry-After`.


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