TL;DR: Validate the parsed candidate before POSTing: require a non-empty, plausible email, and route email-less records to a manual-review queue instead of the API. Ashby rejects the create without an email, so the gate belongs in the agent, not in retry logic.

```text
Ashby API 422 "candidateEmail is required"
```

1. Log the parsed candidate object to confirm the email field is empty or missing, and trace which parse step dropped it. Expected: you see the gap in the parse output.
2. Add a pre-POST validation: the agent must have a non-empty, plausibly formatted email before calling Ashby. Expected: incomplete records never reach the API.
3. Route records missing an email to a manual-review queue or a fallback enrichment step instead of posting. Expected: no more 422s, and email-less candidates get handled deliberately.
4. Improve the parser for the common miss causes (image-based PDFs, obfuscated addresses). Expected: the missing-email rate falls over time.

## Use this when
- Ashby returns 422 on candidateEmail.
- The resume parser silently drops fields.
- Candidate data comes from varied resume formats.

## Not for this skill when
- The 422 names a different required field.
- The error is 401 (authentication).
- The email is present but malformed (a different validation issue).

## Variant phrasings
- "Ashby candidate email missing"
- "422 candidateEmail required"
- "Ashby create candidate email validation"
- "candidateEmail is required Ashby"

## Why it happens
Ashby requires candidateEmail on candidate creation, but resume parsers silently drop emails from tricky inputs: scanned PDFs, addresses split across lines, or obfuscated formats. The agent posts what it parsed without checking completeness.

## Edge cases
- Some candidates genuinely have no email; decide the policy up front (skip vs manual review).
- Never invent or guess an email address to satisfy the validator.
- LinkedIn profiles often hide emails behind connection gates; plan a fallback.
- A "plausible format" check catches empty strings but not typos; consider a verification step for high-value roles.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_KgYwn75ZTzn_1c9mXXDKeQ
