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

# Email

> Find a person's work email from a company domain or name, list the emails on a company's site, and check whether an address can receive mail.

Find a person's work email from a company domain or name, list the emails on a company's site, and check whether an address can receive mail. See every field in the [Email reference](/api-reference/endpoint/email-find), or try it in the [playground](https://stophy.dev/playground).

## Find a person's work email from their name, or the emails on a company's site

<CodeGroup>
  ```typescript TypeScript icon="https://mintcdn.com/sirathic/7E4w9-IC4ysabjfc/images/icons/typescript.svg?fit=max&auto=format&n=7E4w9-IC4ysabjfc&q=85&s=d8272a85e64145620f1fbbfcf7932986" theme={null}
  import { Stophy } from "stophy";

  const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
  const result = await stophy.email.find({ name: "Patrick Collison", domain: "stripe.com" });
  console.log(result.data);
  ```

  ```python Python icon="python" theme={null}
  from stophy import Stophy

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.email.find(name="Patrick Collison", domain="stripe.com")
  print(result["data"])
  ```

  ```bash cURL icon="terminal" theme={null}
  curl -X POST https://api.stophy.dev/v1/email/find \
    -H "Authorization: Bearer $STOPHY_API_KEY" \
    -H "content-type: application/json" \
    -d '{"name":"Patrick Collison","domain":"stripe.com"}'
  ```

  ```bash CLI icon="square-terminal" theme={null}
  stophy email find stripe.com --name "Patrick Collison"
  ```
</CodeGroup>

The response:

```json theme={null}
{
  "success": true,
  "data": {
    "email": "patrick@stripe.com",
    "status": "valid",
    "domain": "stripe.com",
    "mxProvider": "google.com"
  },
  "creditsUsed": 1,
  "requestId": "7ee48ae7-9f8f-4d3a-ab08-f2ba90fa13ae"
}
```

## Endpoints

| Endpoint | Cost |
| - | - |
| [Find a person's work email from their name, or the emails on a company's site](/api-reference/endpoint/email-find) | 1 credit |
| [Check if an email address can receive mail](/api-reference/endpoint/email-verify) | 1 credit |

## More ways to call it

### Check if an email address can receive mail

<CodeGroup>
  ```typescript TypeScript icon="https://mintcdn.com/sirathic/7E4w9-IC4ysabjfc/images/icons/typescript.svg?fit=max&auto=format&n=7E4w9-IC4ysabjfc&q=85&s=d8272a85e64145620f1fbbfcf7932986" theme={null}
  import { Stophy } from "stophy";

  const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
  const result = await stophy.email.verify({ email: "info@the305agency.com" });
  console.log(result.data);
  ```

  ```python Python icon="python" theme={null}
  from stophy import Stophy

  stophy = Stophy()  # reads STOPHY_API_KEY
  result = stophy.email.verify(email="info@the305agency.com")
  print(result["data"])
  ```

  ```bash cURL icon="terminal" theme={null}
  curl -X POST https://api.stophy.dev/v1/email/verify \
    -H "Authorization: Bearer $STOPHY_API_KEY" \
    -H "content-type: application/json" \
    -d '{"email":"info@the305agency.com"}'
  ```

  ```bash CLI icon="square-terminal" theme={null}
  stophy email verify info@the305agency.com
  ```
</CodeGroup>

The response. `status` is `valid`, `risky` or `invalid`.

```json theme={null}
{
  "success": true,
  "data": {
    "email": "info@the305agency.com",
    "status": "valid",
    "mxProvider": "google.com",
    "isRole": true,
    "isDisposable": false,
    "isFree": false
  },
  "creditsUsed": 1,
  "requestId": "552f1480-c351-4bb8-a417-48aaa08e94c8"
}
```

### Emails on a company's site

Leave out the name to get the emails found on the company's site, each one checked. `type` is `personal` or `generic`.

```bash cURL icon="terminal" theme={null}
curl -X POST https://api.stophy.dev/v1/email/find \
  -H "Authorization: Bearer $STOPHY_API_KEY" \
  -H "content-type: application/json" \
  -d '{"domain":"the305agency.com"}'
```

The response:

```json theme={null}
{
  "success": true,
  "data": {
    "domain": "the305agency.com",
    "mxProvider": "google.com",
    "results": [
      {
        "email": "info@the305agency.com",
        "status": "valid",
        "type": "generic"
      },
      {
        "email": "info@sandra305.com",
        "status": "valid",
        "type": "generic"
      }
    ]
  },
  "creditsUsed": 1,
  "requestId": "d01438d1-ab71-480e-9ea7-c3e29ea29c9e"
}
```

<Tip>You pay 1 credit only when a valid email comes back. Risky, not found and failed calls cost nothing. A role address like info@ is judged by its mail server, and `isRole` flags it.</Tip>
