> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.confirm.global/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.confirm.global/_mcp/server.

# Integration API (API keys)

The Integration API is for your back-office systems: a ticketing tool, an HRIS, a payroll export. It uses an **API key** that belongs to your organization instead of a person's login, so it keeps working when people change roles or passwords.

With it you can:

* **Read** your jobs and applications, including each candidate's current stage, interview dates by round, and hire or rejection details.
* **Send back employment outcomes**: hire dates, start dates, and terminations. CONFIRM uses these to learn which hires stay, which powers retainability.

> **Note**
>
> Admins create keys themselves in the portal under **Settings → API keys**. Talk to your CONFIRM account team if you'd like help planning your integration.

## Base URL

```
https://api.confirm.global/api/v1/integration
```

## Authentication

Send your key as a bearer token on every request:

```
Authorization: Bearer cok_...
```

* **Admins create keys** under **Settings → API keys**: click **Create key**, give it a name (for example, the system that will use it), choose its access, and click **Create key**. You see the full key **once**, in the **Copy your new key** window. Store it in a secret manager. An organization can have up to 10 active keys.
* **Each key belongs to one organization** and only ever sees that organization's data.
* **Each key has scopes**, which control what it can do:

| Scope              | Allows                                                                                            |
| ------------------ | ------------------------------------------------------------------------------------------------- |
| `integration:read` | **Read jobs and applications** in the portal. `GET` endpoints: jobs, applications, stage history. |
| `outcomes:write`   | **Send employment outcomes** in the portal. `POST /employment-outcomes`.                          |

* **Production keys only work on production.** A key created on a test environment only works on that environment.
* **Revoking a key takes effect immediately.** On **Settings → API keys**, click **Revoke** next to the key. If a key is exposed or lost, revoke it and create a new one.

Check your key with `GET /whoami`:

```bash
curl https://api.confirm.global/api/v1/integration/whoami \
  -H "Authorization: Bearer $CONFIRM_API_KEY"
```

```json
{
  "org_id": "62a529ba-...",
  "org_name": "Your Company",
  "key": {
    "key_id": "8d1c...",
    "key_prefix": "cok_Ab12Cd34",
    "label": "Ticket system",
    "scopes": ["integration:read", "outcomes:write"],
    "environment": "production"
  }
}
```

## List jobs

`GET /jobs` returns your jobs with their IDs. Use the `job_id` to link a job in your system to the job in CONFIRM.

| Parameter | Description                                                       |
| --------- | ----------------------------------------------------------------- |
| `status`  | Optional. Comma-separated: `active`, `paused`, `closed`, `draft`. |

```json
{
  "data": [
    {
      "job_id": "20aff80b-...",
      "title": "Customer Care Representatives",
      "status": "active",
      "created_at": "2026-02-10T15:00:00.000Z",
      "interview_rounds": 2
    }
  ]
}
```

## List applications

