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

# LeadMagic: Email Validation

> Validate an email address for deliverability and retrieve associated company information. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Validate an email address for deliverability and retrieve associated company information.

> [!NOTE]
>
> Tool ID: `leadmagic_email_validation`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'leadmagic_email_validation',
  {
    "email": "jane.doe@example.com"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute leadmagic_email_validation --input '{
  "email": "jane.doe@example.com"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "email": "jane.doe@example.com",
    "email_status": "valid"
  }
}
```

Use `deepline describe leadmagic_email_validation --json` for the latest machine-readable contract.

## Input reference

Validate an email address for deliverability and retrieve associated company information.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.email` | `string` | Yes | — | Email address to validate. |
| `payload.first_name` | `string` | No | — | First name of the person (optional). |
| `payload.last_name` | `string` | No | — | Last name of the person (optional). |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Validate an email address for deliverability and retrieve associated company information.",
    "properties": {
      "email": {
        "type": "string",
        "description": "Email address to validate."
      },
      "first_name": {
        "type": "string",
        "description": "First name of the person (optional)."
      },
      "last_name": {
        "type": "string",
        "description": "Last name of the person (optional)."
      }
    },
    "required": [
      "email"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.email` | `string` | Yes | — | — |
| `result.data.email_status` | `"valid" \| "valid_catch_all" \| "invalid" \| "unknown" \| "catch_all"` | Yes | — | Allowed: `valid`, `valid_catch_all`, `invalid`, `unknown`, `catch_all`. |
| `result.data.message` | `string` | No | — | — |
| `result.data.is_domain_catch_all` | `boolean` | No | — | — |
| `result.data.mx_record` | `string` | No | — | — |
| `result.data.mx_provider` | `string` | No | — | — |
| `result.data.mx_security_gateway` | `boolean` | No | — | — |
| `result.data.company_name` | `string` | No | — | — |
| `result.data.company_industry` | `string` | No | — | — |
| `result.data.company_size` | `string` | No | — | — |
| `result.data.company_founded` | `integer` | No | — | — |
| `result.data.company_type` | `string` | No | — | — |
| `result.data.company_linkedin_url` | `string` | No | — | — |
| `result.data.company_linkedin_id` | `string` | No | — | — |
| `result.data.company_facebook_url` | `string \| null` | No | — | — |
| `result.data.company_twitter_url` | `string \| null` | No | — | — |
| `result.data.company_location` | `object` | No | — | Geographic location information |
| `result.data.company_location.name` | `string` | No | — | — |
| `result.data.company_location.locality` | `string` | No | — | — |
| `result.data.company_location.region` | `string` | No | — | — |
| `result.data.company_location.metro` | `string` | No | — | — |
| `result.data.company_location.country` | `string` | No | — | — |
| `result.data.company_location.continent` | `string` | No | — | — |
| `result.data.company_location.street_address` | `string` | No | — | — |
| `result.data.company_location.address_line_2` | `string \| null` | No | — | — |
| `result.data.company_location.postal_code` | `string` | No | — | — |
| `result.data.company_location.geo` | `string` | No | — | — |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "email": {
            "type": "string"
          },
          "email_status": {
            "type": "string",
            "enum": [
              "valid",
              "valid_catch_all",
              "invalid",
              "unknown",
              "catch_all"
            ]
          },
          "message": {
            "type": "string"
          },
          "is_domain_catch_all": {
            "type": "boolean"
          },
          "mx_record": {
            "type": "string"
          },
          "mx_provider": {
            "type": "string"
          },
          "mx_security_gateway": {
            "type": "boolean"
          },
          "company_name": {
            "type": "string"
          },
          "company_industry": {
            "type": "string"
          },
          "company_size": {
            "type": "string"
          },
          "company_founded": {
            "type": "integer"
          },
          "company_type": {
            "type": "string"
          },
          "company_linkedin_url": {
            "type": "string"
          },
          "company_linkedin_id": {
            "type": "string"
          },
          "company_facebook_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_twitter_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "company_location": {
            "type": "object",
            "description": "Geographic location information",
            "properties": {
              "name": {
                "type": "string"
              },
              "locality": {
                "type": "string"
              },
              "region": {
                "type": "string"
              },
              "metro": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "continent": {
                "type": "string"
              },
              "street_address": {
                "type": "string"
              },
              "address_line_2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "type": "string"
              },
              "geo": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "email",
          "email_status"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `per_result` (per result).
* Estimated Deepline credits: `0.09` per pricing unit.

## Related documentation

* [LeadMagic provider guide](https://deepline.com/docs/providers/leadmagic/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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