# Alias Mail Temp For Agents & AI (`osint_data/alias-mail`) Actor

Create a disposable inbox on your domain and wait for an OTP or magic link. Built for AI agents, browser automation, and QA: call create_inbox then wait_for_code via Apify MCP, apify-client, or Console. Not a public temp-mail scraper — mail stays on your Cloudflare routing.

- **URL**: https://apify.com/osint_data/alias-mail.md
- **Developed by:** [Valentin Dubois](https://apify.com/osint_data) (community)
- **Categories:** Agents, AI, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $100.00 / 1,000 code 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Alias Mail Temp For Agents & AI do?

**Alias Mail** is a **disposable inbox API for AI agents**. One run creates a **temporary email** on your domain and **waits for the OTP or magic link** — no webmail UI, no shared temp-mail pool.

It is the Apify front-end for the [Alias Mail API](https://alias-mail.w01f.workers.dev). Use it from the Console, `apify-client`, other Actors, or [Apify MCP](https://docs.apify.com/mcp) whenever a **browser-automation**, **QA**, or **LLM agent** must sign up, verify an email, or pass 2FA.

This Actor is **not** a mail server and **not** a public temp-mail scraper. MX and storage stay on Cloudflare. The Actor only calls `create_inbox` and `wait_for_code`.

### Why AI agents use this instead of temp-mail sites

Public temp-mail inboxes are shared, slow, and often blocked. Agents need a **private address** they can own for one task, then a **blocking wait** until the code exists.

- **Disposable inbox** on *your* catch-all domain (`agent-xxxxxxxx@your-domain`)
- **`wait_for_code`** extracts 6-digit OTPs and magic links from the body
- Works with **Apify MCP**, Cursor, Claude, n8n, Make, and `apify-client`
- Filter by sender (`from`) and prefer `otp` or `link`
- Timeout is explicit: `timeout: true` still returns the address so the agent can retry
- Scheduling, monitoring, and dataset export (JSON, CSV, Excel, HTML) on Apify

### For AI agents (MCP, Cursor, Claude, other Actors)

**When to call this Actor:** the workflow needs a one-time email, then a verification code or verify URL.

**Default tool call** (`osint_data/alias-mail`):

```json
{
  "action": "create_and_wait",
  "prefix": "agent",
  "waitTimeoutSecs": 40,
  "prefer": "any"
}
```

**How to use the dataset item:**

1. Read `inbox.address` → fill the signup / “email” field.
2. Trigger the site to send mail.
3. If this run already waited, read `code` or `link`. If `timeout` is `true`, call again with `"action": "wait_for_code"` and `"inboxId": "<inbox.id>"`.
4. Do not invent codes. If both `code` and `link` are null and `timeout` is true, retry wait — do not fail the whole task yet.

**Constraints agents must respect:**

| Rule | Value |
| --- | --- |
| Actor id | `osint_data/alias-mail` |
| Auth | Hosted `ALIAS_API_KEY`, or input `apiToken` |
| Apify MCP `call-actor` cap | **45 s** — keep `waitTimeoutSecs` ≤ **40** |
| `Actor.call` from another Actor | no 45 s cap |
| Idle inbox | still billed **$0.05** on create; code event only if extracted |
| Mail hosting | Cloudflare, EU-friendly storage — not Apify |

**MCP pin:**

```json
{
  "mcpServers": {
    "apify": {
      "type": "http",
      "url": "https://mcp.apify.com/?tools=fetch-actor-details,osint_data/alias-mail"
    }
  }
}
```

Native Cloudflare MCP (same product, no Apify): `https://alias-mail.w01f.workers.dev/mcp` with tools `create_inbox`, `wait_for_code`, `list_messages`, `get_message`.

### What data can this temp-mail Actor extract?

| Field | Type | Description |
| --- | --- | --- |
| `inbox.address` | string | Temporary email to paste into a form |
| `inbox.id` | string | Handle for `wait_for_code` / `list_messages` |
| `code` | string | One-time password (OTP) |
| `link` | string | Magic / verify URL |
| `kind` | string | `otp` or `link` |
| `timeout` | boolean | `true` if nothing arrived in time |
| `from` / `subject` | string | Source message |

Download the dataset as JSON, HTML, CSV, or Excel.

### How to get a verification code (humans)

1. Open **[Alias Mail Temp For Agents & AI](https://apify.com/osint_data/alias-mail)** → **Input**.
2. Leave `action` on `create_and_wait`. Optional: set `prefix`, `prefer` (`otp` / `link`), `from`.
3. If you self-host Alias Mail, paste your token into secret `apiToken`. The public Actor can use the hosted env instead.
4. Click **Start**. Copy `inbox.address` from the dataset into the website.
5. Wait for `code` or `link`. On timeout, run `wait_for_code` with the same `inboxId`.

Two-step variant: `create_inbox` → use the address in the browser → `wait_for_code`.

### How much does temp mail for AI agents cost?

Pay per event (you are not billed for idle Apify compute beyond the tiny start event):

| Event | When | Price |
| --- | --- | --- |
| **Inbox created** | `create_inbox` or `create_and_wait` succeeded | **$0.05** |
| **Code received** | OTP or magic link extracted — **not** charged on timeout | **$0.10** |
| Actor start | Automatic | $0.00005 |

A full signup (`create_and_wait` + code) is **$0.15**. Create-only is **$0.05**. Cloudflare usage is separate. Memory default **256 MB** (max 512 MB).

### Input

See the **Input** tab for the full schema.

- `action`: `create_and_wait` (default), `create_inbox`, `wait_for_code`, `list_messages`, `get_message`
- `prefix`: local-part prefix (`agent`, `qa`, `signup`)
- `waitTimeoutSecs`: 5–300; use **40** on Apify MCP
- `prefer`: `any` · `otp` · `link`
- `from`: optional sender allowlist
- `apiToken`: only if you bring your own Alias key (secret)

### Output

Each run pushes **one** dataset item. Example:

```json
{
  "action": "create_and_wait",
  "inbox": {
    "id": "11111111-2222-3333-4444-555555555555",
    "address": "agent-abcd1234@example.com",
    "domain": "example.com"
  },
  "timeout": false,
  "code": "482193",
  "link": null,
  "kind": "otp",
  "from": "noreply@example.com",
  "subject": "Your verification code"
}
```

If `timeout` is `true`, the run still **succeeds** — retry `wait_for_code` instead of treating it as a hard error.

### Tips for browser automation and QA

- Pair with Playwright / Camoufox / Crawlee: create inbox → fill form → wait for code → submit.
- Keep MCP waits at 40 s; split create and wait if the site is slow to send mail.
- Prefer `from` when the vendor is known (`noreply@github.com`) to ignore noise.
- Cold start adds a few seconds before the wait clock.

### FAQ

#### What is a disposable inbox for AI agents?

A one-task mailbox an agent can mint, publish into a form, and delete. Alias Mail gives the agent the address **and** the extracted OTP, so it does not have to scrape Gmail or Guerrilla Mail.

#### How do I get an OTP with Apify?

Run `osint_data/alias-mail` with `action: create_and_wait`. Read `code` from the dataset. That is the whole loop.

#### Is this a temp-mail scraper?

No. It does not scrape other people’s inboxes. It creates addresses on the Alias Mail catch-all you (or the host) control.

#### Can I use this with MCP, Cursor, or Claude?

Yes. Pin `osint_data/alias-mail` on [Apify MCP](https://docs.apify.com/mcp), or call `https://alias-mail.w01f.workers.dev/mcp` directly.

#### Does Alias Mail work for signup and 2FA automation?

Yes — QA agents, support bots, and browser automations that must pass “verify your email”. Do not use it to evade bans or violate a site’s terms.

#### Support

Open an **Issue** on the Actor page. Programmatic access is on the **API** tab.

This Actor creates mailboxes you (or the agent operator) requested. Incoming mail can contain personal data. Use it only for legitimate testing and automation, and comply with GDPR and the target site’s terms.

# Actor input Schema

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

create_and_wait (default): mint a disposable inbox then block until OTP/magic link. Use create_inbox or wait_for_code for a two-step agent flow.

## `apiToken` (type: `string`):

Optional. Bring-your-own Alias Mail Bearer token. Leave empty to use the hosted ALIAS_API_KEY.

## `baseUrl` (type: `string`):

Alias Mail API origin. Leave default unless you run a private worker.

## `prefix` (type: `string`):

Local-part prefix, e.g. qa → qa-xxxxxxxx@your-domain.

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

Optional mailbox domain. Defaults to the worker DEFAULT_DOMAIN.

## `ttlSeconds` (type: `integer`):

Lifetime before the inbox is auto-deleted.

## `inboxId` (type: `string`):

Required for wait_for_code and list_messages.

## `messageId` (type: `string`):

Required for get_message.

## `waitTimeoutSecs` (type: `integer`):

How long to wait for a code. Keep at 40 or below if you call this Actor through Apify MCP (45s cap).

## `prefer` (type: `string`):

Extract an OTP, a magic link, or whichever arrives first.

## `from` (type: `string`):

Only accept mail from this sender (optional).

## Actor input object example

```json
{
  "action": "create_inbox",
  "baseUrl": "https://alias-mail.w01f.workers.dev",
  "prefix": "qa",
  "ttlSeconds": 3600,
  "waitTimeoutSecs": 40,
  "prefer": "any"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset with the inbox and verification code

# 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 = {
    "action": "create_inbox",
    "baseUrl": "https://alias-mail.w01f.workers.dev",
    "prefix": "qa",
    "ttlSeconds": 3600,
    "waitTimeoutSecs": 40,
    "prefer": "any"
};

// Run the Actor and wait for it to finish
const run = await client.actor("osint_data/alias-mail").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 = {
    "action": "create_inbox",
    "baseUrl": "https://alias-mail.w01f.workers.dev",
    "prefix": "qa",
    "ttlSeconds": 3600,
    "waitTimeoutSecs": 40,
    "prefer": "any",
}

# Run the Actor and wait for it to finish
run = client.actor("osint_data/alias-mail").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "action": "create_inbox",
  "baseUrl": "https://alias-mail.w01f.workers.dev",
  "prefix": "qa",
  "ttlSeconds": 3600,
  "waitTimeoutSecs": 40,
  "prefer": "any"
}' |
apify call osint_data/alias-mail --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,osint_data/alias-mail"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/GTmW66wnDo5RdVZ6X/builds/rkNpGtemDMYyW563p/openapi.json
