---
title: "Resolve Candidates For Compare"
method: POST
path: "/api/compare/resolve"
tags: ["compare-internal"]
---

# Resolve Candidates For Compare

`POST /api/compare/resolve`

## Request

- Base URL: `https://api.thebetterhire.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.thebetterhire.ai/api/compare/resolve`
- Auth: HTTP bearer

Resolve candidate emails → candidate_ids for the compare page.

READ-ONLY on purpose — unknown emails are silently skipped, never created
(unlike candidates.py /resolve, whose find_or_create semantics would mint
phantom candidate rows from typo'd emails here). Falls back to the email on
the candidate's interviews when no candidates row exists. Org comes from
the token — this replaces a Next.js route that trusted a spoofable
X-Organization-ID header (API proxy sweep).

## Request body

- ResolveEmailsRequest
  - `emails` string[], required: Candidate emails to resolve to candidate_ids (min 2).

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thebetterhire/apis/interanalysis-b2b-api.md) · [All operations](https://skmtc.dev/thebetterhire/apis/interanalysis-b2b-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thebetterhire/apis/interanalysis-b2b-api/revisions/c8ad03e900ea?raw)
