> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encrata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use cases

> Common jobs you can solve with Encrata, each with a copy-paste recipe.

Every Encrata lookup maps to a real job. Here are the most common ones, each with a runnable recipe. All snippets authenticate with `Authorization: Bearer YOUR_API_KEY`.

| Use case | Pattern | Lookup |
| - | - | - |
| Signup validation | Validate at a decision point | Email Validity |
| Seller verification | Validate at a decision point | Email Validity |
| Recovery checks | Validate at a decision point | Email Validity |
| Bounce reduction | Validate at a decision point | Email Validity |
| Fraud screening | Screen for risk | Email Validity + Breaches |
| List cleaning | Clean a list in bulk | Email Validity (bulk) |
| CRM hygiene | Clean a list in bulk, on a schedule | Email Validity (bulk) |

## Validate an email at a decision point

Block fake, mistyped, and disposable addresses the moment a user enters one, so every account, listing, or recovery address starts out working. Check `status`, `disposable`, and `did_you_mean` on [Email Validity](/api-reference/endpoint/validate-email).

```python theme={"theme":{"light":"github-light","dark":"vesper"}}
import requests

HEADERS = {"Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"}

def check_email(email: str):
    r = requests.post(
        "https://developer.encrata.com/api/lookup/email/validity",
        headers=HEADERS, json={"email": email},
    ).json()

    if r.get("did_you_mean"):
        return "suggest", r["did_you_mean"]        # likely typo, e.g. gmial.com
    if r.get("disposable") or r.get("status") != "valid":
        return "reject", None
    return "accept", None
```

<Note>
  This one pattern powers **signup validation**, **seller verification**,
  **recovery checks**, and **bounce reduction** - only the decision point
  changes. For bounce reduction, run it just before you add an address to a send.
</Note>

## Screen for fraud and abuse

Flag disposable or throwaway domains behind suspicious signups before they reach your product. Add an [Email Breaches](/api-reference/endpoint/check-breaches) check for a fuller risk picture.

```python theme={"theme":{"light":"github-light","dark":"vesper"}}
import requests

HEADERS = {"Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"}

def signup_risk(email: str) -> str:
    v = requests.post(
        "https://developer.encrata.com/api/lookup/email/validity",
        headers=HEADERS, json={"email": email},
    ).json()

    if v.get("disposable") or v.get("status") == "risky":
        return "block"

    b = requests.post(
        "https://developer.encrata.com/api/lookup/email/breaches",
        headers=HEADERS, json={"email": email},
    ).json()

    # A brand-new address with zero breach history can signal a throwaway.
    return "review" if not b.get("breached") else "allow"
```

## Clean a list in bulk

Remove invalid and dead addresses before an outbound campaign to keep open rates honest and costs down. Submit the whole list as one bulk job and keep the rows where `status` is `valid`.

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
curl -X POST "https://developer.encrata.com/api/jobs/bulk" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "type=validity" \
  -F "download_link=true" \
  -F "file=@list.csv"
```

Filter the result to just the deliverable rows when you download it:

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
curl -L "https://developer.encrata.com/api/jobs/exports/download?kind=validity&id=JOB_ID&format=csv&filter=valid" \
  -H "Authorization: Bearer YOUR_API_KEY" -o clean.csv
```

<Note>
  The same job powers **list cleaning** and ongoing **CRM hygiene** - run it on
  your own schedule, or drive it from a [workflow](/guides/workflows), to keep
  records clean as your database grows. See [Bulk operations](/guides/bulk-operations)
  for status checks and downloads.
</Note>

## Enrich a signup into a profile

Turn a new user's email into a full contact record - name, company, role, and socials - with [Email Identity](/api-reference/endpoint/email-identity). Fields live under `person`.

```python theme={"theme":{"light":"github-light","dark":"vesper"}}
import requests

HEADERS = {"Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"}

person = requests.post(
    "https://developer.encrata.com/api/lookup/email/identity",
    headers=HEADERS, json={"email": "jane@acme.com"},
).json()["person"]

crm.create_contact(
    name=f"{person.get('first_name', '')} {person.get('last_name', '')}".strip(),
    company=person.get("company"),
    title=person.get("job_role"),
    linkedin=person.get("socials", {}).get("linkedin"),
)
```

## Next steps

<CardGroup cols={2}>
  <Card title="Examples" icon="rectangle-code" href="/examples">
    A recipe for every individual lookup.
  </Card>

  <Card title="Bulk operations" icon="layer-group" href="/guides/bulk-operations">
    Run any lookup over a large list.
  </Card>

  <Card title="Workflows" icon="diagram-project" href="/guides/workflows">
    Chain lookups into automated pipelines.
  </Card>

  <Card title="All lookups" icon="list" href="/lookups">
    Every lookup, its input, and its cost.
  </Card>
</CardGroup>
