> ## 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.

# Create a candidate

> Finds or creates a candidate. Returns `201` with a new candidate, or `200` with the one that already has this `external_id` or email. A candidate matched by email that has no `external_id` takes the one you send. A candidate matched by email that has a different `external_id` is another record in your ATS, so the request returns `409` `candidate_email_conflict` rather than that candidate. A match deleted in your ATS returns `409` `candidate_deleted` and is left unchanged.

## Matching an existing candidate

Alex looks for the candidate by `external_id` first, then by email, and returns `200` with the match:

* A match deleted in your ATS returns `409` `candidate_deleted` and is left unchanged: it never takes the `external_id` you send. The message names its id, which you can read with `GET /candidates/{id}` or erase with `DELETE /candidates/{id}`.
* A match by email with no `external_id` takes the one you send.
* A match by email with a different `external_id` belongs to another record in your ATS. Alex returns `409` `candidate_email_conflict` rather than that candidate, so you never act on the wrong person. The message names the existing candidate's id.

`phone` and `external_id` sent as `null` or a blank string count as not sent.


## API Specification

The full API specification for this endpoint is available in the [documentation index](https://docs.alex.com/llms.txt).


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