# Create or replace a candidate

> Store one of your users' resumes (as text, a PDF or DOCX file, a LinkedIn link or a JSON Resume) and have it read for scoring. Uses one resume read from the Match allowance, nothing when unchanged.

Source: https://hyperjobs.io/docs/api-reference/candidates-put

<EndpointHeader method="PUT" path="/v1/candidates/{id}" />

The first half of the [Match API](/docs/guides/match-scores): put a user's
resume under **your own id** for them, once, and it is read (skills, roles,
certificates, languages) so you can
[score it against any job](/docs/api-reference/candidates-scores) as often as
you like. PUT again under the same id whenever the resume changes; the new one
replaces the old.

<CodeGroup>
```bash title="cURL"
curl -X PUT https://api.hyperjobs.io/v1/candidates/user_8812 \
  -H "Authorization: Bearer $HYPERJOBS_KEY" \
  -H "Content-Type: application/json" \
  -d @- <<'EOF'
{ "text": "Senior backend engineer. Eight years of Go and PostgreSQL…", "language": "en" }
EOF
```

```js title="Node"
import { readFile } from "node:fs/promises";

const res = await fetch(`https://api.hyperjobs.io/v1/candidates/${encodeURIComponent(userId)}`, {
  method: "PUT",
  headers: { Authorization: `Bearer ${process.env.HYPERJOBS_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    file: { name: "resume.pdf", content_base64: (await readFile("resume.pdf")).toString("base64") },
  }),
});
const candidate = await res.json(); // 200: read · 202: still reading, poll GET /v1/candidates/{id}
```

```python title="Python"
import base64, os, requests

with open("resume.pdf", "rb") as f:
    body = {"file": {"name": "resume.pdf", "content_base64": base64.b64encode(f.read()).decode()}}

res = requests.put(
    f"https://api.hyperjobs.io/v1/candidates/{user_id}",
    json=body,
    headers={"Authorization": f"Bearer {os.environ['HYPERJOBS_KEY']}"},
    timeout=60,
)
candidate = res.json()
```
</CodeGroup>

## Path parameters

<Fields>
  <ParamField path="id" type="string" required>
    **Your** id for the candidate: 1 to 100 characters of `A–Z a–z 0–9 _ . : -`.
    Use the id your own system already has for the user. Only your account
    can see or use it: two accounts with a candidate called `42` have two
    different candidates.
  </ParamField>
</Fields>

No query parameters: any one is a `400`.

## Body

A JSON object with **exactly one** of `text`, `file`, `linkedin_url` or
`profile`. Two, or none, is a `400` that names the field. An unknown field is
a `400` too, never ignored.

<Fields>
  <ParamField body="text" type="string">
    The resume as plain text, **200 to 60,000** characters.
  </ParamField>
  <ParamField body="file" type="{ name, content_base64 }">
    A **PDF** or **Word .docx** file: `name` ends in `.pdf` or `.docx`, and
    `content_base64` is the file's bytes, base64-encoded, at most **5 MB**
    decoded. A scanned PDF with no text layer can't be read (`422`); send its
    text instead.
  </ParamField>
  <ParamField body="linkedin_url" type="string">
    A public LinkedIn profile, `https://www.linkedin.com/in/<name>`. The
    profile is fetched by an outside service, which is why it usually answers
    `202`: fetching and reading take up to a minute.
  </ParamField>
  <ParamField body="profile" type="object">
    A [JSON Resume](https://jsonresume.org/schema) object, with at least one of
    its sections (`basics`, `work`, `education`, `skills`, …). Names, emails,
    phone numbers and addresses aren't needed and aren't used. Leave them out.
  </ParamField>
  <ParamField body="language" type="string">
    The resume's language: `en`, `Italian`. Optional, and not taken with
    `linkedin_url`; when omitted it's detected.
  </ParamField>
</Fields>

The whole body is at most 8 MB.

## Cost

| Request | Uses |
| --- | --- |
| A resume read: `text`, `file`, `profile` or `linkedin_url` | 1 resume read |
| The same content as the stored one (`changed: false`) | nothing |
| Any `4xx` or `503` | nothing |

From the Match API's own monthly allowance, not your jobs: 2 resume reads a
month on every plan, 1,000 to 7,500 with a [Match add-on](/help/plans#the-match-api).
A LinkedIn link counts as 2 reads: the profile is fetched before it is read.
A `202` is counted when it is accepted, like a `200`: the read is under way.
With the month's reads used up, the request is refused with a `402` (`scope`
`match_reads`) **before anything is read**.

## Candidates kept

You may keep 2 candidates at once on every plan, 5,000 to 50,000 with a Match add-on.
A PUT with a **new** id past that is a `403` (`scope` `match_candidates`);
replacing a resume you already keep is always allowed, and
[deleting](/docs/api-reference/candidates-delete) one makes room. A candidate
nobody reads or scores for **180 days** is deleted for you.

## Response

`200` when the resume is read, usually within seconds, or when its content
is the same as the stored one. `202` when the read continues: poll
[`GET /v1/candidates/{id}`](/docs/api-reference/candidates-retrieve) until
`status` is `ready`.

<Fields>
  <ResponseField name="id" type="string">Your id, as sent.</ResponseField>
  <ResponseField name="status" type="&quot;ready&quot; | &quot;reading&quot;">
    `ready`: scores can be asked for. `reading`: not yet.
  </ResponseField>
  <ResponseField name="source" type="&quot;text&quot; | &quot;file&quot; | &quot;linkedin&quot; | &quot;profile&quot;">
    The form the resume came in.
  </ResponseField>
  <ResponseField name="changed" type="boolean">
    `false` when the content was the same as the stored one: nothing was read,
    and no read used.
  </ResponseField>
  <ResponseField name="language" type="string | null">The resume's language.</ResponseField>
  <ResponseField name="found" type="{ skills, roles, certificates, languages } | null">
    How many of each the read found: a quick check that it read a resume and
    not a cover letter. `null` while reading.
  </ResponseField>
  <ResponseField name="read_at" type="string | null">When it was read.</ResponseField>
</Fields>

```json title="Response"
{
  "id": "user_8812",
  "status": "ready",
  "source": "text",
  "changed": true,
  "language": "en",
  "found": { "skills": 14, "roles": 3, "certificates": 1, "languages": 2 },
  "read_at": "2026-11-09T10:42:17.000Z"
}
```

## Errors

| Status | Cause |
| --- | --- |
| `400` | A bad id, no form or two, an unknown field, text out of bounds, a file that isn't a `.pdf`/`.docx` or is over 5 MB, a link that isn't a LinkedIn profile. The body names the `param`. |
| `401` | Missing, unknown, revoked, or expired key. |
| `402` | The month's resume reads are used up (`scope: "match_reads"`), checked before reading. |
| `403` | A new id past the candidates you may keep (`scope: "match_candidates"`). |
| `422` | The resume couldn't be read: not a resume, a scan with no text, a LinkedIn profile that couldn't be fetched. `detail` says which. |
| `429` | [Rate limit](/docs/rate-limits) exceeded. |
| `503` | The resume reader is unavailable; retry after `Retry-After`. Nothing is used. |

## Next

<CardGroup cols={2}>
  <Card title="Score a candidate" icon="Target" href="/docs/api-reference/candidates-scores">
    Job ids in, a score per job out.
  </Card>
  <Card title="Match scores" icon="BookOpen" href="/docs/guides/match-scores">
    The whole flow, and what the verdicts mean.
  </Card>
</CardGroup>
