Temporary Email Inbox & OTP API for AI Agents
Create private temporary email inboxes, list received-message metadata and extract numeric verification codes as JSON. Built for authorized QA, n8n and AI agents. Inbox TTL 1–60 minutes. Pay through Apify; no separate service account or crypto wallet required.
| Category | Developer Tools, Ai |
|---|---|
| Example cost | $0.013 for a 10-minute inbox, one code lookup and deletion |
| Store listing | apify.com/hirepulse/temporary-email-inbox |
What it does
Temporary Email Inbox & OTP API for AI Agents
Creates time-limited, private disposable inbound email inboxes and extracts numeric one-time passwords (OTPs) and their provenance from received SMTP messages. The Actor provisions a random private email address and associated secret access credential for the creating account, receives real inbound email, parses plain-text and HTML message content for 4–8 digit verification codes located near verification or OTP labels (including supported non‑Latin labels), and returns extracted numeric candidates with provenance metadata such as a message identifier, receipt/expiry timestamps, extraction method, source indicator, and sender verification flag. Technical capabilities include inbox lifecycle management (provision, list message metadata, retrieve code candidates, revoke/delete inbox), conservative OTP parsing tuned for verification/security labels, per-inbox message metadata retention, and time-limited ephemeral inbox allocation tied to the creator’s account.
Use cases
- Authorized QA of email verification and OTP flows for applications and staging environments
- Automated testing and validation of registration and login verification processes
- Integration with workflow automation tools (n8n, Make) and AI agents to obtain test OTPs
- End-to-end testing of systems that send numeric verification codes via email
- Inspecting message metadata and selecting specific messages for targeted code extraction
Watch the verified SMTP test
Fourteen-second replay of recorded owner QA results from November 19, 2026. A real Gmail message containing a synthetic code was sent to the allocated address. The Actor returned the matching code and the inbox was deleted. This is an evidence reconstruction with condensed timing. Mailbox address, capability and code are withheld.
Recorded test IDs and evidence summary · Animated replay
See the n8n workflow design

Workflow illustration. The test verified Gmail-to-SMTP delivery and the published Apify Actor. The n8n workflow is a design, with private mailbox credentials retained in workflow state.
Test an email verification flow in three runs
For QA engineers and automation developers testing an application they own or are authorized to test. Keep the inbox ID and private capability from the first run and use the same Apify account for all steps.
1. Create a ten-minute inbox
{"action":"create","ttl_seconds":600}
Set the run's maximum charge to at least $0.011. Copy the returned address into your application's email test. Send the verification email using your application's usual email provider. The Actor receives email and returns promptly after allocating the inbox.
2. Retrieve the code after your application sends its email
{"action":"get_code","inbox_id":"REPLACE_WITH_INBOX_ID","capability":"REPLACE_WITH_PRIVATE_CAPABILITY","wait_seconds":30}
This run costs $0.001 and waits up to 30 seconds. A pending result means no retained message has arrived yet. no_code means no supported numeric code was found. ambiguous means multiple candidates were found. A code result returns a numeric candidate and provenance. Check it against the code your test application expects. Each additional Actor run incurs another start charge.
3. Delete the inbox when your test finishes
{"action":"delete","inbox_id":"REPLACE_WITH_INBOX_ID","capability":"REPLACE_WITH_PRIVATE_CAPABILITY"}
Deletion revokes further reads of the live inbox. Previous Apify run outputs follow Apify storage retention. Keep capabilities and OTPs in private workflow state and restricted Apify storage.
From your own code
curl -X POST 'https://api.apify.com/v2/acts/hirepulse~temporary-email-inbox/run-sync-get-dataset-items?timeout=90&maxTotalChargeUsd=0.011' \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"action":"create","ttl_seconds":600}'
For subsequent actions use the same endpoint and the JSON above, with maxTotalChargeUsd=0.001. Supply real IDs and capabilities only in your private request body. A new create run allocates and charges for another inbox.
From an AI agent or n8n
Select this Actor in Apify MCP. Ask the agent to create an inbox with action=create and ttl_seconds=600. After your application sends the test email, call get_code with the returned inbox_id, capability and wait_seconds=30. Finish with delete. In n8n, use the Apify integration for those three calls and keep credentials in private workflow state.
Pricing
A 10-minute create run costs $0.011: $0.01 inbox allocation plus $0.001 Actor start. Each get-code, list or delete run costs $0.001. Create plus one code lookup plus delete costs $0.013. Check live Apify pricing for plan discounts.
An allocated inbox is charged even if no email arrives. The allocation lifetime can be 1–60 minutes, billed in started ten-minute intervals. For example, an hour costs $0.061 to create. Invalid-input and failed runs can still incur the $0.001 start charge.
Check current event prices on Apify
Delivery and code coverage
The Actor extracts 4–8 digit numeric verification codes near supported OTP labels. Email delivery and acceptance of disposable domains depend on your application and email provider. Magic links, attachments and alphanumeric codes are outside the supported output. The published demonstration uses a synthetic test email injected through the signed relay. It demonstrates the workflow rather than SMTP deliverability.
中文快速开始
用于您有权测试的应用。先用 create 创建 10 分钟收件箱($0.011),再让您的应用发送测试邮件。使用返回的 inbox_id 和 capability 调用 get_code,可等待 30 秒($0.001)。完成后调用 delete($0.001)。三次运行示例合计 $0.013。请将访问凭证和验证码保存在私有工作流中。邮件送达取决于邮件服务商及应用。
Questions
What does Temporary Email Inbox & OTP API for AI Agents return?
Creates time-limited, private disposable inbound email inboxes and extracts numeric one-time passwords (OTPs) and their provenance from received SMTP messages. The Actor provisions a random private email address and associated secret access credential for the creating account, receives real inbound email, parses plain-text and HTML message content for 4–8 digit verification codes located near verification or OTP…
How much does one run cost?
A 10-minute create run costs $0.011: $0.01 inbox allocation plus $0.001 Actor start. Each get-code, list or delete run costs $0.001. Create plus one code lookup plus delete costs $0.013. Check live Apify pricing for plan discounts.
Can I call it from my own code or an AI agent?
Yes. It runs as an Apify Actor: start it with the Apify API, the Apify MCP server, or the console. The only credential required is your Apify API token.
Do I need an account on the target website?
Your Apify account owns the inbox. The Actor receives email for your authorized tests. Your application sends the test email through its normal provider.