# Temp Email | Disposable Inbox, OTP & Verification Catcher (`apivault_labs/temp-email`) Actor

Create a disposable email inbox and read incoming messages on demand: OTP codes, sign-up confirmations and verification links. Wait for a specific email, auto-extract codes and magic-link tokens, read attachments and headers. Keyless, no signup. For QA, automation and signup testing.

- **URL**: https://apify.com/apivault\_labs/temp-email.md
- **Developed by:** [Apivault Labs](https://apify.com/apivault_labs) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 message receiveds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 📧 Temp Email — Disposable Inbox, OTP & Verification Catcher

Spin up a **disposable email inbox** in seconds and read its incoming messages — **one-time codes (OTP), sign-up confirmations and verification links** — on demand. Perfect for **QA, test automation, sign-up flows, scraping pipelines and bots** that need a throwaway mailbox.

No API key, no registration. Create an inbox instantly, then read it on demand with built-in **OTP/verification-code extraction**.

---

### 📮 Available domains

Just pick a domain from the dropdown when you create the address:

- **Auto** — the fastest, most reliable random address (recommended).
- **Branded custom domains:** `@swagpapa.com` · `@rulersonline.com` · `@besttempmail.com` · `@deepmails.org` · `@embassybase.com` · `@justdefinition.com` · `@gongjua.com` · `@123mails.org`
- **Gmail aliases:** dot trick (`a.b.c@gmail.com`), plus trick (`abc+tag@gmail.com`), Googlemail (`a.bc@googlemail.com`).

> **Reading:** Auto inboxes are read with their key (token). Branded and Gmail inboxes can be read with **just the address** — leave the key empty.

---

### ✨ Highlights

- 📨 **Create a throwaway inbox** instantly — pick any domain, get the address + credentials in ~1 second.
- 📥 **Read on demand** — when you expect a message, run `read` on the inbox; it polls until the mail lands (great for catching a verification email after a sign-up).
- 🔑 **OTP & link extraction** — pulls likely one-time codes and verification/confirmation links out of the message body.
- 🎯 **Wait for the right email** — filter by sender, subject or keyword and keep polling until the email you actually want arrives (ignore inbox noise and old mail).
- 📎 **Attachments** — see attachment metadata (filename, type, size, download URL) on each message.
- 📦 **Bulk create** — spin up many inboxes in a single run for load and parallel QA testing.
- 🛡️ **Reliable by default** — create retries automatically and falls back to the fast Auto pool if a branded inbox is unavailable.
- 🏷️ **Branded domains & Gmail aliases** — varied addresses, or a fast random one.
- 🔑 **Read by address** — branded/Gmail inboxes open with just the email (no key to keep).
- 🔁 **Re-readable** — the create result carries the inbox credentials so you can read the same inbox any time.
- 🆓 **Keyless** — no key, no signup, no proxy.

---

### 🧠 How it works

Two simple, separate steps:

| Action | What it does |
|--------|--------------|
| `create` *(default)* | Makes a new inbox and returns its **address + credentials instantly** (~1s). No waiting. |
| `read` | Checks an existing inbox for messages. Pass the `address` + credentials from a create run; it polls up to `waitTimeout` for new mail. |

Typical automation flow:
1. Run **create** → get the `address` (+ `token`/`password` or `code`).
2. Use the address to sign up somewhere / trigger a mail.
3. Run **read** with that address + credentials → get the message and the extracted `firstCode`.

---

### 📥 Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `domain` | string | `auto` | Pick the address domain: `auto`, a branded domain, or a Gmail alias. |
| `action` | string | `create` | `create` (new inbox, instant) or `read` (check an existing inbox). |
| `username` | string | — | Local part for the **Auto** domain (random if empty). |
| `count` | integer | `1` | `create` only: number of inboxes to create in one run (1-25). |
| `allowFallback` | boolean | `true` | `create` only: fall back to a reliable Auto inbox if a branded/Gmail inbox fails. |
| `address` | string | — | Inbox address (for `action=read`). |
| `inboxes` | array | — | `read` only: check several inboxes in one run, e.g. `[{"address":"a@x.com","key":"..."}]`. |
| `token` / `password` | string | — | Credentials for an **Auto** inbox (for `read`). |
| `code` | string | — | Credential for a branded/Gmail inbox (for `read`). |
| `waitTimeout` | integer | `0` | `read` only: 0 = check once and return instantly (fast). Set >0 to wait for mail. |
| `pollInterval` | integer | `6` | `read` only: seconds between inbox checks. |
| `matchFrom` | string | — | `read` only: keep waiting until an email from a sender containing this text arrives. |
| `matchSubject` | string | — | `read` only: only return emails whose subject contains this text. |
| `matchKeyword` | string | — | `read` only: only return emails containing this text anywhere (subject/body). |
| `onlyUnseen` | boolean | `false` | `read` only: skip messages already marked as seen. |
| `waitForNew` | boolean | `false` | `read` only: ignore mail already in the inbox when the run starts. |
| `latestOnly` | boolean | `false` | `read` only: return just the newest matching message. |
| `maxMessages` | integer | `0` | `read` only: cap how many matching emails to return (0 = no limit). |
| `extractCodes` | boolean | `true` | Extract OTP codes and verification links. |
| `includeBody` | boolean | `true` | Include full text/HTML body per message. |
| `codeMinLength` / `codeMaxLength` | integer | `4` / `8` | Length range for OTP code detection. |
| `codeRegex` | string | — | Advanced: custom regex to extract the code yourself. |
| `includeRaw` | boolean | `false` | Also return raw EML + parsed headers and SPF/DKIM/DMARC (Auto inboxes only). |

#### Example: create an inbox (instant)

```json
{
  "action": "create",
  "domain": "auto"
}
````

#### Example: create several inboxes at once

```json
{
  "action": "create",
  "domain": "auto",
  "count": 10
}
```

#### Example: branded address, then read it later

```json
{ "action": "create", "domain": "swagpapa.com" }
```

```json
{ "action": "read", "address": "abc@swagpapa.com" }
```

> Add `"waitTimeout": 60` to a read if you want it to keep waiting for an incoming mail instead of returning instantly.

#### Example: wait for the verification email from a specific sender

```json
{
  "action": "read",
  "address": "abc@swagpapa.com",
  "matchFrom": "no-reply@service.com",
  "waitForNew": true,
  "latestOnly": true,
  "waitTimeout": 90
}
```

> This keeps polling (ignoring anything already in the inbox) until a fresh email from `service.com` lands, then returns just that one message with its extracted `firstCode`.

#### Example: check several inboxes at once

```json
{
  "action": "read",
  "inboxes": [
    { "address": "a@swagpapa.com" },
    { "address": "u4f9k2@example.net", "key": "eyJ0eXAiOiJKV1Q..." }
  ]
}
```

> Takes one snapshot per inbox. Branded/Gmail addresses open with just the address; Auto addresses need their `key` (token).

***

### 📤 Output

**create** → one item with the new inbox address and its credentials:

```json
{
  "success": true,
  "address": "u4f9k2@example-domain.com",
  "token": "eyJ0eXAiOiJKV1Q...",
  "password": "…",
  "messageCount": 0
}
```

**read** → **one dataset item per email** (so a 3-message inbox = 3 results). Each item is a full message:

```json
{
  "success": true,
  "address": "u4f9k2@example-domain.com",
  "messageIndex": 1,
  "messageCount": 2,
  "id": "…",
  "from": "no-reply@service.com",
  "fromName": "Service",
  "subject": "Your verification code",
  "text": "…",
  "html": "…",
  "otpCodes": ["424864"],
  "verificationLinks": ["https://service.com/verify?token=…"],
  "firstCode": "424864",
  "token": "eyJ0eXAiOiJKV1Q..."
}
```

If the inbox is empty, **read** returns a single summary item with `messageCount: 0` and the inbox credentials so you can read again later.

| Field | Description |
|-------|-------------|
| `address` | The disposable inbox address. |
| `token` / `password` or `code` | Credentials to re-read this inbox later. |
| `messageIndex` / `messageCount` | Position of this email and the total found this read. |
| `from` / `fromName` / `subject` | Sender and subject of the email. |
| `text` / `html` | Full message body. |
| `otpCodes[]` / `verificationLinks[]` | Extracted one-time codes and verification links. |
| `verificationTokens[]` | Token-like values pulled from verification link query params (e.g. magic-link / passwordless tokens). |
| `firstCode` | The first extracted OTP code of this message (handy shortcut). |
| `hasAttachments` / `attachments[]` | Whether the email has attachments, and their metadata (filename, contentType, size, downloadUrl). |
| `raw` / `headers` / `authResults` | Raw EML source, parsed headers and the Authentication-Results line (when `includeRaw` is on, Auto inboxes). |
| `spf` / `dkim` / `dmarc` | Authentication verdicts when the receiving server provides them (`pass` / `fail`); `dkim` shows `signed` when a DKIM signature is present. |

***

### 💡 Use cases

- **Automated sign-up / account testing** — catch the confirmation email and code.
- **QA & end-to-end tests** — verify your product's transactional emails.
- **Scraping & bots** — register throwaway accounts that need email verification.
- **OTP capture** — pull the one-time code straight into your workflow.

### ⚙️ Notes & limits

- Billed per **inbox created** and per **message retrieved** — `create` = one charge for the new inbox; `read` = one charge per email delivered. **An instant check (`waitTimeout` 0) that finds nothing is free.** If you ask the Actor to **wait** for mail (`waitTimeout` > 0) and it actually has to poll, a single small **watch** charge applies for that run — so a fast lookup stays cheap while waiting is priced separately.
- **create** is instant; **read** checks once by default (`waitTimeout` 0) — set `waitTimeout` to keep waiting for mail to arrive.
- Disposable inboxes are short-lived by nature; read them promptly.
- Branded inboxes are rate-limited, so `read` uses a safe minimum poll interval automatically.

***

Built and maintained by **Apivault** — reliable data Actors, fair pricing.

# Actor input Schema

## `action` (type: `string`):

create = make a new inbox (returns its address + key instantly). read = check an existing inbox for messages.

## `domain` (type: `string`):

Only for Action = Create. Pick the address domain: Auto (fastest random), a branded domain, or a Gmail alias.

## `username` (type: `string`):

Only for the Auto domain - the local part of the address. Random if empty. Ignored for branded/Gmail domains.

## `count` (type: `integer`):

Only for Action = Create. Create this many disposable inboxes in one run (1-25). Each inbox is one result.

## `allowFallback` (type: `boolean`):

Only for Action = Create. If a branded/Gmail inbox can't be set up, create a reliable Auto inbox instead (recommended).

## `address` (type: `string`):

The email address to check (the one a Create run returned). The Domain field is ignored when reading.

## `inboxes` (type: `array`):

Only for Action = Read. Check several inboxes in one run. Paste a list of objects like \[{"address":"a@x.com","key":"..."}]. Branded/Gmail inboxes open with just the address; Auto inboxes need their key/token. Takes a single snapshot per inbox (no long polling).

## `key` (type: `string`):

For an Auto inbox: paste the 'token' from create (required). For branded/Gmail inboxes you can leave this EMPTY - they open with just the address.

## `password` (type: `string`):

Only for an Auto-domain inbox if its key/token expired - the password returned at create time.

## `waitTimeout` (type: `integer`):

For action=read. Default 0 = check once and return instantly (fast & cheap). Set a value (e.g. 60) only if you want to keep waiting for a mail to arrive. Max 120s.

## `pollInterval` (type: `integer`):

How often to check the inbox while waiting. Branded inboxes are rate-limited, so a minimum of ~12s is enforced automatically.

## `matchFrom` (type: `string`):

Only for Action = Read. Only return emails whose sender address or name contains this text (case-insensitive). The run keeps waiting until a matching mail arrives.

## `matchSubject` (type: `string`):

Only for Action = Read. Only return emails whose subject contains this text (case-insensitive).

## `matchKeyword` (type: `string`):

Only for Action = Read. Only return emails that contain this text anywhere (subject or body). Enables full-body fetch automatically.

## `onlyUnseen` (type: `boolean`):

Only for Action = Read. Skip messages already marked as seen.

## `waitForNew` (type: `boolean`):

Only for Action = Read. Ignore messages already in the inbox when the run begins - handy when re-testing the same address.

## `latestOnly` (type: `boolean`):

Only for Action = Read. Return just the most recent matching email (e.g. to grab the latest OTP). Reduces results.

## `maxMessages` (type: `integer`):

Only for Action = Read. Cap how many matching emails are returned (0 = no limit). Ignored when 'Return only the newest message' is on.

## `extractCodes` (type: `boolean`):

Scan message bodies and pull out likely one-time codes and verification links.

## `includeBody` (type: `boolean`):

Include the full text/HTML body of each message.

## `codeMinLength` (type: `integer`):

Shortest digit/alphanumeric code to treat as an OTP.

## `codeMaxLength` (type: `integer`):

Longest digit/alphanumeric code to treat as an OTP.

## `codeRegex` (type: `string`):

Advanced: a regex to extract the code yourself (first capture group, or whole match, is used). Overrides the length-based detection.

## `includeRaw` (type: `boolean`):

Also return the raw email source plus parsed headers and SPF/DKIM/DMARC verdicts (Auto inboxes only). Useful for deliverability QA.

## Actor input object example

```json
{
  "action": "create",
  "domain": "auto",
  "count": 1,
  "allowFallback": true,
  "inboxes": [],
  "waitTimeout": 0,
  "pollInterval": 6,
  "onlyUnseen": false,
  "waitForNew": false,
  "latestOnly": false,
  "maxMessages": 0,
  "extractCodes": true,
  "includeBody": true,
  "codeMinLength": 4,
  "codeMaxLength": 8,
  "includeRaw": false
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "username": "",
    "address": "",
    "inboxes": [],
    "key": "",
    "password": "",
    "matchFrom": "",
    "matchSubject": "",
    "matchKeyword": "",
    "codeRegex": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("apivault_labs/temp-email").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "username": "",
    "address": "",
    "inboxes": [],
    "key": "",
    "password": "",
    "matchFrom": "",
    "matchSubject": "",
    "matchKeyword": "",
    "codeRegex": "",
}

# Run the Actor and wait for it to finish
run = client.actor("apivault_labs/temp-email").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "username": "",
  "address": "",
  "inboxes": [],
  "key": "",
  "password": "",
  "matchFrom": "",
  "matchSubject": "",
  "matchKeyword": "",
  "codeRegex": ""
}' |
apify call apivault_labs/temp-email --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=apivault_labs/temp-email",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Temp Email | Disposable Inbox, OTP & Verification Catcher",
        "description": "Create a disposable email inbox and read incoming messages on demand: OTP codes, sign-up confirmations and verification links. Wait for a specific email, auto-extract codes and magic-link tokens, read attachments and headers. Keyless, no signup. For QA, automation and signup testing.",
        "version": "1.1",
        "x-build-id": "Zfvoucqda4xSiNPG9"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/apivault_labs~temp-email/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-apivault_labs-temp-email",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/apivault_labs~temp-email/runs": {
            "post": {
                "operationId": "runs-sync-apivault_labs-temp-email",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/apivault_labs~temp-email/run-sync": {
            "post": {
                "operationId": "run-sync-apivault_labs-temp-email",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "action": {
                        "title": "Action",
                        "enum": [
                            "create",
                            "read"
                        ],
                        "type": "string",
                        "description": "create = make a new inbox (returns its address + key instantly). read = check an existing inbox for messages.",
                        "default": "create"
                    },
                    "domain": {
                        "title": "Domain",
                        "enum": [
                            "auto",
                            "swagpapa.com",
                            "rulersonline.com",
                            "besttempmail.com",
                            "deepmails.org",
                            "embassybase.com",
                            "justdefinition.com",
                            "gongjua.com",
                            "123mails.org",
                            "gmail-dot",
                            "gmail-plus",
                            "googlemail"
                        ],
                        "type": "string",
                        "description": "Only for Action = Create. Pick the address domain: Auto (fastest random), a branded domain, or a Gmail alias.",
                        "default": "auto"
                    },
                    "username": {
                        "title": "Username (optional)",
                        "type": "string",
                        "description": "Only for the Auto domain - the local part of the address. Random if empty. Ignored for branded/Gmail domains."
                    },
                    "count": {
                        "title": "Number of inboxes",
                        "minimum": 1,
                        "maximum": 25,
                        "type": "integer",
                        "description": "Only for Action = Create. Create this many disposable inboxes in one run (1-25). Each inbox is one result.",
                        "default": 1
                    },
                    "allowFallback": {
                        "title": "Fall back to Auto if a branded inbox fails",
                        "type": "boolean",
                        "description": "Only for Action = Create. If a branded/Gmail inbox can't be set up, create a reliable Auto inbox instead (recommended).",
                        "default": true
                    },
                    "address": {
                        "title": "Inbox address",
                        "type": "string",
                        "description": "The email address to check (the one a Create run returned). The Domain field is ignored when reading."
                    },
                    "inboxes": {
                        "title": "Multiple inboxes (optional)",
                        "type": "array",
                        "description": "Only for Action = Read. Check several inboxes in one run. Paste a list of objects like [{\"address\":\"a@x.com\",\"key\":\"...\"}]. Branded/Gmail inboxes open with just the address; Auto inboxes need their key/token. Takes a single snapshot per inbox (no long polling)."
                    },
                    "key": {
                        "title": "Inbox key (optional for branded/Gmail)",
                        "type": "string",
                        "description": "For an Auto inbox: paste the 'token' from create (required). For branded/Gmail inboxes you can leave this EMPTY - they open with just the address."
                    },
                    "password": {
                        "title": "Inbox password (optional)",
                        "type": "string",
                        "description": "Only for an Auto-domain inbox if its key/token expired - the password returned at create time."
                    },
                    "waitTimeout": {
                        "title": "Max wait for mail (seconds)",
                        "minimum": 0,
                        "maximum": 120,
                        "type": "integer",
                        "description": "For action=read. Default 0 = check once and return instantly (fast & cheap). Set a value (e.g. 60) only if you want to keep waiting for a mail to arrive. Max 120s.",
                        "default": 0
                    },
                    "pollInterval": {
                        "title": "Poll interval (seconds)",
                        "minimum": 2,
                        "maximum": 30,
                        "type": "integer",
                        "description": "How often to check the inbox while waiting. Branded inboxes are rate-limited, so a minimum of ~12s is enforced automatically.",
                        "default": 6
                    },
                    "matchFrom": {
                        "title": "Match sender (optional)",
                        "type": "string",
                        "description": "Only for Action = Read. Only return emails whose sender address or name contains this text (case-insensitive). The run keeps waiting until a matching mail arrives."
                    },
                    "matchSubject": {
                        "title": "Match subject (optional)",
                        "type": "string",
                        "description": "Only for Action = Read. Only return emails whose subject contains this text (case-insensitive)."
                    },
                    "matchKeyword": {
                        "title": "Match keyword in body (optional)",
                        "type": "string",
                        "description": "Only for Action = Read. Only return emails that contain this text anywhere (subject or body). Enables full-body fetch automatically."
                    },
                    "onlyUnseen": {
                        "title": "Only unread messages",
                        "type": "boolean",
                        "description": "Only for Action = Read. Skip messages already marked as seen.",
                        "default": false
                    },
                    "waitForNew": {
                        "title": "Only mail that arrives after this run starts",
                        "type": "boolean",
                        "description": "Only for Action = Read. Ignore messages already in the inbox when the run begins - handy when re-testing the same address.",
                        "default": false
                    },
                    "latestOnly": {
                        "title": "Return only the newest message",
                        "type": "boolean",
                        "description": "Only for Action = Read. Return just the most recent matching email (e.g. to grab the latest OTP). Reduces results.",
                        "default": false
                    },
                    "maxMessages": {
                        "title": "Max messages to return",
                        "minimum": 0,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Only for Action = Read. Cap how many matching emails are returned (0 = no limit). Ignored when 'Return only the newest message' is on.",
                        "default": 0
                    },
                    "extractCodes": {
                        "title": "Extract OTP / verification codes",
                        "type": "boolean",
                        "description": "Scan message bodies and pull out likely one-time codes and verification links.",
                        "default": true
                    },
                    "includeBody": {
                        "title": "Include full message body",
                        "type": "boolean",
                        "description": "Include the full text/HTML body of each message.",
                        "default": true
                    },
                    "codeMinLength": {
                        "title": "Min OTP code length",
                        "minimum": 3,
                        "maximum": 12,
                        "type": "integer",
                        "description": "Shortest digit/alphanumeric code to treat as an OTP.",
                        "default": 4
                    },
                    "codeMaxLength": {
                        "title": "Max OTP code length",
                        "minimum": 3,
                        "maximum": 12,
                        "type": "integer",
                        "description": "Longest digit/alphanumeric code to treat as an OTP.",
                        "default": 8
                    },
                    "codeRegex": {
                        "title": "Custom code pattern (optional)",
                        "type": "string",
                        "description": "Advanced: a regex to extract the code yourself (first capture group, or whole match, is used). Overrides the length-based detection."
                    },
                    "includeRaw": {
                        "title": "Include raw EML & headers",
                        "type": "boolean",
                        "description": "Also return the raw email source plus parsed headers and SPF/DKIM/DMARC verdicts (Auto inboxes only). Useful for deliverability QA.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