`GET /applications` returns one row per application (a candidate's application to one job). Use it to poll for changes.

| Parameter       | Description                                                                                            |
| --------------- | ------------------------------------------------------------------------------------------------------ |
| `job_id`        | Optional. Only applications to this job.                                                               |
| `status`        | Optional. Comma-separated stage values (see [Stages](#stages)), e.g. `awaiting_interview_2`. Up to 20. |
| `updated_since` | Optional. ISO-8601 timestamp. Only applications changed **after** this time.                           |
| `limit`         | Optional. 1–200, default 100.                                                                          |
| `cursor`        | Optional. The `next_cursor` from the previous page.                                                    |

Results are ordered by `updated_at`, oldest first. When `has_more` is `true`, call again with `cursor` set to `next_cursor`.

### Polling for changes

To pick up everything that changed since your last run, store the `updated_at` of the last application you processed. Then call:

```bash
curl "https://api.confirm.global/api/v1/integration/applications?job_id=20aff80b-...&status=awaiting_interview_2&updated_since=2026-11-17T18:00:00.000Z" \
  -H "Authorization: Bearer $CONFIRM_API_KEY"
```

Polling every few minutes is fine. Encode a `+` in `updated_since` as `%2B`, or send the time in UTC with a `Z`.

### The application object

```json
{
  "application_id": "3b9d44c1-...",
  "candidate_id": "c1a7e0f2-...",
  "job_id": "20aff80b-...",
  "job_title": "Customer Care Representatives",
  "first_name": "Jordan",
  "last_name": "Sample",
  "email": "jordan.sample@example.com",
  "source": "indeed",
  "applied_at": "2026-10-21T14:05:00.000Z",
  "status": "awaiting_interview_2",
  "status_entered_at": "2026-11-12T16:10:00.000Z",
  "interviews": [
    { "interview_id": "a1...", "round": 1, "scheduled_at": "2026-11-10T19:30:00.000Z", "status": "completed" },
    { "interview_id": "a2...", "round": 2, "scheduled_at": "2026-12-02T19:30:00.000Z", "status": "scheduled" }
  ],
  "next_interview_at": "2026-12-02T19:30:00.000Z",
  "hired_at": null,
  "rejected_at": null,
  "rejection_reason": null,
  "reject_sub_reason": null,
  "rejection_outcome": null,
  "no_show_count": 0,
  "reschedule_count": 1,
  "updated_at": "2026-11-12T16:10:00.000Z"
}
```

| Field                                                        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `status`                                                     | The candidate's current stage on this job. See [Stages](#stages).                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `status_entered_at`                                          | When the candidate entered the current stage.                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `interviews`                                                 | Every interview for this application, oldest first, with its round number and status (`scheduled`, `confirmed`, `completed`, `cancelled`, `no_show`).                                                                                                                                                                                                                                                                                                                                                    |
| `next_interview_at`                                          | The next upcoming scheduled or confirmed interview, or `null`.                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `rejection_reason`, `reject_sub_reason`, `rejection_outcome` | Why the candidate was rejected, as recorded in CONFIRM. `rejection_outcome` tells you how it ended: `recruiter_rejected`, `candidate_withdrew`, `auto_closed_dormant` (closed for not responding), `reassigned` (moved to another job), `hired_elsewhere` (closed because the person was hired for another of your jobs; no rejection message was sent), or `duplicate` (closed when two profiles of the same person were merged). Treat `hired_elsewhere` and `duplicate` as closed, not as rejections. |
| `no_show_count`, `reschedule_count`                          | How many interviews the candidate missed and rescheduled.                                                                                                                                                                                                                                                                                                                                                                                                                                                |

Screening answers, call recordings, transcripts, résumés and phone numbers are not included. They stay in CONFIRM.

## Get one application

`GET /applications/{application_id}` returns the same object plus `stage_history`, every stage change in order:

```json
"stage_history": [
  { "from": "awaiting_interview_1", "to": "past_interview_1", "changed_at": "2026-11-10T20:20:09.000Z", "changed_by_type": "automation" },
  { "from": "past_interview_1", "to": "awaiting_interview_2", "changed_at": "2026-11-10T20:58:24.000Z", "changed_by_type": "user" }
]
```

`changed_by_type` is one of `user`, `automation`, `agent`, `system`, `webhook`.

## Stages

A job's stages come from its pipeline. Numbered stages carry the round or step number, so a job with two interview rounds has `awaiting_interview_1` and `awaiting_interview_2`.

| Stage                               | Meaning                                                       |
| ----------------------------------- | ------------------------------------------------------------- |
| `applied`                           | Application received.                                         |
| `awaiting_screening`                | Waiting for, or in, the AI phone screen.                      |
| `awaiting_recruiter_review_<n>`     | Waiting for your team to review.                              |
| `awaiting_interview_scheduling_<n>` | Invited to book interview round *n*.                          |
| `awaiting_interview_<n>`            | Interview round *n* is booked.                                |
| `past_interview_<n>`                | Interview round *n* has happened; waiting for your decision.  |
| `awaiting_hire_decision`            | Waiting for the final decision.                               |
| `hired`                             | Marked hired.                                                 |
| `client_rejected`                   | Rejected.                                                     |
| `ineligible_for_screening`, `dnc`   | Not screened (did not qualify, or asked not to be contacted). |

## Send employment outcomes

`POST /employment-outcomes` (scope `outcomes:write`) records what happened to people you hired: their hire and start dates, and whether and why they left. Send up to **500** rows per request. You can resend the same rows safely: a row that hasn't changed is reported as `unchanged` and nothing is written.

Sending outcomes never changes a candidate's stage in CONFIRM and never messages the candidate.

```bash
curl -X POST https://api.confirm.global/api/v1/integration/employment-outcomes \
  -H "Authorization: Bearer $CONFIRM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "outcomes": [
      {
        "candidate_id": "c1a7e0f2-...",
        "employee_id": "E-104233",
        "hire_date": "2026-10-27",
        "start_date": "2026-11-03",
        "still_employed": false,
        "termination_date": "2026-12-15",
        "termination_type": "voluntary",
        "termination_reason": "Resigned - Other Employment",
        "position": "Customer Care Rep"
      }
    ]
  }'
```

### Row fields

| Field                                       | Required                         | Description                                                                                                                                                                                             |
| ------------------------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `application_id`, `candidate_id` or `email` | One of them                      | Who this row is about. `application_id` is most precise. With `candidate_id` or `email`, CONFIRM uses that person's most recent hired application (or most recent application if none is marked hired). |
| `employee_id`                               | No                               | Your own employee number.                                                                                                                                                                               |
| `hire_date`                                 | Yes                              | `YYYY-MM-DD`.                                                                                                                                                                                           |
| `start_date`                                | No                               | `YYYY-MM-DD`. Not before `hire_date`.                                                                                                                                                                   |
| `still_employed`                            | Yes                              | `true` or `false`.                                                                                                                                                                                      |
| `termination_date`                          | When `still_employed` is `false` | `YYYY-MM-DD`. Not before the start (or hire) date. Leave it out when `still_employed` is `true`.                                                                                                        |
| `termination_type`                          | When `still_employed` is `false` | One of `voluntary`, `involuntary`, `business_reason` (no fault, e.g. position ended or workforce reduction), `no_show` (never started), `mutual`, `other`.                                              |
| `termination_reason`                        | No                               | Your own reason text, as written in your HR system.                                                                                                                                                     |
| `position`                                  | No                               | Role or department at hire.                                                                                                                                                                             |

* When `still_employed` is `true`, leave out `termination_date`, `termination_type` and `termination_reason`.
* Optional fields can be left out or sent as `null`.
* **Each row replaces what CONFIRM holds for that hire.** An optional field you leave out of a resend is cleared. Always send the full row.
* Leave internal transfers out. They aren't separations.

### Response

Every row gets a result. A bad row doesn't stop the others.

```json
{
  "summary": { "received": 3, "created": 1, "updated": 1, "unchanged": 0, "errors": 1 },
  "results": [
    { "index": 0, "status": "created", "application_id": "3b9d44c1-..." },
    { "index": 1, "status": "updated", "application_id": "7e21..." },
    { "index": 2, "status": "error", "error": { "code": "not_found", "message": "No application found for this candidate_id." } }
  ]
}
```

| Row error code       | Meaning                                                                         |
| -------------------- | ------------------------------------------------------------------------------- |
| `missing_identifier` | The row has no `application_id`, `candidate_id` or `email`.                     |
| `not_found`          | No matching application in your organization.                                   |
| `ambiguous_email`    | More than one candidate has that email. Send `candidate_id` instead.            |
| `invalid_row`        | A field is missing or invalid; the message says which.                          |
| `internal_error`     | This row couldn't be saved. Send it again; contact support if it keeps failing. |

The request itself is rejected with `400 invalid_request` when the body isn't a JSON object, has no `outcomes` array, has an empty array or more than 500 rows, or contains unknown fields.

## Errors

Request-level errors use this envelope. Branch on `code`:

```json
{
  "error": {
    "type": "authentication_error",
    "code": "invalid_api_key",
    "message": "API key is not valid.",
    "request_id": "3f2b8c1e-..."
  }
}
```

| Status | Code                  | Meaning                                                              |
| ------ | --------------------- | -------------------------------------------------------------------- |
| 401    | `missing_credentials` | No `Authorization: Bearer` header.                                   |
| 401    | `invalid_api_key`     | Unknown or revoked key.                                              |
| 401    | `wrong_environment`   | A production key used on staging, or a sandbox key on production.    |
| 403    | `insufficient_scope`  | The key doesn't have the scope this endpoint needs.                  |
| 400    | `invalid_request`     | A parameter or the request body is invalid; `param` names the field. |
| 400    | `invalid_cursor`      | The `cursor` value isn't one we issued.                              |
| 404    | `not_found`           | No such application in your organization.                            |

Include the `request_id` when you contact support.