> For the complete documentation index, see [llms.txt](https://docs.whiteintel.io/whiteintel-api-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.whiteintel.io/whiteintel-api-doc/whiteintel-api-v1/infostealer-api/corporate-email-leaks-api.md).

# Corporate Email Leaks API

## Description

The Corporate Email Leaks API allows users to retrieve leaks associated specific email extension (e.g., \[@]example.com). The request must include the query parameter and apikey. Other parameters are optional and can be used to include system information of compromised devices or to specify a custom date range.

## Endpoint

`POST /api/get_corporate_email_leaks.php`

## Required Headers

| Name         | Description                       |
| ------------ | --------------------------------- |
| Content-Type | Must be set to `application/json` |

## Parameters

| Name                  | Type   | Required | Default                    | Description                                                |
| --------------------- | ------ | -------- | -------------------------- | ---------------------------------------------------------- |
| query                 | string | Yes      | N/A                        | The query to search for leaks (e.g., example.com)          |
| apikey                | string | Yes      | N/A                        | Your API key.                                              |
| include\_system\_info | int    | No       | 0                          | Include system information of compromised devices (0 or 1) |
| start\_date           | string | No       | 1 week before current date | The start date for retrieving leaks in `YYYY-MM-DD` format |
| end\_date             | string | No       | Current date               | The end date for retrieving leaks in `YYYY-MM-DD` format   |
| limit                 | int    | No       | N/A                        | Limits the results to given number                         |

## Sample Request

### Request URL

POST /api/api/get\_corporate\_email\_leaks.php

```json
{
    "query": "example.com",
    "include_system_info": 0,
    "start_date": "2024-05-01",
    "end_date": "2024-05-08"
}
```

### Example Success Response

```json
{"total_leaks":2,"remaining_daily_api_calls":176,"data":[{"url":"https:\/\/outlook.microsoftonline.com\/","username":"nonexists@example.com","password":"*****","log_date":"2024-05-16"}]}
```

### Example Error Response

```json
{"error":"Invalid type."}
```

## Code Examples

Example with Curl

```bash
curl -X POST https://whiteintel.io/api/get_corporate_email_leaks.php \
     -H "Content-Type: application/json" \
     -d '{
           "apikey": "yourapikey",
           "query": "example.com",
           "include_system_info": 0,
           "start_date": "2023-05-01",
           "end_date": "2023-05-08"
         }'
```

Example with Python

```python

import requests

url = "https://whiteintel.io/api/get_corporate_email_leaks.php"
payload = {
    "apikey": "yourapikey",
    "query": "example.com",
    "include_system_info": 0,
    "start_date": "2023-05-01",
    "end_date": "2023-05-08"
}
headers = {
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

if response.status_code == 200:
    print("Response:", response.json())
else:
    print("Failed to retrieve corporate email leaks:", response.status_code, response.text)

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.whiteintel.io/whiteintel-api-doc/whiteintel-api-v1/infostealer-api/corporate-email-leaks-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
